Migrate ubuntu to another partition

Phillip Susi psusi at cfl.rr.com
Fri Mar 3 23:05:00 UTC 2006

Copy all the files on the root partition over to the new one:

mount -t ext3 /dev/hdb3 /mnt
cp -ax / /mnt

Then update /mnt/boot/grub/menu.lst to refer to hdb3 instead of hdb1, 
and reinstall grub with:

root (hd1,2)
setup (hd0)

That will install grub on hda but configured to load the kernel from 
hdb3.  Alternatively you may be able to set your bios to boot directly 
from hdb so you can change hd0 to hd1 to install grub there instead.

Also edit /etc/fstab and change hdb1 to hdb3 for the root fs entry. 
Reboot and you should be running from the new partition which you should 
be able to verify by seeing that df says / is mounted on /dev/hdb3.

Filip Ruymen wrote:
> Hi all,
> I want to migrate my installation from one partition to another.
> currently it is on hdb1 and I want to move it to hdb3.
> How can this be done without reinstalling everyting?
> any help or tips on how to do it?
> --
> Kind regards
> Filip Ruymen

More information about the ubuntu-users mailing list