How to recover corrupted FAT directory?
How to recover corrupted FAT directory?
I was running 280 and the HDD filled to around 98% full on my DP-P2. A message displayed to say the HDD was full, but the unit appeared to have locked up. So I pressed various keys on the remote to get a response, but no luck, so I held the on/off button down on the remote and after about 15 seconds the unit shutdown immediately. (not a clean shutdown).
On startup, the unit asked for a HDD check, which I confirmed, and then once booted, the file browser showed no files!
I have telnet'ed to the box and tried to use 'dosfsck' with various parameters in an attempt to rebuild the directory structure or recover deleted files, but no luck.
Has anyone had success in rebuilding a corrupt directory structure on the DP-P2?
Are there any other utilities that are on the BW or any that can be loaded on the BW to either recover corrupted directory strucutres or undelete files?
On startup, the unit asked for a HDD check, which I confirmed, and then once booted, the file browser showed no files!
I have telnet'ed to the box and tried to use 'dosfsck' with various parameters in an attempt to rebuild the directory structure or recover deleted files, but no luck.
Has anyone had success in rebuilding a corrupt directory structure on the DP-P2?
Are there any other utilities that are on the BW or any that can be loaded on the BW to either recover corrupted directory strucutres or undelete files?
-
- Wizard God
- Posts: 32714
- Joined: Tue Sep 04, 2007 13:49
- Location: Canberra; Black Mountain Tower transmitters
dosfsck is the only HDD repair tool on the Beyonwiz. It's what's used by the HDD Check through the GUI, so it's not likely to work any better via the telnet interface.
The only alternative would be to remove the HDD and connect it to a PC, and run the Windows repair tools.
The only alternative would be to remove the HDD and connect it to a PC, and run the Windows repair tools.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV
- tonymy01
- Uber Wizard
- Posts: 6373
- Joined: Fri Jun 01, 2007 15:25
- Location: Sydney, Australia DP-S1-1TB, DP-P2-2TB, DP-T4-2TB, DP-T4-BB... too many!
- Contact:
How big is your PC HDD? You could get a share happening that is the size of your Wiz HDD, and do a "dd if=/dev/ide/host0/bus0/target0/lun0/part1 of=blah bs=1024k" to copy your whole wiz drive to your PC. But it will be SLLLLOW to do 200G.
When you mount a share with the wiz gui, it mounts the filesystem in normal way, so the windows share is mounted to a directory, here is my wiz filesystem after choosing my windows fileshare (called storedToppyCaptures) in the GUI:
Now the /opt is just a bind/mount I do so that a directory on the Wiz HDD can run linux stuff on it with a simple path of /opt/bin etc, so ignore that. And my command prompt is because I am running a nicer busybox when I telnet in.
Anyway, I digress.
When you mount a share with the wiz gui, it mounts the filesystem in normal way, so the windows share is mounted to a directory, here is my wiz filesystem after choosing my windows fileshare (called storedToppyCaptures) in the GUI:
Code: Select all
root:/> mount
/dev/root on / type romfs (ro)
none on /dev type devfs (rw)
/dev/blkmem/1 on /flash type romfs (ro)
proc on /proc type proc (rw)
usbfs on /proc/bus/usb type usbfs (rw)
ramfs on /tmp type ramfs (rw)
/dev/ide/host0/bus0/target0/lun0/part1 on /opt type vfat (rw,sync,nosuid)
/dev/ide/host0/bus0/target0/lun0/part1 on /tmp/mnt/idehdd type vfat (rw,sync,nosuid)
//192.168.0.120/storedToppyCaptures on /tmp/mnt/smb/TONYSPC/storedToppyCaptures type smbfs (rw,nosuid,nodev,file_mode=0777,dir_mode=0777,codepage=437)
root:/> df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/root 16160 16160 0 100% /
/dev/blkmem/1 7810 7810 0 100% /flash
/dev/ide/host0/bus0/target0/lun0/part1488376320 324229120 164147200 66% /opt
/dev/ide/host0/bus0/target0/lun0/part1488376320 324229120 164147200 66% /tmp/mnt/idehdd
//192.168.0.120/storedToppyCaptures312565760 294682624 17883136 94% /tmp/mnt/smb/TONYSPC/storedToppyCaptures
Anyway, I digress.
Tony
- tonymy01
- Uber Wizard
- Posts: 6373
- Joined: Fri Jun 01, 2007 15:25
- Location: Sydney, Australia DP-S1-1TB, DP-P2-2TB, DP-T4-2TB, DP-T4-BB... too many!
- Contact:
I wonder if this would do the trick:
http://www.cgsecurity.org/wiki/TestDisk
I will try and compile it some time soon.
Regards
http://www.cgsecurity.org/wiki/TestDisk
I will try and compile it some time soon.
Regards
Tony
- tonymy01
- Uber Wizard
- Posts: 6373
- Joined: Fri Jun 01, 2007 15:25
- Location: Sydney, Australia DP-S1-1TB, DP-P2-2TB, DP-T4-2TB, DP-T4-BB... too many!
- Contact:
Yes!!! I did it.
Hmm, it bails because of the 4096!=512 I think... I think...
I don't want it to do anything on my drive while the drive is working fine though.
I noticed the wiz dosfsck has an undelete of sorts:
Dunno how well it will work, there is a lot of files to undelete from a Wiz drive!
Code: Select all
root:/opt> ./testdisk /list /dev/ide/host0/bus0/target0/lun0/disc
TestDisk 6.11, Data Recovery Utility, April 2009
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
Please wait...
Disk /dev/ide/host0/bus0/target0/lun0/disc - 500 GB / 465 GiB - CHS 60801 255 63, sector size=512
Disk /dev/ide/host0/bus0/target0/lun0/disc - 500 GB / 465 GiB - CHS 60801 255 63
Partition Start End Size in sectors
check_FAT: Incorrect number of bytes per sector 4096 (FAT) != 512 (HD)
Invalid FAT boot sector
1 P FAT32 LBA 0 1 1 60800 254 63 976768002
1 P FAT32 LBA 0 1 1 60800 254 63 976768002
No partition is bootable
I don't want it to do anything on my drive while the drive is working fine though.
I noticed the wiz dosfsck has an undelete of sorts:
Code: Select all
root:/opt> dosfsck -v
dosfsck 2.11 (12 Mar 2005)
usage: dosfsck [-aAflrtvVwy] [-d path -d ...] [-u path -u ...]
device
-a automatically repair the file system
-A toggle Atari file system format
-d path drop that file
-f salvage unused chains to files
-l list path names
-n no-op, check non-interactively without changing
-r interactively repair the file system
-t test for bad clusters
-u path try to undelete that (non-directory) file
-v verbose mode
-V perform a verification pass
-w write changes to disk immediately
-y same as -a, for compat with other *fsck
Tony
- tonymy01
- Uber Wizard
- Posts: 6373
- Joined: Fri Jun 01, 2007 15:25
- Location: Sydney, Australia DP-S1-1TB, DP-P2-2TB, DP-T4-2TB, DP-T4-BB... too many!
- Contact:
I don't think this tool is the solution now.
I compiled it without ncurses, which the Wiz definitely wouldn't be running, and without that, there is no menu system or options to do anything much???
And reading the testdisk website, it will "undelete" files, but it requires you to copy these files to another drive from what I can tell from the documentation.
I compiled it without ncurses, which the Wiz definitely wouldn't be running, and without that, there is no menu system or options to do anything much???
And reading the testdisk website, it will "undelete" files, but it requires you to copy these files to another drive from what I can tell from the documentation.
Code: Select all
root:/opt> cat testdisk.log
Using locale 'C'.
Sat Aug 1 08:19:27 2009
Command line: TestDisk /debug /dev/ide/host0/bus0/target0/lun0/disc
TestDisk 6.11, Data Recovery Utility, April 2009
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
OS: Linux, kernel 2.4.26-em86xx-uc0-sigma (#58 Wed Jul 15 20:53:50 KST 2009)
Compiler: GCC 3.4 - Aug 1 2009 22:53:44
ext2fs lib: none, ntfs lib: none, reiserfs lib: none, ewf lib: none
Hard disk list
Disk /dev/ide/host0/bus0/target0/lun0/disc - 500 GB / 465 GiB - CHS 60801 255 63, sector size=512 - WDC WD5000AAKB-00YSA0
TestDisk exited normally.
Tony
I'm not sure what that all means. Wouldn't compiling it with ncurses do? If the wiz does need to be running ncurses, can we run it from a USB stick?tonymy01 wrote:I compiled it without ncurses, which the Wiz definitely wouldn't be running,
Shouldn't be a problem. Just use a USB HDD as the destination drive.tonymy01 wrote:And reading the testdisk website, it will "undelete" files, but it requires you to copy these files to another drive from what I can tell from the documentation.
cheers
DaveR
IceTV, T4, T3, T2, P2, S1, FV-L1(P1 fw), TRF-2460, HDR-7500 and Skippa
DaveR
IceTV, T4, T3, T2, P2, S1, FV-L1(P1 fw), TRF-2460, HDR-7500 and Skippa
- tonymy01
- Uber Wizard
- Posts: 6373
- Joined: Fri Jun 01, 2007 15:25
- Location: Sydney, Australia DP-S1-1TB, DP-P2-2TB, DP-T4-2TB, DP-T4-BB... too many!
- Contact:
Yeah, I am trying to get ncurses into the toolchain, with no success. I got ncurses cross compiled no problems, but configuring the testdisk compile environment doesn't seem to want to see it, no matter where I put the ncurses libs & includes, so I am kind of at a stand still right now. I have about 2 months of stuff I need to watch on the Wiz and Toppy right now, so I don't see myself progressing this with any kind of pace (if at all).
Regards
Regards
Tony
-
- Wizard God
- Posts: 32714
- Joined: Tue Sep 04, 2007 13:49
- Location: Canberra; Black Mountain Tower transmitters
The firmware sometimes has the vi editor in it (a cut-down version); does it use ncurses?tonymy01 wrote:Yeah, I am trying to get ncurses into the toolchain, with no success. I got ncurses cross compiled no problems, but configuring the testdisk compile environment doesn't seem to want to see it, no matter where I put the ncurses libs & includes, so I am kind of at a stand still right now. I have about 2 months of stuff I need to watch on the Wiz and Toppy right now, so I don't see myself progressing this with any kind of pace (if at all).
Regards
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV
vi predates curses.prl wrote:The firmware sometimes has the vi editor in it (a cut-down version); does it use ncurses?
http://en.wikipedia.org/wiki/Curses_(pr ... g_library)
cheers
DaveR
IceTV, T4, T3, T2, P2, S1, FV-L1(P1 fw), TRF-2460, HDR-7500 and Skippa
DaveR
IceTV, T4, T3, T2, P2, S1, FV-L1(P1 fw), TRF-2460, HDR-7500 and Skippa
Hi Peter and Dave,
Regards,
Ian.
I don't believe that VI uses curses, it has it's own internal system. Curses came after VI though it took its functionality and concepts from VI. Curses is just a toolkit for optimising cursor navigation and movement on an older styled character based display (like a VT100).Dave? wrote:vi predates curses.prl wrote:The firmware sometimes has the vi editor in it (a cut-down version); does it use ncurses?
http://en.wikipedia.org/wiki/Curses_(pr ... g_library)
Regards,
Ian.
-
- Master
- Posts: 260
- Joined: Wed Dec 12, 2007 22:10
Re: How to recover corrupted FAT directory?
Please forgive me if I am stating the obvious, but when you telnet'ed to your Wiz did you check whether you had some other directory in existence that contained your recordings? I recently had an HDD issue that either resulted in no Recordings folder being visible on the Wiz, or a blank Recordings folder (I can't remember now). On advice from this forum I took the HDD out and had a look via Ubuntu, and I could see the Recordings folder (albeit renamed to something that rendered it invisible to the Wiz fileplayer), along with all the recordings.honda_tsx wrote:I was running 280 and the HDD filled to around 98% full on my DP-P2. A message displayed to say the HDD was full, but the unit appeared to have locked up. So I pressed various keys on the remote to get a response, but no luck, so I held the on/off button down on the remote and after about 15 seconds the unit shutdown immediately. (not a clean shutdown).
On startup, the unit asked for a HDD check, which I confirmed, and then once booted, the file browser showed no files!
I have telnet'ed to the box and tried to use 'dosfsck' with various parameters in an attempt to rebuild the directory structure or recover deleted files, but no luck.
Has anyone had success in rebuilding a corrupt directory structure on the DP-P2?
Are there any other utilities that are on the BW or any that can be loaded on the BW to either recover corrupted directory strucutres or undelete files?
Maybe your HDD check created a new (blank) Recordings folder, but if by some the old one is there with a different name, you may be able to copy them back via telnet?
Cheers,
Bruiser
This may be honda_tsx's only option. Not Ubuntu, but connecting the HDD to a PC so some diagnostic or disk-recovery tools can be run on it.Bruiser333 wrote:On advice from this forum I took the HDD out and had a look via Ubuntu, and I could see the Recordings folder (albeit renamed to something that rendered it invisible to the Wiz fileplayer), along with all the recordings.
I wouldn't trust the front panel display too much. I'd be inclined to have another look just in case there's any folders in idehdd (I think it is) that shouldn't be there.honda_tsx wrote:The Wiz front display shows the HDD as empty, and telnet did not show any other Recordings directories, unfortunately.Bruiser333 wrote:Maybe your HDD check created a new (blank) Recordings folder, but if by some the old one is there with a different name, you may be able to copy them back via telnet?
When upgrading to 301 the firmware renames the 'recording' folder to 'Recordings'. If you go back to any other version the renaming is not reversed... so you have a Recordings folder full of recordings that the old firmware knows nothing about (so any HDD check is going to fail) and the old firmware creates a new 'recording' folder and puts any new recordings in there. You now have 2 folders with recordings in them. If you again upgrade to 301 (or newer?) the firmware will again rename the 'recording' folder to 'Recordings' thus overwriting the existing 'Recordings' folder (and wiping all of it's contents).honda_tsx wrote:I know there is a problem with going back from 301 of the firmware, because the Recordings directory changes to Recording or visa virsa, can't recall.
cheers
DaveR
IceTV, T4, T3, T2, P2, S1, FV-L1(P1 fw), TRF-2460, HDR-7500 and Skippa
DaveR
IceTV, T4, T3, T2, P2, S1, FV-L1(P1 fw), TRF-2460, HDR-7500 and Skippa
-
- Master
- Posts: 260
- Joined: Wed Dec 12, 2007 22:10
When I had my issue, the Wiz front display also showed the HDD as empty. But everything was still there (pretty much) when accessed via a USB enclosure under Ubuntu. Initially I thought the renamed Recordings folder was a file because it appeared something like ~Recordings.tvwiz (unfortunately I can't remember exactly, but it had a DOS like extension which confused me).honda_tsx wrote:Hi Bruiser,
The Wiz front display shows the HDD as empty, and telnet did not show any other Recordings directories, unfortunately. I know there is a problem with going back from 301 of the firmware, because the Recordings directory changes to Recording or visa virsa, can't recall.
Cheers.
Anyway, I'm not saying your situation is necessarily the same as mine, I just thought it would be worth it to make sure.
Cheers,
Bruiser