[ale] Disk Drive Legerdemain

hirsch at zapmedia.com hirsch at zapmedia.com
Wed Feb 27 10:21:34 EST 2002


Jeff Hubbs writes:
 > I want to get really good at replicating disk drives.

At one point we did this a lot.  We had an advantage--we knew the
basic layout of the drive to start with.  What we would do is script
fdisk to create partitions of the appropriate size and take the
default value for the last partition to grab all the remainder of the
disk, allowing us to copy to differently sized disks.

Then we would mount the destination disk appropriately and copy all
the files.  The final step is to run lilo.  The tricky part with lilo
is to get the incantation right to install lilo on the second disk in
such a way that when the second disk is installed as the first disk
lilo will boot correctly.

I've always wanted to open the code and make some changes:

 * Use sfdisk in the script instead of fdisk.  fdisk is not really
   suitable for scripting.

 * Parse the output from sfdisk to get the desired partition sizes.  I
   guess the biggest one would be the one to take everything that
   remains after creating all the other partitions.

 * Somehow figure out the partition types and replicate that
   information, too.

 * Put this on a bootable CD to automate everything

The first change would be easy.  The second would take some work.  The
third can probably be done easily enough by parsing the output of
mount.

I think I can send you our script it you can use it.

--Michael

---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list