Re: A new approach to GRUB problem; Was: Re: [Hampshire]Cont…

Top Page

Reply to this message
Author: john eayrs
Date:  
To: Hampshire LUG Discussion List
Subject: Re: A new approach to GRUB problem; Was: Re: [Hampshire]Continuing problems with GRUB [was: problems with editing GRUB}
> On Sat, 2007-02-17 at 19:14 +0000, hantslug@??? wrote:
> > Is there anyone on this list (or are there any people on this liost) who
> > is/are successfully dual booting Linux and Windows using GRUB? If so,

could
> > he/she/they post his/her/their menu.lst, grub.conf, other file with the

same
> > function for me to look at? From where I am now, looking at what

succeeds
> > might give me more clues than continued failure.
> >
>

I would suggest getting a copy of the knoppix disk. This has some useful
routines on it which make failed Grub installation on various linuxes easy.

Using knoppix I was able to install 3 operating systems (SUSE, knoppix, XP)
on 2 laptops and repair Grub on a machine with 2 hard disks booting from a
SCSI drive.

Use the "update-grub" tool. This tool scans the /boot partition for usable
kernals and automatically creates a menu.lst file based on what it finds.

example taken from the book "knoppix hacks"
assuming root partition is mounted at /mnt/hda1 you would run
$ cd /mnt/hda1
$ sudo mkdir boot/grub
$ sudo cp /sbin/update-grub ./
$sudo chroot /mnt/hda1 /update-grub

The final command prompts you to create a menu.lst file - you answer yes to
this
It then scans the first hard drive and adds new entries for all the kernals
it finds

The first time update-grub is run, it might not detect the correct root
device to use.

If your root partition is not at /dev/hda1 but perhaps at /dev/hda5, you
must edit the boot/grub/menu.lst file that was created and find the
following commented line:
# groot=(hd0,0)

replace (hd0, 0) with the correct root device for your Linux system. For
example, if your root Linux partition is /dev/hda5, change the line to

# groot=(hd0, 4)
Notice that grub counts partitions from zero instead of one. Rerun
update-grub to update menu.lst with the correct values:

$ cd /mnt/hda5
$ sudo chroot /mnt/hda5 /update-grub

Once the program has finished.......you must tell the grub-install program
to use /mnt/hda1 as your root directory by typing the following command

$ sudo grub-install --root-directory=/mnt/hda1 /dev/hda

I hope the above gives a useful method for handling grub installation.

I copied this out of the knoppix hacks and you may need to play a little.
I used the instructions as the reference for putting 3 operating systems on
a laptop.

Hope this helps

John Eayrs