[nmglug] Did I totally hose my computer?

Brendan synk at swcp.com
Tue Dec 29 12:42:55 PST 2009


On 12/29/2009 01:32 PM, J. Marsden DeLapp wrote:
> zcat boot.img.gz>  /dev/sda

Oh, I hate that for you.  How big in boog.img.gz?

> So it appears I hosed the MBR and partition table on dev/sda.

And possibly some data at the beginning of one of your partitions. 
Depends on how big boot.img.gz is.

> The computer was setup with three 640 GB drives in a RAID 5
> configuration. So maybe if I can get it to boot again the stuff on sdb
> and sdc could be used to rebuild the RAID array?

There's basically 4 things you have to do:

1. Reinstall your bootloader.  No problem.

2. Recreate your partitions as they used to be.  Probably not a problem 
becaose of....

3. Your RAID5 array needs to resync.

4. Reinstall your /boot, assuming you have one.

Here is what I would do:

1. Download a rescue image of whatever distro is the most comfortable. 
For me that's Fedora.

2. Look at the partitions on sdb and sdc to determine what my sda 
partitions *should* be.

3. Use fdisk to recreate the partitions on sda, set the partition types, 
etc.

4. Run partprobe if fdisk doesn't do it for you.  This'll make those sda 
partitions active.

5. Re-add the sdaX slice to your RAID5 partition.  You can keep working 
while the sync is going.

6. Recreate your /boot partition (I'm assuming this isn't a RAID1 shared 
with sdb/sdc.  This'd be even easier if it were) with mke2fs or whatever 
your fs is.

7. Reinstall the kernel package to populate /boot, then run grub to fix 
up the MBR.

8. Wait for the resync to complete and reboot.  You should be all set.

-Brendan



More information about the nmglug mailing list