Article View: aus.computers.linux
Article #57261Re: Linux FULL disk copy
From: Paul Gortmaker
Date: Thu, 07 Nov 1996 00:00
Date: Thu, 07 Nov 1996 00:00
44 lines
2194 bytes
2194 bytes
Matt Hyne <mhyne@rp.csiro.au> writes: >I want to transfer my linux from one machine to a totally different >machine - ie copy my linux partition from my disk onto the other disk and >then run it on the other machine. >So if I set the drive out of the other machine up as a secondary in my >machine what do I do to copy all my linux to it (including making it >bootable) - is it this easy ??? I'll assume your linux goodies are presently on /dev/hda1 and you want to put them onto the other drive which you have (temprarily) installed as /dev/hdb, fdisked to make a /dev/hdb1 and marked /dev/hdb1 as active. If you use LILO on a partition boot record and not the master boot record, you will have to ensure there is a valid MBR on the new disk, such as "fdisk /mbr" under DOS, etc. Might as well make a swap partiton on the new disk while you are there. Then do a: # mke2fs -vc /dev/hdb1 # mount -vt ext2 /dev/hdb1 /mnt # cd / # tar -cplf - ./ | tar -C /mnt -xvpf - # umount -v /mnt The "l" in the tar stops it from crossing filesystems and picking up any NFS volumes or the cruft in /proc (you don't want to copy /proc/kcore). If your root fs partition has changed names (i.e. was hda1, will now be hda2 or whatever) then you will have to edit /mnt/etc/fstab and /mnt/etc/lilo.conf to reflect the changes prior to unmounting. Rather than futz about trying to make the disk bootable while connected as a secondary drive, it is easier to just make a boot floppy and then simply rerun LILO once the drive is in its final home. E.g. # cat /vmlinuz > /dev/fd0 # rdev /dev/fd0 /dev/hda1 and then boot with that floppy once the disk is installed in the new machine, and then # /sbin/lilo Paul.
Technical Details
Message-ID:
<55rhpo$s5q@leonard.anu.edu.au>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<Pine.SOL.3.93.961107101438.13736D-100000@venice.rp.CSIRO.AU>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 102983,258733d294e49cef X-Google-Attributes: gid102983,public From: gpg109@leonard.anu.edu.au (Paul Gortmaker) Subject: Re: Linux FULL disk copy Date: 1996/11/07 Message-ID: <55rhpo$s5q@leonard.anu.edu.au> X-Deja-AN: 194991683 references: <Pine.SOL.3.93.961107101438.13736D-100000@venice.rp.CSIRO.AU> organization: Australian National University newsgroups: aus.computers.linux