> I was thinking I could install the harddrive of machine two into the
> case
> with machine one. Format and mount the second harddrive and then just
> copy
> the whole file system down, but it seems to me this won't work. For
> one
> thing, I don't think I would copy LILO and the MBR this way.
>
> So, I wonder if the "dd" command will work. I checked the man pages
> and
> some of my books, and I'm fairly certain I'm close, but I hate to use
> trial and error to find my mistakes for this. ;)
>
[PT] Yep. This will work *if and only if* the hard drives are
exactly the same model and manufacturer. If not, then
you can still install it into machine one, partition it, mke2fs
it, and use GNU tar with the "l" (ell) option to take each
filesystem from the first and place it on the second hard
drive. Assuming you mount the root partition on the second
drive on /mnt, you could:
# cd /
# tar cfpBl . - | (cd /mnt; tar xfpB - )
and just repeat this for each filesystem. The only thing
left would be to lay down the MBR which you can do
with lilo.
> fdisk # Interactively create /dev/hdb
> parts
> dd if=/dev/hda1 of=/dev/hdb1 # Linux Swap
> dd if=/dev/hda2 of=/dev/hdb2 # Linux
>
> or maybe just...
>
> dd if=/dev/hda of=/dev/hdb
>
> Is this an appropriate approach? Is there any point to copying the
> Swap
> partition? Did this copy the MBR? If not, how do I do that?
>
[PT] The dd looks okay. You may want to add some
buffering like bs=256K or bs=512K or else it will take
a lot longer. You don't have to do any copying for the
swap partition. Just leave it as a raw parition. Just
don't forget to label it type 82 (Linux swap).
--
PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject.