Need advice on moving Ubuntu Partition

Asked by bluey

Hi,
I have a 320gb harddrive with a dual boot Windows XP/Ubuntu 8.04 setup. My Windows O/S became hopelessly corrupted and so I have swapped over to my spare 200gb Hdd and have transferred my files to it after a new install of Windows XP. I now have the 200gb drive as master in my pc and the 320gb drive is now being used as an external drive via USB.

Trouble is now I do not know how to transfer my Ubuntu partition from the 320bb external to the 200gb drive in my pc. I guess I could use the Ubuntu live Cd to do a fresh install but I was hoping to keep all my settings, preferences and files. So is it possible to just transfer the whole Ubuntu partition to the new drive, and if so what would be the easiest way to do this?

I have googled for answers and have become confused by the amount of info available. I do have a live Cd of Gparted and was wondering if this is the best tool to use as some people seem to suggest?

Regards,
Bluey.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Yinon Ehrlich
Solved:
Last query:
Last reply:
Revision history for this message
Michael Tsang (michaeldadmum-deactivatedaccount) said :
#1

1. Create a partition larger than the old one in the 320 gb drive in the 200 gb drive.
2. If the old Ubuntu partition is /dev/sda1 and the new partition is /dev/sdb1, do this in the live environment:

sudo dd if=/dev/sda1 of=/dev/sdb1
resize2fs /dev/sdb1

Now the whole partition is transferred. Remember to update the partitions in /etc/fstab if necessary.

Revision history for this message
bluey (stringybark) said :
#2

Hello Michael,

I will attempt to copy the partition using your instructions on the weekend when I have more freetime.

Thank you very much for replying to my query.

Bluey.

Revision history for this message
Best Yinon Ehrlich (yinone) said :
#3

Hi,

You may be interested in http://clonezilla.org - an external tool that do this job.
Yinon

Revision history for this message
bluey (stringybark) said :
#4

Hello Yinon,

Many thanks for that Clonezilla link. I will look into it further on the weekend.

Thank you for your help.

Bluey.

Revision history for this message
bluey (stringybark) said :
#5

It would seem that my problem was not as difficult as I thought it would be.

Using Gparted livecd to do some resizing, I was able to copy and paste my Ubuntu partiition from my external drive to the unallocated space on my C:/ drive. I then edited the Grub Menulist to point to the new partition and it now boots up perfectly with no loss of data.

Many thanks for responding to my query.

Bluey.