LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Move Ubuntu across drives. (https://www.linuxquestions.org/questions/linux-newbie-8/move-ubuntu-across-drives-715747/)

syklone 03-31-2009 06:58 AM

Move Ubuntu across drives.
 
Good morning, My question is about Ubuntu.

I have installed it on my C: drive as a dual boot option to Vista. I have since purchased a new hard drive to add more space to my computer.

I would like to move the Ubuntu installation to my new HDD and use the same amount of space (possibly a little more).

I would also like to recover the space on the C: drive for windows use.

What is the easiest way of doing this, without having to reinstall Vista?

Thank you for your time.

b0uncer 03-31-2009 12:58 PM

Probably install the 2nd harddisk, then install Ubuntu (fresh) onto it, then copy contents of /home from the old installation (on the 1st disk) to the new installation (2nd disk), then simply remove the partition(s) on the 1st disk where the old Ubuntu installation was and resize the Windows partition (C:) to fill the first disk. You can do this all using the Ubuntu Desktop live/installation disc, or the freshly installed system; I guess Windows partitioning tools work as well, but you can't resize a partition if it's in use, so doing it from inside Windows is out of question.

I guess you could also just copy the Ubuntu files to the partitions on the new disk and reinstall bootloader (if you remove the old /boot, it won't work anymore!) in the new system, but if you want it easy and are okay with doing the post-installation configuration again (if any), doing a fresh install might be the way to go. You don't have to reinstall Windows if you don't trash it's installation (obviously), which won't happen as long as you don't remove the partition it's on; you'll need to reinstall the bootloader anyway---except if you want to do this in a complex way which I assume you don't---and that's the only thing that has effect on getting to Windows. Or actually, resizing the Windows partition is a potential danger, but I've never failed such operations. Taking backups is wise, but is up to you if you want to.

Some people seem to think one needs to uninstall an operating system in some way; that's not true. Just delete the partitions (after moving your important data out of there) and extend the Windows partition over the newly created empty space. The gparted program available for Ubuntu (should be on the installation/live cd) can deal with the partition types in question here..I just recommend doing one operation at a time with it, in my experience it works the best that way.

In short:
- install Ubuntu on the new disk
- make sure your bootloader works (try booting Windows and the new Ubuntu)
- copy contents of /home (and anything else important) from the old partition(s) to the new one(s)
- boot the live cd you used to install Ubuntu and launch partition editor
- delete old Ubuntu partitions from the 1st disk, apply
- resize Windows partition to fill the disk, apply

Duck2006 03-31-2009 01:21 PM

You can use part image to move your ubuntu install to the new drive.

http://www.psychocats.net/ubuntu/partimage

Make a backup of your ubuntu install then restore it to your new partition on your new drive, don't for get to edit your menu.lst to match the new drive. Then your have to reinstall grub to the mbr of the first drive.

In vista use the partition tool to reclame the space back on your windoze drive.


All times are GMT -5. The time now is 11:56 PM.