How to boot two distros (redhat,Ubuntu) from a single drive
Linux - DistributionsThis forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on...
Note: An (*) indicates there is no official participation from that distribution here at LQ.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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...
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.
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...
... 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...
... 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.
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.
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.