[Cialug] Moving Linux from one disk to another

Paul Gray gray at cs.uni.edu
Thu Sep 4 16:14:30 CDT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Nathan C. Smith wrote:
> What are some good ways to move linux from one disk to another?  I have a running installation on a 20 GB disk I'd like to move to something a little bigger and then take advantage of the new space.  Is that something I could do with DD and then use another program to expand my filesystems into the available space?  What would I use to expand the filesystem and is it available from the command line or by using knoppix, etc.?
> 
> Is there anything quick and easy?  I may give ghost a try but I thought I would ask the question.
> 
> Looking for tips pointers and valuable life experience.  TIA.

Power off
Install second drive
Boot finnix
mkfs new partition(s) on new drive
mount /dev/<oldpartitioni>/ /mnt/oldmount
mount /dev/<newpartitioni>/ /mnt/newtarget
rsync -plarv /mnt/oldmount/ /mnt/newtarget/
mkswap /dev/secondrive
vi /mnt/newtarget/fstab (fix hda <-> sda changes)
vi /mnt/boot/grub/menu.lst (fix hda <-> sda changes)
grub --no-floppy
  root (hd1,0)
  setup (hd1)
  quit
poweroff
yank old drive
power on


dd takes too long, and isn't too kind to resizing partitions

- --
Paul Gray
314 East Gym, Dept. of Computer Science        -o)
University of Northern Iowa                    /\\
Supercomputing 2008 Education Program Chair   _\_V
Message void if penguin violated ...  Don't mess with the penguin
No one says, "Hey, I can't read that ASCII attachment ya sent me."
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkjAT7UACgkQOH45TZW7mh5+dgCg3qQ+7CCeRjp6ozwuf0ygyQin
F0kAniUuP8iwvGw8ZMtFkU3My+ZWMXd+
=EJrH
-----END PGP SIGNATURE-----


More information about the Cialug mailing list