[Gllug] moving system from one disc to another

James Hawtin oolon at ankh.org
Tue Aug 31 16:09:54 UTC 2010


Personally I build the new filesystems on the new disk then use dump. Don't
forget when you build a new FS you might need to user the label so
your fstab knows how to mount it.

cd /usr_new 

dump 0cf - /usr_old | restore if -
add .
extract

I always like interactive move as you and do ls anmd other commands to make
sure you have things right.

using dump and restore protects links unlike tar but allows you to use
different size partitions unlike dd. It also only copies the data you
need so is often faster. HOWEVER for a very full filesystem dd will be
faster as dump will make the drive heads seek. Plus point though it does
defrag the filesystem well!

You can dump and restore on a live system! 

I normally use

cd /storage
dump 0cf - /usr | split -b 2000m - usr_dump_

copy them to my new system and then
cd /usr
cat usr_dump_* | restore if - 

I can even copy them as they complete... to save time

Your need to grub your disk as well... mount up all your filesystems well /
/boot /usr anwyway then chroot into them.

chroot /sysimage

grub
root (hd0,X)
install hd0

x is the partition number of /boot 

if you use a boot block on a partition do.
install hd0,2

don't forget to fdisk the partition to be active and your need a standard
boot block on the MBR from say windows...

with grub your better off using the rescue partition of the install disk as
all the devices will be correctly named. Don't forget to fixup you fstab!
Paritulary for UUID mounting.

James
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list