[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Moving Debian from one HD to another



The following is probably the easiest, and safest way, to accomplish copying
the files:

cd /
mkdir /newdrive
mount -t ext2 /dev/{device} /newdrive
find . -depth | cpio --pass-through --preserve-modification-time --make-directories --verbose /newdrive

The find is done before any copying takes place, so there won't be anything
copied from /newdrive to /newdrive/newdrive (at least, that's been my
experience).

Then, you'll have to edit /newdrive/etc/fstab to reflect the new partition
scheme that will be used. You should make a boot disk:

dd if=/boot/vmlinuz of=/dev/fd0 bs=16384
rdev /dev/fd0 /dev/{device}

This will save any hassle with lilo. Then reboot with the boot disk, edit
/etc/lilo.conf and re-run lilo. 

-- 
Scott Barker
Linux Consultant
scott@galileo.cuug.ab.ca
http://www.cuug.ab.ca:8001/~barkers/   (under construction)

[ I try to reply to all e-mail within 5 days. If you don't  ]
[ get a response by then, I probably didn't get your e-mail ]
[ (we have a sometimes sporadic connection to the internet) ]

"Opportunity is missed by most people because it is dressed in overalls and
   looks like work."
   - Thomas Edison



Reply to: