Re: [SLUG] restoring a system from disk images

From: Ian C. Blenke (ian@blenke.com)
Date: Mon Mar 19 2007 - 12:43:14 EST


Bill Glidden wrote

> On one machine this worked like a champ. On the second machine, all
> that happens when I boot is that I get the word “GRUB” on the screen
> and it hangs.
>
> Could I possibly have a bad disk? Anything wrong with the method I used?
>

Even in this day and age, geometry differences will kill you.

One (ugly) thing you can do is dump the geometry and re-introduce it
when applying the partitioning elsewhere:

machine1# sfdisk -d /dev/sda > partition.dump
machine1# sfdisk -g /dev/sda
/dev/sda: 19457 cylinders, 255 heads, 63 sectors/track
machine1# rsync -aq partition.dump machine2:/root/
machine1# ssh machine2
machine2# sfdisk -f -C19457 -H255 -S63 /dev/sda < partition.dump

Ugly? Yes. Does it work? More often than it probably should.

The alternative, of course, is to re-install your grub MBR after
transferring to the new drive.

This trick is mostly useful when the BIOS reports a different geometry
between two drives that you _know_ have the same capacity, particularly
in a raid1 pair.

Oh LBA, how I wish you would have replaced this madness...

- Ian

-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 15:50:48 EDT