LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-10-2006, 02:16 AM   #1
ServalSoft
Member
 
Registered: Nov 2003
Distribution: mandriva pwp 2010
Posts: 74

Rep: Reputation: 15
Bootloader with 3 or more OS


I am trying to install Win and 2 flavours of linux onto the same harddrive. my problem is installing the bootloader in order to choose which OS to load. As what tends to happen is when installing it, the later tends to erase the previous. Is creating a separate small partition to install all bootloaders on likely to fix this problem??? PS i do not have a floppy disk as i did think this could have been and option. I am using a laptop. Compaq presario 2500 series

Thanks
 
Old 03-10-2006, 02:46 AM   #2
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 54
Quote:
Is creating a separate small partition to install all bootloaders on likely to fix this problem???
Not by itself...
Make a small partition to be your /boot partition.
Then, when installing the different OS'es, mount this partition to /boot on the OS you are just installing.
Actually you only have to do the "install bootloader" once - and for the others just skip the "installing the bootloader" step.
Instead, add the OS manually to the - after the first install already existing - grub-configuration file.

This applies if you are using grub, if you use lilo this is a little different and not as easy to manage, because lilo has it's config-file in /etc/lilo.conf - but this can be changed...grub is easier.
Install Windows first, because it WILL overwrite the MBR in any case. After you installed the first linux, you can boot to Windows again using grub.
 
Old 03-10-2006, 03:00 AM   #3
ServalSoft
Member
 
Registered: Nov 2003
Distribution: mandriva pwp 2010
Posts: 74

Original Poster
Rep: Reputation: 15
?????

So if i got it right, what I need to do is:
# Install Win
# Create a partition for my boot loader, labeled /boot
# Install my first linux OS, and install grub on to /boot
# Install the 3 rd OS n skip the bootinstall option
# add the boot manualy onto grub.

Now the question is, how do I add that option manually onto grub.

Thanks
 
Old 03-10-2006, 03:16 AM   #4
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware 14.1 (32 and 64 bit)
Posts: 1,594

Rep: Reputation: 125Reputation: 125
Another solution is to use xfdisk (http://www.mecronome.de/xfdisk/index.php) and install it in the windows partition -- I guess it's your first primary partition. Then install Grub or Lilo to the superblock of the Linux partition (for example /dev/hda2). It is able to boot Linux and *BSD systems.
 
Old 03-10-2006, 03:19 AM   #5
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 3,031

Rep: Reputation: 539Reputation: 539Reputation: 539Reputation: 539Reputation: 539Reputation: 539
You do have to mess around a little to do this. You need to install MS Windows first. You need partitions for each os. You do not need a seperate partition for the boot loader. Do not make the Windows partition the first partition. You can use a partitioning utility like Partition Magic to make the partitions. You can boot PM from the CD. I don't think there are any linux utilities to make NTFS formats. At worst, you can use a live linux cd to make all the partitions, and let MS Windows format its own partition. What I do is make two small primary partitions for the two linux installations, say five or ten GB each. A large install of linux uses about five GB, but you really need about eight GB for future expansion. Then I make an extended partition and make logical partitions inside of it for linux swap, about 1 GB, partition for MS Windows, and a partition for linux /home. That way, if you want it different later, you don't have to wipe out /home and MS Windows.

When you partition, you assign mount points. Every partition needs a mount point, unless you use PM. You can only make one partition root, so choose the first partition. Assign some random mount point(make one up, like "local") to the other primary partition, and when you install the second linux you can make it another root partition.

Install windows in the logical partition you made for it. Just tell Windows to go there in setup. Windows will put boot loader files in the first primary partition, and the rest of itself in the logical partition.

Now, install the first linux. This will go in the first partition you made, the first primary partition. There should be a place in the install program where you can specify to use the logical partition "/home" as /home. Linux won't always do this right, and you have to actually check it is using the partitions the way you want. Ok, let it install.

Now, the problem with the second linux is that it wants to use its own /boot/grub/menu.lst file, and it fails to retrieve the entries from the the one in the first linux install. So, when you boot after the second linux install, the first one doesn't show up anymore. Boot the second linux. Take everything in the first linux /boot/grub/menu.lst file, and everything that isn't in the second /boot/grub/menu.lst file must be added. That is usually one entry, for the first linux. Then everything will show up on the boot menu. The idea is you can only use one /boot/grub/menu.lst file, and everything has to be in that file that you want to boot.

When you installed the first linux, grub relocated the MS Windows boot loader to the Windows partition, and made a pointer that grub uses to find it. Grub took over the MBR, and controls it. Windows is all gone from there.

Here are some sample menu.lst entries:

title linux 1
root hd(0,0) or (hd0,0)
kernel /boot/<kernel-2.6.8-xyz> options(i.e. acpi=off root=/dev/sda1)
initrd /boot/<initrd-2.6.8-xyz>
savedefault
boot

title Windows 95/98/NT/2000
root (hd0,3)
makeactive
chainloader +1
 
Old 03-10-2006, 03:29 AM   #6
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 54
Looks quite right
Maybe clear up a possible misunderstanding right here.

When saying: "grub is installed" there can be two different meanings to it.

When the grub-package is installed - like any other on the system - some files get copied to some places.
In the case of grub: the binary goes to /sbin/grub and the other files go into /boot/grub (the stage... files and the config file.

after this is done, you can "install grub" to the MBR - this is what the command:
Code:
grub-install /dev/hda
does.

So - you need to install grub to MBR - not to /boot

Only its files need to be in /boot - which translates to the partition you made, mounted to /boot

If you would do this multiple times - you would end up with the last distributions grub-files and with a configuration-file wich only has one entry - the last one...
You can still do it this way - but in the end you need to edit the configuration-file to have entries for all systems.

And for convenience - copy all the different kernel-images to /boot, and give them distinguishable names - but this should not be neccessary, when the partition was mounted to /boot during every OS install.
 
Old 03-12-2006, 07:30 AM   #7
ServalSoft
Member
 
Registered: Nov 2003
Distribution: mandriva pwp 2010
Posts: 74

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by titopoquito
Another solution is to use xfdisk (http://www.mecronome.de/xfdisk/index.php) and install it in the windows partition -- I guess it's your first primary partition. Then install Grub or Lilo to the superblock of the Linux partition (for example /dev/hda2). It is able to boot Linux and *BSD systems.
Ive tried to download that program but it doesnt work when i install. If i download a boot manager like osl2000, install it on to win, then install linux and install their bootloader onto the superbook ie /dev/hda2 or /dev/hda3, will this solve the problem. thanks
 
Old 03-12-2006, 08:26 AM   #8
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Quote:
Originally Posted by ServalSoft
So if i got it right, what I need to do is:
# Install Win
# Create a partition for my boot loader, labeled /boot
# Install my first linux OS, and install grub on to /boot
# Install the 3 rd OS n skip the bootinstall option
# add the boot manualy onto grub.

Now the question is, how do I add that option manually onto grub.

Thanks
You do not need a separate partition for /boot, although many people do it.

grub goes in the mbr---not in /boot. This is taken care of automatically when you use your Linux installer.

When setting up multi-boot with Linux and Windows, I suggest having a data partition--formatted FAT32. this is easily accessible by both OSes.
 
Old 03-12-2006, 06:24 PM   #9
ServalSoft
Member
 
Registered: Nov 2003
Distribution: mandriva pwp 2010
Posts: 74

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by pixellany
You do not need a separate partition for /boot, although many people do it.

grub goes in the mbr---not in /boot. This is taken care of automatically when you use your Linux installer.

When setting up multi-boot with Linux and Windows, I suggest having a data partition--formatted FAT32. this is easily accessible by both OSes.
I do understand that grub goes straight in the MBR. but I dont want that. im using a laptop with no floppy and would like to be able to have 3 or more OS on it. When i install the second OS it works no problem, but if i would like to install the 3rd one, then everything gets erase and i can only see the windows and last linu partition. I would like to be able to have something like a menu that give me a choice to select which OS i would like to boot. and im not to sure either on how to manipulate the grub config file or manually change it.
 
Old 03-12-2006, 08:49 PM   #10
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 54
You can do this in lilo without difficulty. I multiboot 4 OSs (it would be more but I don't have enough HD space) including Windows and 3 linuxes.

Install lilo in the MBR. In your config, just define all the OSs you want to boot. As somebody pointed out, install Windows first, in the first partition.

See the last post in http://www.linuxquestions.org/questi...d.php?t=420172

There are beaucoups threads on this topic already.
 
Old 03-12-2006, 10:54 PM   #11
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Not really clear on what you are saying...

First, there must be boot code in one of 3 places: floppy, CD, mbr of drive 1. If you don't want grub in the mbr, where were you going to put it?

When you installed the 3rd OS, did you have empty space on the drive? Did it make new partition(s) during the intstall? If you say that everything got erased, tehn you likely took an existing partition and gave it to OS #3.
 
Old 03-13-2006, 12:57 AM   #12
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 54
Quote:
...im not to sure either on how to manipulate the grub config file or manually change it.
The file is located here:
Code:
/boot/grub/menu.lst
here you add the OS's you have installed - look at it and edit it with any editor you like.
The structure is simple:
-a title line
-a kernel-line which describes, where the kernel is, what its name is, where the root filesystem (the OS...) is which you want this kernel for
-maybe a third line for a initial ramrisk - some distributions use one.
Grub needs to be in MBR, if there is no bootloader there, the machine simply does not boot.
Quote:
but if i would like to install the 3rd one, then everything gets erase and i can only see the windows and last linu partition
nothing gets erased - maybe the menu.lst is overwritten by the new installed OS - if you do not skip the bootloader-installation step as I suggested.
The easy fix is: edit the file and put the entry for the OS back in.
Everything else has been said.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows 2000 Bootloader vs. Mandriva LILO Bootloader Dregnan Mandriva 7 12-03-2007 09:55 PM
Regarding bootloader coolgoose85 Linux - General 4 01-13-2006 08:06 AM
How can I disable the grub bootloader and enable the lilo bootloader? abefroman Linux - General 1 08-06-2005 08:53 AM
I need create bootloader. How make bootloader? swipple Fedora - Installation 3 01-23-2005 12:22 PM
bootloader paulr1984 Linux - Newbie 4 05-17-2004 01:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration