Need Help With Chainloading
I have a desktop with Ubuntu 11.04 (32-bit) installed.
When I installed Ubuntu, I put its boot loader (GRUB 2) in the MBR. Ubuntu itself is installed in /dev/sda1 (root) and /dev/sda/5. I have recently also installed Slackware 13.37. I put its boot loader (LILO) in the same partition where Slackware's root resides, i.e. /dev/sda3. The other partition used by Slackware is /dev/sda7 (/home). Now I would like to insert a chainloader command in GRUB 2 so that I can start Slackware from its menu. Here's what I've done (which obviously does not work!): 1) I inserted the following entries in file /etc/grub.d/40_custom (as root): Code:
menuentry "Slackware" { Code:
grub-mkconfig -o /boot/grub/grub.cfg So, how do I chainload this correctly? Please note that Ubuntu 11.04 uses GRUB 2, not GRUB legay! |
You really don't need to deal with chainloading LILO from GRUB2.
The simplest solution is mount your slackware partition and : Create a /boot/grub directory. Create a /boot/grub/menu.lst file containing Code:
title Slackware Latest or Code:
title Slackware Latest You just have to make sure that the symbolic link /boot/vmlinuz points to the kernel of your choice. Then boot your Ubuntu install and Code:
sudo update-grub You can add other entries to your menu.lst file if you choose. Grub does not even have to be installed for this to work (although I believe that it is installed in a normal "full" slackware installation.) |
Quote:
It is my understanding that GRUB 2 no longer uses menu.lst. I found this information at https://help.ubuntu.com/community/Grub2 (in the File Structure section). Do you think that I need to use some other file with GRUB 2? |
Put the menu.lst file in the slackware partition.
Grub2 will recognize the file and add the entries to Ubuntu's grub.cfg. |
I understand you wanting to chainload, if using multiple distros and changing to new releases and updates it is a lot easier to chainload the partition. Remove Lilo and install grub2 to root of slackware then try your chainloading.
|
Try this to chainload
menuentry "Slackware" { insmod ext2 set root=(hd0,3) chainloader +1 } or menuentry "Slackware" { insmod part_msdos insmod ext2 set root=(hd0,3) chainloader +1 } edit: change ext2 to the correct mod if your slack partition is not formated with ext4 or similar. |
Quote:
Since I have never installed lilo, I am not sure if its installation to the partition boot record will interfere with grub2 picking up a /boot/grub/menu.lst file from that same partition. EDIT: I will concede that the OP did ask for a chainloading solution and I did not provide one. I just believe that my proposed solution is a simple one. |
Try this on your lilo and if it does not work then you will have to boot direct or change to grub2 if you want to chainload. From terminal using ubuntu live cd. Substitute your lilo partition for the hdxx.
sudo mkdir /mnt/temp sudo mount /dev/hdxx /mnt/temp sudo chroot /mnt/temp sudo lilo –b /dev/hdxx |
All times are GMT -5. The time now is 08:30 AM. |