Logo 
Search:

Unix / Linux / Ubuntu Answers

Ask Question   UnAnswered
Home » Forum » Unix / Linux / Ubuntu       RSS Feeds
  on Dec 18 In Unix / Linux / Ubuntu Category.

  
Question Answered By: Adah Miller   on Dec 18

When you install multiple OSes many things can go wrong or produce unintended
consequences. What is supposed to happen is the the last OS installed will
detect previous OSes and provide the right configuration for each. However,
there is lots of room for error.

Sometimes the OS is not detected. This is often due to flags being not properly
set to boot. Sometimes it gives the wrong drive. This is due to different way
that the BIOS and grub handle the drives. Grub uses relative locations and the
BIOS goes by physical location as determined by the cables or jumpers. Also grub
uses ordinal numbers, counting zero as the first drive or partition. To top this
off you need to write the boot loader to the proper drive or everything is
messed up. There is so much happening that it is easy to make mistakes which are
usually human.

There are several possible places to write the boot loader. If you have more
than one drive this complicates the process. It usually writes to the boot
sector of the drive on which you installed the Linux partition. In this case
that drive becomes hd0 and the other one will be hd1. However, the hd1 drive may
actually be the one that boots according to BIOS settings. If this happens then
grub will not work. You can change your BIOS or edit grub so that grub loads
properly. It is usually easier to edit grub.

You can also have more than one grub, for example, one on each drive. Or you can
write to one of the partitions such as hda1 instead of hda. This can get
extraordinarily complicated unless you keep your wits about you as you are
installing Linux. If you just install willy nilly without paying attention you
can end up with a mess which is not the fault of Linux, but your own. Problems
occur when you try to do complicated things such as install four OSes and don't
understand fully what is happening.

To resolve problems with grub you need to try booting each drive separately. In
my BIOS (HP) I can press escape and choose my boot drive. If you can't do this,
then you will have to enter your BIOS and if necessary turn off one drive or
change the boot order. Do this for each drive and see what happens when you
boot. If you have more than one grub you will see different grub selections.

Once you know what is written where on your drives you need to edit grub so that
it works. To do this you need to make temporary changes and write down what
happens. Once you get it booting right you edit the /boot/grub/menu.lst file to
make the changes permanent. More on this after you sort things out.

The kinds of changes you will want to make are to change the numbers to the
line in grub with the hard drive and partition.

Here is a typical grub entry:

title Ubuntu 8.04, kernel 2.6.24-16-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-16-generic
root=UUID=e139185a-6e69-4717-b1d1-b87ce539ac06 ro quiet splash
initrd /boot/initrd.img-2.6.24-16-generic
quiet

You will want to play around with the numbers in the line: root (hd0,0). If you
change the first number to hd1 it will select the second drive. If you change
the second number following the comma, it will change the partition number,
depending on the number of drives and partitions that you have. So hd0,0 is the
first partition of the first drive while hd1,1 is the second partition of the
second drive. Remember the actual number will be one less that the number that
you have since we are counting from zero.

To temporarily make the changes when the grub screen is shown move the cursor to
the OS that you want to boot. Press e for edit. Move the the line that says root
and press e. Make your changes and press enter. Then press b for boot. Write
down what you tried. If it works then you will want to make it permanent.

More on grub here:http://www.tuxmachines.org/node/16701How to edit menu.lst:boff.wordpress.com/.../editing-bootgrubmenulst-to-change-the-grub-\
boot-menu/If you are using Lilo someone else will have to help as it isn't as user
friendly and I haven't used it since I dropped Mandrake five or six years ago.

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on about UBUNTU installation Or get search suggestion and latest updates.


Tagged: