-   Ubuntu (
-   -   Can I delete and reinstall Ubuntu 8.04 and keep a home partition? (

win_to_lin_migrant 01-14-2009 11:07 AM

Can I delete and reinstall Ubuntu 8.04 and keep a home partition?
If I want to remove/reinstall Ubuntu 8.04 and still keep a home folder in a dedicated partition in tact what would be the simplest method? Can I just reformat the root and swap partitions then reinstall? I assume that only partitions that are empty and formatted will be used by Ubuntu when I reinstall, is this correct? Will I have to manually assign the root and swap folders to empty partitions on my HD?

I have read that having the home folder in a separate partition would make reinstalling Ububtu easier because I would be able to keep my settings. Since I haven’t installed Ubuntu yet I’m not sure what these “settings” are that I would keep in tact. I do know that my personal files live in the home folder so that would save some labor when I reinstall the OS. Before reinstalling I would of course back up all my files in the home folder.

Please note that I am talking about a dual boot situation with Windows 98 where I would remove and then reinstall Ubuntu. I am new to Linux. Thanks.

repo 01-14-2009 11:30 AM

Boot from the cd, and do the manual partition, so you can keep the desired partitions, and reformat the others
make sure you know which is the home partition :-)

lurko 01-14-2009 11:33 AM

Firstly, make sure you know exactly which partition is which, by their device names (eg /dev/sda1 etc). When you get to the partitioning step of the installer, you have to choose the manual method.

Start with the root partition, look for the "use as" field, and select the filesystem you want to use. If you choose the same filesystem as what's already on the partition, you get the option to format or not format. Every partition aside from /home should be formatted in this case. Then you need to select the mountpoint, there should be dropdown menu with all the UNIX hierarchy directories on it. Select / and move on to the next partition. If you like, you can tweak the mount options also, I like to add "noatime" personally.

For /home, you need to make sure you select the same filesystem as the one which your /home partition is already formatted with. For formatting, you need to make sure you select "No, keep existing data". Then select /home from the mountpoint dropdown. Again, mount options are up to you, but generally noatime is the only one you should consider bothering to enable.

If you have an existing swap partition and don't want to change it, you can just ignore that partition's entry, it will be automatically formatted and used as the default swap partition.

Once you're ready, the next screen will give you summary of the changes, which partitions will be formatted, with which filesystem(s), and which will be used as-is. If there it says it's going to format your /home partition, make sure you go back and do not proceed. It's all pretty straightforward if you know the least bit about device names, mountpoints, and filesystems.

Good luck, though you shouldn't need it.

win_to_lin_migrant 01-15-2009 08:42 PM

Thanks Lurko. That’s just what I was looking for. Your reply is as good as a tutorial. Plus you even threw in a performance tip.

I looked up atime and it does seem like something I could definitely do without. IIUC I read that Ubuntu uses something called reltime. In this article they say ”earlier in the thread it was claimed that Ubuntu is now defaulting to noatime+nodiratime, and has done so for several months.” If this is true (and I have no idea if it is or not) then why would we need to set noatime manually? This is all way over my head so if I don’t hear back from you I’ll just set it manually as you suggested. Thanks.

lurko 01-18-2009 01:56 PM

Glad I could help :cool:

I suggested noatime because I had no idea that the Ubuntu installer would set it automatically. I'm quite certain there won't be any problems if you enable the options manually, but clearly it's not necessary for those options (at least with Ubuntu).

After installation, you can check what options are being used(and change them if you like) by reading the file /etc/fstab. The fourth field (fields are separated by white space) on each line contains the mount option(s) for that line's filesystem. Multiple options are comma separated, you should see something like noatime,nodiratime for your / and /home partitions, assuming both options are being used. If they're not present you can add them yourself, if you care to do so.

You can look at the fstab and mount manpages for more details on the fstab file and the mount options for various filesystems. I wouldn't bother looking at the mount manpage until you actually need to know about a specific filesystem's mount options though, unless of course you'd find it interesting or educational.

All times are GMT -5. The time now is 03:43 AM.