LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   how to partition for several distros (https://www.linuxquestions.org/questions/linux-general-1/how-to-partition-for-several-distros-532941/)

bricedebrignaisplage 02-27-2007 10:17 AM

how to partition for several distros
 
Hi

I am happily running Ubuntu Edgy. However I am curious about other distros and would like to try some.

One friend once told me that I should have one partition for /boot, one for /home and one / for each distro, plus some others for data... In this way I would keep my program settings when moving from one distro to another (i.e. bookmarks in Firefox, mail archives, ...). This sounds reasonable at first glance, but then I am wondering if these settings are identical for one distro to another. And in the /boot partition, what if the kernels overwrite one another? My kernel is called vmlinuz-2.6.17-11-386, nothing mentions that it's for Ubuntu (I am wondering if it would run with another distro).

Of course I could simply have one single partition for each distribution, with /boot and /home one the same partition, and one of them bootable with grub installed on it. But then I would have to reenter all my settings and data, not talking about mail archives and so, thus making it uncomfortable to switch from one distro to another.

I am sure many people are running several distros at the same time: diversity is one of the pillar of the Linux world. Therefore I am sure there is a nice solution. Any advice?

Brice

Larry Webb 02-27-2007 10:31 AM

I'm not sure anyone would suggest doing it your way. The reason most people use different distros is for different looks and different setups, such as browsers, desktops, etc. I run three different distros but use one only to do my domestic work and internet work. The others are as you suggest for experimenting, fun, and to educate my self. I even went so far as to put in a second hard drive to isolate the fun from the safe as much as possible

b0uncer 02-27-2007 10:42 AM

I don't see much point in having multiple distributions on one computer, as long as only one of them can be run at a time. But then again, I'm not one of those who have too much spare time to experiment with 100+ Linuxes and reboot every other minute :)

I imagine that if I wanted to install several distributions, I would create

- 1x /boot
- 1x /home
- Nx / where N is the number of distributions I install

Then I'd use /home as every distribution's home directory (would not format during install), and /boot too (same thing, except that I would only install the first distribution's bootloader and skip that with the others). That shouldn't be problematic. The problem, however, would be like you said -- kernels overwriting each other. This could be solved various ways, one way being the manual (or scripted) renaming of the kernels; one can easily manually rename the kernel files in /boot and then just edit bootloader's config to point to correct files. Actually it became even more easier to use symlinks, so during upgrade one would only need to rename the kernel in one place. It shouldn't be that bad, because (at least on binary distributions) kernels are not upgraded every other day (not on those I use, anyway) for nothing, and when they are, it doesn't take long to do some renaming. If you compile the kernel yourself, you can do it during the process.

I haven't thinked of this too much, but it might be possible to only have one kernel for all the distributions too; that way having the newest kernel would be easy (though you might have to drop off automatical binary updating of the kernel, if the distributions used different methods/programs for that); in the bootloader config you would then just point to the correct root partitions. No idea if that actually works, but then again, no idea why it would not. If you like to use common partitions for /home and /boot to save space and effort, why not do the same with kernel -- why have three or four separate kernels of the same version when you can only have one that works for sure?

jschiwal 02-27-2007 11:02 AM

The kernel version issue might be valid if one distro's kernel is compiled with different versions or has special patches applied. Even if initially the kernels use different versions, after a security update it would be possible that there could be an overlap. But if that were to happen, the replaced kernel may operate without causing any problems. I bet that the initrd file would be another story however. That is because each distro will have a different linuxrc script in the ramdisk image. Also, one distro may be configured with a certain module in the initrd file and if the second distro replaces initrd you could end not loading a needed kernel module. Also, you would need to remember to always run lilo or grub-install from the same distro. You don't want a dueling distro's syndrone.

Sharing /boot would make sense if you compile your own kernel, and use it to boot the various distros. ( Unless one of them has a 2.4 kernel, in which case you wouldn't have an overlap. )

Share a /home partition does make a lot of sense. It would work out better if you had a separate directory in /home for each distro, even if the UIDs are the same. Many of the differences between distros is in the way KDE or GNOME are setup. You can have the same username and uid, but rename the home directory and edit your entry in /etc/passwd. For example, consider /home/brice_ub for an Ubuntu install; /home/brice_fc for a fedora core install and /home/brice_su for a SuSE install. Then change the home directory field in home directory field for each user entry in /etc/passwd.

Fedora Core, Mandriva and others start regular UIDs at 500, while SuSE starts them at 1000. If you want to access files from each distro you install, then you need to use the same UID for each distro installed.


All times are GMT -5. The time now is 05:04 PM.