[haiku] Re: Recovering data from faulty BeOS volume

  • From: Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
  • To: haiku@xxxxxxxxxxxxx
  • Date: Sat, 9 Sep 2017 20:41:46 +0200

On Sat, Sep 09, 2017 at 09:09:58AM -0400, Alexander G. M. Smith wrote:

andrewjameswood wrote on Sat, 9 Sep 2017 10:50:16 +0100:
I can mount the disk from an alternative Haiku nightly installation on 
another disk but cannot access the 'Desktop' folder on the faulty disk. 

If it's important data, copy the whole disk partition (or even the whole disk 
drive) to somewhere else (USB disk drive or a disk over the network, etc).  
Possibly use a Linux live boot CD like Knoppix.  Open a root shell, and copy 
the disk partition (named something like /dev/sda2, use fdisk /dev/sda to 
list them all) to that file somewhere else.  You can use compression too, 
such as in:
gzip -c < /dev/sda2 | ncftpput -c -u UserID -p Password OtherComputer.domain 
DestPath/SavedPartition.gz

Then boot up Haiku (possibly from a Haiku live CD), mount the bad disk and 
try "checkfs /YourDiskNameHere" to see if that fixes things.  If it makes a 
mess, copy the saved partition back to the original one and try something 
else.

If checkfs fails, you can use the "recover" command, which will try to
recover as much data as possible from a corrupt BFS volume. You will
need another disk to copy the data to.

This tool can need a lot of memory, especially if there are a lot of
files. In extreme cases (for example, I have webkit sources with .git,
and haikuports recipes on my dev partition, which ends up being a lot of
files), you may need to use a 64-bit version of Haiku so that the tool
does not run out of memory.

-- 
Adrien.

Other related posts: