Hardware Wars, round 2
D. Hugh Redelmeier
hugh-pmF8o41NoarQT0dZR+AlfA at public.gmane.org
Sun Aug 22 05:37:39 UTC 2010
| From: Peter King <peter.king.1-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org>
| Or maybe this is a
| sign that I should get a new boot drive. Probably not a bad idea. If
| only it weren't so much trouble to clone boot drives...
What's hard about cloning boot drives? I've done it a number of times
via brute force.
If
a) your boot drive is large enough that geometry doesn't matter (8.5G
or more, I imagine), and
b) the target drive has at least as many tracks as your boot drive,
and
c) you can install the target drive,
then the following simple procedure should work:
- install target drive
- boot a live Linux CD
- do a dd from the boot drive to the target drive.
Don't screw this up. For example, getting it
backwards is fatal to the system.
time dd if=/dev/sda of=/dev/sdb bs=100M
This assumes that /dev/sda is the boot disk
and /dev/sdb is the target drive. Check carefully!
This copies the whole disk: all partitions.
Flaw 1: If you get a disk error, dd will stop (I think).
You are on your own at that point.
The "time" is just because it is sometimes interesting
to know how long this takes
At this point, your target disk is a clone of your boot disk.
If the target disk is larger than the boot disk, you will have some
space that is not in any partition. You can fix that with gparted or
fdisk or whatever.
Flaw 2: if your target disk was formerly used by some RAID systems, it
might have crud at the end of the disk saying so. The dd did not
erase this if the target is larger than the boot disk. See
<https://bugs.launchpad.net/ubuntu/+source/dmraid/+bug/543008>
--
The Toronto Linux Users Group. Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
More information about the Legacy
mailing list