On ubuntu installation, if I recently selected the manual option so I could control which partition I was installing to. I noticed that when you add a mount point, you don’t just have to mount / there - you can also mount /boot, /home and so on. How does it work if say, I mount /boot to sdb1, /home to /sdb2 and / to sdb3? would / include links to sdb2 and sdb1 in place of home and boot? What is this for?
JUst out of interest. Thanks
Then everything you drop in your home directory would get written to the sda2 partition, (stage 2 of) the GRUB bootloader and config files would be written to the sdb1 partition, and everything else would be written to the sdb3 partition.
But to you as a user, the directory hierarchy appears as it does now, everything just starts from /
(ie. you’d still browse to /home/username, but whatever you save there would be saved to a separate partition)
That would allow you to format the / (sdb3) partition, maybe for a new distro, without loosing the ability to boot other OS’s and without loosing what’s in your home folder.
That’s the whole point of unified file systems… anything can be mounted anywhere… a partition just becomes a directory that’s a branch of the main directory tree.
Windows drive lettering sucks. … Try moving C:\Windows\System32 to another partition or drive, and see how far you get
In Linux, “technically” you could even have it on another PC on the network.
The difference is…
In Windows a partition is treated as a separate entity, with its own root.
In a unified file system, a partition is just a folder attached to the main directory tree, that starts in the / partition.
Think of it like this… In Windows, add another partition, and you have 2 separate directory trees.
In Linux a new partition is just mounted as a new branch on the main tree.
Does that make sense ?
If I didn’t explain it too well, maybe this will help:
http://www.freeos.com/articles/3102/
I see - very useful
So does that mean that I could dual boot two linux distros without having to maintain two separate home directories? To do this, I guess I would have to tell the installation process to use sda2 as home but to leave what’s already there intact - is that possible?
Nearly… In reality the /home/username folder tends to contain a lot of hidden directories for your accounts desktop and application configuration files… so if you had the same account name is both distros you may run into config issues.
(if you want to see this, open your home folder, and hit Ctrl+H to display the hidden files and folders)
As long as the desktop and application configurations were the same (or close enough), you may get away with it… but even then you’d probably run into issues with different versions of the same application both trying to save their configs in the same place.
To achieve what you mean… better to just mount (or share) the /home/user/Documents and /home/user/Videos etc.
But it would allow you to do a “fresh” install of a newer version of the same distro without loosing your files and configs.
And as I said there is nothing to stop you creating a partition for “Documents” and mounting that as /home/username/Documents on both OS’s etc. … though you would want to make sure the User ID’s were the same… there are of course (as you would expect in Linux) multiple ways of achieving the same thing.
thanks, that would be quite neat…