LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Trying to chainboot Slackware from Grub2 (http://www.linuxquestions.org/questions/slackware-14/trying-to-chainboot-slackware-from-grub2-812664/)

trumpet_tom 06-07-2010 10:18 AM

Trying to chainboot Slackware from Grub2
 
Dear all,
I've made a mini installation of slackware64-13.1 onto my friend's computer. He already has Ubuntu and Windows partitions that are being handled by GRUB2. I thought the best thing to do would be to have lilo installed to the partition root (on /dev/sda3) and let grub2 chainboot. I've been reading about adding custom entries to the grub menu and things look like they're working but then I reboot and there's no Slackware option.

Currently I've got this file in /etc/grub.d/41_slack. It is executable.
Code:

#!/bin/sh -e
echo "Adding Slackware"
cat << EOF
menuentry "Slackware" {
set root=(hd0,3)
chainloader (hd0,3)+1
}
EOF

When I run "sudo update-grub" this is the output
Code:

lewi@benny:~$ sudo update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-22-generic
Found initrd image: /boot/initrd.img-2.6.32-22-generic
Found linux image: /boot/vmlinuz-2.6.31-10-rt
Found initrd image: /boot/initrd.img-2.6.31-10-rt
Found memtest86+ image: /boot/memtest86+.bin
Found Microsoft Windows XP Home Edition on /dev/sda1
Found Slackware Linux (Slackware 13.1.0) on /dev/sda3
done

So it has found the slackware partition (not because of my menu entry though?) but when I reboot there's no menu entry there.

Any ideas?

TSquaredF 06-07-2010 10:39 AM

I am using GRUB2 because I can compile it on a 64 bit system & I want grub, not lilo, but I will admit that the automagic menu maker for GRUB2 completely underwhelms me. I edit /boot/grub/grub.cfg by hand just like I did the legacy grub configuration file. It works a treat, but someday I will teach myself how to use update-grub.
Regards,
Bill

trumpet_tom 06-07-2010 11:01 AM

Thanks but I would much prefer to be able to use grub2 without having to manually mess around with grub.cfg. Does anyone know if I'm actually doing anything wrong or is there a better way of getting the three systems booting? I'm much more familiar with lilo so I might just try getting it all to work with that.

trumpet_tom 06-07-2010 12:35 PM

It seems to be working now, I think it was something to do with having some grub legacy stuff lying around. Will mark as solved.


All times are GMT -5. The time now is 03:57 AM.