Off Topic - Moving Linux to a different drive

dieter franzke dieter at franzke-online.de
Sat Jan 26 13:45:02 GMT 2002


hi,

Am Sam, 2002-01-26 um 21.23 schrieb djamil:
> how about cp ?
> 
> On Sat, 2002-01-26 at 19:38, Ash Ridley wrote:
> > Hi all,
> > 
> > Sorry to post OT so I'll make it quick.
> > 
> > Does anyone know where to get idiot-proof instructions for moving Linux
> > from one drive to another? I've got an installation spanned across 2
> > disks and I've run out of room and want to consolidate both onto a
> > different hard disk and get rid of the original 2.

Boot with the rescue disk.
Make two mountpoints 
mkdir /old
mkdir /new

mount old system to /old, new partition to /new
mount /dev/sda..(hd..) /old
mount /dev/sdb..(hd..) /new

please verify that /old is your old root-system and new is empty.
Change to /old.
cd /old

then do a
tar -cSp --numeric-owner -f - . | (cd /new && tar xSpvf - )

In this way all stuff from /old will be transferred to /new. Links and
user- and grouprights will stay unchanged.

You must  change your fstab concerning your new disk. Your LILO.conf
must be changed to.

Boot your system with a bootdisk.
Run lilo.

ciao

dieter

-- 
registered linuxuser 199810
it's time to close windows





More information about the samba mailing list