Upgrading to Feisty

Asked by Nayef Copty

Hello,

I am currently running on Dapper, and I want to upgrade to Edgy, and then Feisty without losing data. I was told that moving /home to a seperate partition was a good start, as it has many advantages, as well as it decreases the risk of losing data wile upgrading. My /home is 10 GB used. It's on the same partition that root (/) is on. I have an empty partition called hdd6, that has a capacity of 36 GB, and it's empty. The problem with this partition is that it is NTFS. Now, I need help with the following.
- How do I change hdd6 from NTFS to ext3?
- How do I mount /home to the hdd6 WITHOUT losing data?

Thank you,

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Hanusz leszek (leszek-skynet) said :
#1

If System -> Administration -> GNOME Partition Editor is not available, install "GParted" using "Add/Remove Software" or "Synaptic."

Launch Gparted.
With gparted you can remove the ntfs partition and create an ext3 partition in the free space.
Close Gparted.

You need to create the /newhome directory and mount the new ext3 partition in this directory, Open a terminal and type:

sudo mkdir /newhome
sudo mount /dev/<your_new_ext3_partition> /newhome

Then you need to copy the contents of your /home directory to the /newhome directory. You have to use the cp -a command to preserve the ownership of the files:

sudo cp -a /home/* /newhome/

Now open the /etc/fstab file and add your new partition:
sudo gedit /etc/fstab

You should add this line:
/dev/<your_new_ext3_partition> /home ext3 defaults 0 0

This should mount the new partition over the old /home directory after a reboot.
save the file and reboot.

verify that all your data is there and that the new partition is mounted correctly (Go to System->Administration->System Monitor then the filesystem tab)

If all is working correctly, you can install Feisty.
Choose manual partitionning and keep the /home partition you created.

Be very careful, If you have any important data you should backup it on external media as an added precaution.

Revision history for this message
Nayef Copty (nayefpearl-deactivatedaccount) said :
#2

I have gParted, but I have no control over hdd6, the only option available is unmount.

As for the Feisty upgrade, if I move /home to another partition, do you recommand that I upgrade Dapper to Edgy, then to Feisty on the internet, or use my Feisty Live CD (I got it from Ubuntu Shipit a month ago)

Thanks,

Revision history for this message
Hanusz leszek (leszek-skynet) said :
#3

You have to unmount /dev/hdd6 before removing this partition.

If you can't unmount /dev/hdd6, you can try booting with the gparted livecd (~ 50 Mb) available here: http://sourceforge.net/project/showfiles.php?group_id=115843&package_id=173828

If you mount /home in another partition, you can boot from the feisty live cd and install Feisty directly.

Revision history for this message
Nayef Copty (nayefpearl-deactivatedaccount) said :
#4

So basically, unmount /dev/hdd6 and then format it as ext3, then unmount /home and mount it back to hdd6?

WIll that process lose my data?

Revision history for this message
Hanusz leszek (leszek-skynet) said :
#5

Basically it is:

unmount /dev/hdd6
format it as ext3 (this step will lose all the data currently present in the hdd6 partition)

create the /newhome directory
copy from your current /home to /newhome

then you can unmount hdd6 (currently mounted at /newhome) and mount it as /home

At this point you should have your /home data duplicated.
It is present in your old /home directory
And it is also present in hdd6 which is mounted on top of the /home directory

So you can then install Feisty and keep the hdd6 partition (mounted as /home) and format the others.

Like I said before, this is complicated for a beginner and you could make an error in the process so it is advised to backup important data on CD's or usb keys before.

Revision history for this message
Nayef Copty (nayefpearl-deactivatedaccount) said :
#6

I am not really a beginner in Ubuntu, but I never tried messing around with partitions.

When I create the /newhome, how can I mount it as /home and be on hdd6?
Your steps only show how to backup home, not to move it completely to a different partition.

Revision history for this message
Hanusz leszek (leszek-skynet) said :
#7

At first hdd6 is mounted as /newhome and you "backup" home by copying the files to the hdd6 partition (which is mounted as /newhome)

From there your home is present on the hdd6 partition and you can mount it anywhere.

You can also mount it ON TOP of other directories.
It will not overwrite the contents present on this directory before but from now you will only see the files of the new partition mounted.

Ok it is not very clear, I will give you an example.

Let say you have one partition hda1 (mounted as / ) containing the following files:

/blahblah
/home/file1
/home/file2

Let say you have another partition hda2 containing the following files:

file3
file4
file5

you can mount the hda2 partition IN ANY DIRECTORY of the filesystem.
Let say you mount the hda2 partition on the /home directory.
Now your filesystem will be like this:

/blahblah
/home/file3
/home/file4
/home/file5

Now you cannot access the file1 and file2 files but they are not deleted, they are still present on the hda1 partition, you just cannot access them for the moment.
Let say you now unmount the hda2 partition. Your filesystem will come back to:

/blahblah
/home/file1
/home/file2

Does it makes sense ?

Revision history for this message
Nayef Copty (nayefpearl-deactivatedaccount) said :
#8

Yea, so basically I am mounting hdd6 as /newhome and then remounting it as /home

If so, can you help me with the mount and unmount commands on shell?

Revision history for this message
Hanusz leszek (leszek-skynet) said :
#9

Yes, you can follow the instructions I sent you in my first post, just replace <your_new_ext3_partition> by hdd6

Revision history for this message
Nayef Copty (nayefpearl-deactivatedaccount) said :
#10

By unmounting and remounting, does that make the data lost or not?

Revision history for this message
Hanusz leszek (leszek-skynet) said :
#11

the data is NOT lost when you unmount.

Can you help with this problem?

Provide an answer of your own, or ask Nayef Copty for more information if necessary.

To post a message you must log in.