How to setup GRUB menu.lst


#1

I have put my asterisk harddisk into a new system where it is now hdb.

On hda I have dual boot windows (hda1) and linux (hda2) partitions.

I have tried and tried to get grub configured correctly but being a linux dummy I can’t get asterisk to boot. Here is what I have:

###Don’t change this comment - YaST2 identifier: Original name: asterisk pbx###
title asterisk pbx
kernel (hd1,1)/boot/vmlinuz root=/dev/hdb2

I also tried
kernel (hd1,0)/boot/vmlinuz root=/dev/hdb1

but that didn’t work either.

Please can someone help me out, thanks


#2

Hi,

grub uses a device map to map grub identifiers (hdX,Y) to linux names.
Usually this maps hda1 => (hd0,0); hda2 => hd(0,1)
and hdb1 => (hd1,0); hdb2 => (hd1,1).
You can check the mapping of the device names (hda => hd0) by looking at the file device.map - in the same directory as the menu.lst.

If the device.map does not conaint the device hdb => hd1, you’ll need to recreate it.
Usually, you can do this by using grub-install --recheck.

Grub might also fail to load if it cannot find its stage2 on hda - as it is now on hdb.

If can only boot up the harddisk in the old system, try using a boot disk or to boot by cdrom.
E.g. use knoppix,
boot it,
mount the /dev/hdb2 as /mnt,
chroot /mnt,
grub-install --recheck /dev/hdb
leave chroot, exit, and reboot. Remember to make the bios to boot up from hdb.
If that fails, you can try to install grub on /dev/hda - but there might be some other os / os loader installed, which needs additional configuration.

It might also be useful to have a look in the grub documentation or to ask that question in a more grub specific forum - as the topic is not specific to asterisk or digium.


The most easy way would be to change harddisk configuration, so that it becomes hda again.


#3

Thank you for your reply but I think you misunderstood me.

I have 2 HDs - HD1 has WIn 98 and Suse. HD2 is Asterisk.

Grub is on HD1, it works and lets me choose to boot W98 or Suse.

I want Grub to add the option to boot via HD2 and Asterisk.

The content of my device.map is:

(hd0) /dev/hda
(hd1) /dev/hdb
(fd0) /dev/fd0

The content of my menu.lst is:

Modified by YaST2. Last modification on Tue Jun 21 12:56:26 2005

color white/blue black/light-gray
default 0
timeout 8
gfxmenu (hd0,2)/boot/message

###Don’t change this comment - YaST2 identifier: Original name: windows###
title windows98
rootnoverify (hd0,0)
makeactive
chainloader +1

###Don’t change this comment - YaST2 identifier: Original name: linux###
title Linux suse 9.1
kernel (hd0,2)/boot/vmlinuz root=/dev/hda3 resume=/dev/hda2 showopts splash=silent desktop
initrd (hd0,2)/boot/initrd

###Don’t change this comment - YaST2 identifier: Original name: asterisk pbx###
title asterisk pbx
kernel (hd1,0)/boot/vmlinuz root=/dev/hdb1

###Don’t change this comment - YaST2 identifier: Original name: floppy###
title Floppy
root (fd0)
chainloader +1

###Don’t change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe
kernel (hd0,2)/boot/vmlinuz root=/dev/hda3 showopts ide=nodma apm=off acpi=off vga=normal noresume nosmp noapic maxcpus=0 3
initrd (hd0,2)/boot/initrd