LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Separate root directory = easy re-install? (https://www.linuxquestions.org/questions/linux-newbie-8/separate-root-directory-%3D-easy-re-install-855218/)

psuliin 01-09-2011 02:23 PM

Separate root directory = easy re-install?
 
Hi, all! I've installed Linux with a particular setup, and I'm interested to know if I can do with it what I think I can.

I'm dual-booting Ubuntu 10.04 with Windows 7. Windows came pre-installed on the machine. When I began to install Ubuntu I discovered that Windows actually uses three partitions: the "main" partition and then two boot partitions (one for Win7 and one for Vista, of all things). So I installed three logical partitions for Ubuntu: /, swap, and /home.

My understanding is that keeping my / and /home partitions separate will allow me to re-install more easily. My impression from reading up on this is that my data will sit safely on my /home directory while I install Ubuntu or any other Linux distro to root. So if I want to experiment with something other than Ubuntu (on a more long-term basis than a LiveCD) I can easily do so.

My question is: is this correct? Can I swap distros or re-install a damaged distro easily with this arrangement? Are there any pitfalls I need to watch for?

Thanks for any and all advice!

EDDY1 01-09-2011 02:30 PM

These 2 are quite informative and easy to understand.
http://www.dedoimedo.com/computers/grub-2.html
http://www.dedoimedo.com/computers/gparted.html

brianL 01-09-2011 02:36 PM

Yeah, having a separate /home partition would help if you had to reinstall Ubuntu. But other distros have a different layout within /home/username, some different sub-directories. So, I'm not sure what happens then. I've only every created / and swap partitions.

salasi 01-09-2011 03:49 PM

Ignoring the windows partitions, using /, /home and swap does generally simplify things when installing a new version of the same distro. I haven't actually tried this with an overwrite of one distro with another, but I don't see why it shouldn't work (SuSE, which is my usual poison on the desktop, uses .kde4 for the setup for KDE 4 (!), while many others use .kde (...which in SuSE terms is deprecated, because that's for KDE 3, which you might also have installed) and it seems to me that the only danger here is that you end up with an unused but unharmful directory structure. Not an issue, unless you are very short of disk space.

It is possible that you could choose a file system format for /home not supported by the new distro (say something old like reiser 3, or obscure like YFFS2, or bleeding edge like BTRFS) but that wouldn't put you in a worse position than not having a separate /home, because a clean install would only be one quick partition format away. Obviously, that would mean losing the data on the /home partition, though.

If you were going to multiboot different Linux distros (which I know isn't your question, but is related), I'd advise something different, though. Let each distro have its own /home data structure and have another partition on which you store your document data (as opposed to all of the /home structures which just keep the various dot directories, and which needn't be actual partitions). That way there shouldn't be a danger of any distro messing up another distro's dot files, but you still get to share personal data between distros.

Soadyheid 01-10-2011 07:52 AM

I used to set my system up with /, /usr, /home & swap. The /home partition was particularly useful when I changed from Mandriva to Ubuntu as I just did a custom partition job and left / home alone. The other partitions (except swap) would be re-formatted before the install and I was then able to access my original data/documents/pictures/ etc.
However... when I started playing with VirtualBox I soon discovered that the virtual disks relating to the virtual systems resided under / and that partition soon filled up as I hadn't given it much capacity! :( I tend to stick to / and /home now on my desktop but just / on my netbook.
I reckon there will probably be some residual dross from the previous Distro in my /home directory but it does what I want. :)

Play Bonny! :hattip:

nocountryman 01-10-2011 08:00 AM

my preferred is /,/home and swap and also /data. /data or whatever name you prefer is for storing all the personal data (pics music and etc). this way in case something happens during reinstall and home MUST be formated my data will be intact.

psuliin 01-20-2011 05:16 AM

Thanks, all! It looks as though the setup I have is useful but not universally so. Which is what I needed to know!


All times are GMT -5. The time now is 01:42 AM.