Recovering a lost disk label or bsdlabel
Hello all:
A short note and precautionary tale:
I've a number of networked computers at home. Each is the back-up for the
other. My daughter's Windows XP based system is where I store my dump files
and my FreeBSD system is where I store her back-up files. Her hard drive
failed and became totally unreadable. Hence my backups were gone. My label
for the slice with all of her back-ups was somehow overwritten. Hence her
backups were gone too. This is the precautionary tale. Don't rely on two
systems on the same power grid to back each other up. A power spike, even
with proper spike protection, may result in multiple system failures.
Now the short note. I was able to restore the label. I first installed a new
BSD system on a third drive. From the new system, I investigated the failed
bsd drive. I was able to see the contents of the drive using dd
A painstaking search of the drive allowed me to eventually find the first
block of the /home directory. I was then able to use bsdlabel to create a
new partition at this point. DON'T initialize this partition. Just reboot
and mount it. If you get a "bad superblock" error, then the start point of
the partition is wrong and you will need to try a new starting point.
All of this would have been much easier if I had used bsdlabel to generate a
map of the various partitions on the slice and then saved a hard-copy for
posterity.
And now I've burned my back-up to DVD. Not so prone to whatever the heck it
was that killed two separate computers.
Cheers
JE
Re: Recovering a lost disk label or bsdlabel
JE wrote:[color=blue]
> A painstaking search of the drive allowed me to eventually find the first
> block of the /home directory. I was then able to use bsdlabel to create a[/color]
FWIW, scan_ffs[1] can help with recovering lost disk labels. Here[2] is
how I used it.
HTH
References:
1) [url]http://www.freshports.org/sysutils/scan_ffs/[/url]
2) [url]http://geekinfo.net/article.php?story=20071224175132586[/url]
--
Torfinn Ingolfsen,
Norway
Re: Recovering a lost disk label or bsdlabel
On 2008-10-30, Torfinn Ingolfsen <tingo@start.no> wrote:[color=blue]
> JE wrote:[color=green]
>> A painstaking search of the drive allowed me to eventually find the first
>> block of the /home directory. I was then able to use bsdlabel to create a[/color]
>
> FWIW, scan_ffs[1] can help with recovering lost disk labels. Here[2] is
> how I used it.
>
> HTH
>
> References:
> 1) [url]http://www.freshports.org/sysutils/scan_ffs/[/url]
> 2) [url]http://geekinfo.net/article.php?story=20071224175132586[/url][/color]
That would have saved me a couple of days work! It is in the ports tree as
well, same location (/usr/ports/sysutils/scan_ffs/).
Cheers!
JE
Re: Recovering a lost disk label or bsdlabel
JE wrote:[color=blue]
> That would have saved me a couple of days work! It is in the ports tree as
> well, same location (/usr/ports/sysutils/scan_ffs/).[/color]
Yes, FreshPorts[1] is a web version of the FreeBSd ports tree. Quote
from the front page:
FreshPorts has everything you want to know about FreeBSD software,
ports, packages, applications, whatever term you want to use
Highly recommended.
References:
1) [url]http://www.freshports.org/[/url]
--
Torfinn Ingolfsen,
Norway