Recovering a lost disk label or bsdlabel - BSD

This is a discussion on Recovering a lost disk label or bsdlabel - BSD ; 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 ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Recovering a lost disk label or bsdlabel

  1. 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

  2. Re: Recovering a lost disk label or bsdlabel

    JE wrote:
    > 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


    FWIW, scan_ffs[1] can help with recovering lost disk labels. Here[2] is
    how I used it.

    HTH

    References:
    1) http://www.freshports.org/sysutils/scan_ffs/
    2) http://geekinfo.net/article.php?story=20071224175132586
    --
    Torfinn Ingolfsen,
    Norway

  3. Re: Recovering a lost disk label or bsdlabel

    On 2008-10-30, Torfinn Ingolfsen wrote:
    > JE wrote:
    >> 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

    >
    > FWIW, scan_ffs[1] can help with recovering lost disk labels. Here[2] is
    > how I used it.
    >
    > HTH
    >
    > References:
    > 1) http://www.freshports.org/sysutils/scan_ffs/
    > 2) http://geekinfo.net/article.php?story=20071224175132586


    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

  4. Re: Recovering a lost disk label or bsdlabel

    JE wrote:
    > 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/).


    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) http://www.freshports.org/
    --
    Torfinn Ingolfsen,
    Norway

+ Reply to Thread