LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Dual boot two linux distros (https://www.linuxquestions.org/questions/linux-general-1/dual-boot-two-linux-distros-564582/)

JosephS 06-26-2007 08:20 AM

Dual boot two linux distros
 
I would like to be able to boot two Linux distros:I plan to install Slackware then Debian on the same hard drive.

Do I need to remove the boot loader from Debian?
Do I make both / partitions bootable?
Appreciate any advice.

Thanks

Wp2 06-26-2007 08:58 AM

If you have a floppy drive the easiest way is to keep your favorite in the mbr and then add as many distros as you like with a boot floppy for each addon. Without a floppy drive each distro you add will easily delete the previous mbr setting.
I've not really understood the bootable flag as the boot loaders can boot them anyway so I usually just have the primary partition set as bootable.

pixellany 06-26-2007 09:08 AM

The link below will take you to an article on booting. It links also to one of Saikee's posts (he is the super-guru on booting)

pixellany 06-26-2007 09:10 AM

Quote:

Originally Posted by Wp2
If you have a floppy drive the easiest way is to keep your favorite in the mbr and then add as many distros as you like with a boot floppy for each addon. Without a floppy drive each distro you add will easily delete the previous mbr setting.
I've not really understood the bootable flag as the boot loaders can boot them anyway so I usually just have the primary partition set as bootable.

Linux (GRUB at least) does not use the bootable flags

justsimran 06-26-2007 01:47 PM

well,, why we r making this booting process soo complex,, i guess u can easily dual boot 2 different distributions on one hard disk,, u dnt need to remove the MBR(of previous),,, just install it frm the cd,, but u have to remember the partions which u r getting rid of,,i mean,, in this case,, u will be having 2 root partions..

take it like tht jos..u r installing windows,, windows also has its own root partion which is its C drive,, linux take it as "fat" partion,, so now the difference is instead of "C" u have "/",,,

i guess go for it,, u will be fine!!:)
and yes for sure,, u have to make both of the partions (root) bootable ,, when u r starting ur system!!:)

saikee 06-26-2007 03:58 PM

There is no need to touch the directories or the partitions of the two distros.

Every operating system operate inside its own partitions and doesnot interfere with "/" in other partitions. If the "/" of sda5 is mounted it will be known as /mnt/sda5 or /media/sda5.

Each partition, except for a few odd one, has a boot sector to accommodate the boot loader. So there is no need to nude any one.

If you install the boot loader in the root partition of a Linux it becomes "chainloadable", meaning you can boot it as a Windows by another boot loader.

Therefore the easiest life in dual boot a Debian and a Slackware is to install the boot loader of Debian in the MBR and the one in Slackware in its root partition.

If the root of Slackware is sda6 then it will be bootable by Debian's Grub by these lines in its menu.lst
Code:

Slackware in sda6 known to Grub as (hd0,5)
root (hd0,5)
chainloader +1

The same technique can be used from the 3rd to 200th Linux if you have enough hard disks. If you do not believe it take a look at my signature.

j0hnnyb0y 06-27-2007 11:23 PM

If you don't mind installing Ubuntu you can have more than two distributions easily and automatically put on the MBR. Just install Ubuntu last and it will pick up any windows and any other Linux ditrobution. At least this has been my experience. As always back up all important information on your hard drive before installing another Operating System. For me that is no big thing. I don't leave anything on my hard drives which is important without backing it up. Hard drives sometimes die on their own or sometimes people accidentlly delete important files. So if something is important, back it up.

saikee 06-28-2007 02:14 AM

It may not have been said often but it is "the duty" of a Linux installer to check every partition for a boot loader in the boot sector and include that partition as a booting choice if one is found.

Every MS system from Dos to Vista has the boot loader in its boot sector (because everyone of them expects to be the only system in the "C" drive) and that is why Linux can always dual boot a Windoze without the user lifting a finger.

If one installs say 10 distros one has 10 boot loaders installed by default but there is only one MBR so one can only nominate any of the 10 boot loader to take over that position. The remaining 9 boot loader should therefore be installed in their respective root partitions. Then the last Linux will be able to pick out all of them for booting.

The Debian family, to which Knoppix and Ubuntu belong, is pretty good in automatically arranging multi-booting. I have several times got it compiling a menu.lst with over 100 choices for me and that was as early as the Woody and Sarge versions too.

JosephS 06-30-2007 08:18 PM

Dual boot two linux distros
 
Thanks.
I found that out. I installed Slackware after I partitioned the hard drive and then installed Debian in the MBR and it detected Slackware.

It lists Slackware 3 times in the menu; I don't know why that would be. Maybe I didn't partition the drive properly.

JosephS 07-03-2007 09:24 PM

Can I do a dual install with both distros using the same /home and swap space? This way I could save my files once and use them on either distro.

AceofSpades19 07-03-2007 09:37 PM

Quote:

Originally Posted by JosephS
Thanks.
I found that out. I installed Slackware after I partitioned the hard drive and then installed Debian in the MBR and it detected Slackware.

It lists Slackware 3 times in the menu; I don't know why that would be. Maybe I didn't partition the drive properly.

They probably boot slackware with different options

saikee 07-04-2007 02:17 AM

JosephS,

In any Linux installation the swap if exists will be used by the installer and you wouldn't be able to create another swap unless you force the installer to do it. I have one swap for every Linux I installed.

The /home can be common but it can be a bad idea because your desktop settings are also stored there as hidden files. Thus using the same user name with same ownership settings means you have one desktop setting for every distro which all has its own way of presenting the desktop. You will therefore run into conflict problems finding the setting being changed or disappeared when operating different distros.

JosephS 07-04-2007 06:29 AM

Would it cause conflicts if I'm using Slackware and mount hda8 (/home on Debian) to access files; or mount hda5 (/home on Slackware)when using Debian?

saikee 07-04-2007 10:59 AM

JosephS,

Don't think you got a problem here if you "DO NOT" mount any partition as the /home in any Linux and log in with a username corresponding to the embedded settings inside.

It is your God-given right to access any partition, originated from either inside a Linux or outside from another system like Windoze, by mounting it as a non-system partition, say in /mnt or /media partitions.


All times are GMT -5. The time now is 12:13 AM.