LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Distributions (http://www.linuxquestions.org/questions/linux-distributions-5/)
-   -   How to boot two distros (redhat,Ubuntu) from a single drive (http://www.linuxquestions.org/questions/linux-distributions-5/how-to-boot-two-distros-redhat-ubuntu-from-a-single-drive-502059/)

bangoram 11-15-2006 10:11 PM

How to boot two distros (redhat,Ubuntu) from a single drive
 
I was trying to boot Redhat and Ubuntu from a single hard disk, I have few exposures about editing Grub(in our case both the distros use the grub boot loader).I also googled and mean while came accross few threads still I am not convinced with the way they have explained.I have an 80Gb hard disk first I installed Redhat(all three /boot,swap,/)partitions were created and the installation was also done.Later I thought of installing Ubuntu again(dual boot) rebooted the machine with ubuntu installation CD I tried installing ubuntu while creating partitions I have created an extended partition but I am not sure whether I am supposed to create a Swap partitions for the second distro or not(in few threads I also read a single swap can be shared between two distros??),I haven't created boot partition, I have created a root partition..can anyone direct me to get this job done... I just need these two options(Linux1,Linux2) while booting..
My device(harddisk) was specified as 'hda' and the partitions were identified as hda1,hda2,hda3 so on...

shaman66 11-16-2006 02:51 AM

Both distro's can share Your swap partition.

I have 2 distros.
They share /home partition and swap.
They only need separate partition for root filesystem.

Ubuntu doesnt need a /boot partition. / is enough :)

GNUlancer 11-16-2006 06:19 AM

GNU/Linux (as well as many UNIXes) is a modular system. You can mix those distributions as you wish, just check there is no program crashes while booting mixed systems. I'm not using GRUB (although i'm thinking of). Try to use LILO for the first time. You surely have it in one of your distribs. It's stupid, but rather simple to start using.

GNUlancer 11-16-2006 06:35 AM

First, LILO requires a kernel (Linux) to boot. You probably should use one kernel for redhat and the other for ubuntu, since they are built to match specific distro's configuration. You can find the kernel file in the /boot directory. It's name is usually 'vmlinuz' or 'linux-blahblahblah' or like, and it usually has size about 2M. Find both redhat and ubuntu kernels and place them...

GNUlancer 11-16-2006 06:53 AM

... on your /boot PARTITION. It's not mandatory, but if you have a small partition at the start of the disk, its comfortable to use it as /boot for all your distros and as a booting partition, too (the same as 'active' partition. It holds the second part (of two) of most operating system loaders, such as LILO or ntloader (for winblows). So you copied your kernels here...

GNUlancer 11-16-2006 07:01 AM

... Now you want LILO to recognize them as well as setup other parameters for dual booting. Look up to your /etc/lilo.conf files on both distros. If not found any, we'll create it from scratch. It's easy. If you'll find any etc/lilo.conf, post it here. Then we proceed.

Merlin Whitewolf 11-16-2006 09:39 AM

Dualing booting two distros isn't difficult. It requires a little effort in setting them up, but that is do-able.
First, you need the partitioning set up so that the layout will not be confusing (this is for you [before coffee mornings and such]). For Redhat or Fedora, you can use a '/boot' partition, a '/' (root) partition (you can combine these into one '/' partition), a '/usr' and a '/home' partition. You may add '/var', '/usrlocal', etc partitions, also. Ubuntu will accept a '/' partition that combines the others, but you should have a separate '/home' partition. You can share a swap partition between them.
The layout I'd recommend is --
'/boot' 900mb (Redhat)
'/' 5 or so gb
'/usr' 3, 5 or more gb (depending on the size and number of apps you intend to install)
'/home 20 to 30 gb
'/swap' 2 gb (As you're sharing this between 2 distros, the size should be a match for your ram, or better. The placement between the two layouts is to clearly dilineate the boundary between the distros.)
'/' 15 gb (Ubuntu) (a 'monolithic volume' of other partitions as well as '/')
'/home' 20 or so gb
(Note that you should use separate '/home' partitions for each distro. You configuration files are on your home partition and may be different in each.)
The exact amount of space that you use for each partition is up to you. Just remember that too small a partition will leave you with not enough room for addition/updating.
(I use the GParted liveCD for editing my partition tables.)
Second, choose a bootloader. As grub is used by both of these distros, you may want to go with that.
Third, install the secondary distro first and install its bootloader to its '/boot' or '/' partition. Install the primary distro and install its bootloader to the MBR (master boot record), and when its configuration options come up, be sure you add an entry for the secondary OS.

This will give you a dual booting system. There are other ways to accomplish this, but this is, I think, the easiest and surest way to accomplish the goal.

Merlin

bangoram 11-16-2006 10:48 AM

Thanks a lot! I have started working on this I will get back if I face any problems..

GNUlancer 11-16-2006 11:08 AM

Actually, you can set up any distribution (at least after installing) to use any partition layout -- 1, 3, 128:) mount points - doesn't matter. You even can have your 2 (3, 4, 5, ...) distros on 1 partition if you want so. Cause it's Free Software -- you're free to choose what you need.


All times are GMT -5. The time now is 02:01 PM.