How can I chainload GRUB from syslinux?
Solution 1
Assuming you have GRUB's files in /boot/grub
, on the same partition as syslinux, you can chainload the first GRUB image, named boot.img
, like this:
LABEL GRUB
MENU LABEL Grub2 chainload
COM32 CHAIN.C32
APPEND file=/boot/grub/boot.img
Solution 2
I've never tried this myself but I found these details on the ArchLinux wiki. In a article aptly titled: Syslinux. There's a section titled: Chainloading other Linux systems.
excerpt
Chainloading another bootloader such as Windows' is pretty obvious, as there is a definite bootloader to chain to. But with Syslinux, it is only able to load files residing on the same partition as the configuration file. Thus, if you have another version of Linux on a separate partition, without a shared /boot, it becomes necessary to employ Extlinux. Essentially, Extlinux can be installed on the partition superblock and be called as a separate bootloader from the MBR installed by Syslinux. Extlinux is part of the Syslinux project and is included with the syslinux package.
So assuming you have a system with Grub2 like so:
-
/dev/sda3
(/
) -
/dev/sda2
(/boot
)
You'd mount them like so:
$ mount /dev/sda3 /mnt
$ mount /dev/sda2 /mnt/boot (only necessary for separate /boot)
Then with extlinux
installed you do the following:
$ extlinux -i /mnt/boot/syslinux
$ cp /usr/lib/syslinux/{chain,menu}.c32 /mnt/boot/syslinux
And create this file: /mnt/boot/syslinux/syslinux.cfg
:
timeout 10
ui menu.c32
label Other Linux
linux /boot/vmlinuz-linux
initrd /boot/initramfs-linux.img
append root=/dev/sda3 ro quiet
label MAIN
com32 chain.c32
append hd0 0
Related videos on Youtube
Comments
-
erch over 1 year
Due to the current state of my setup, I want to make Syslinux which is my main bootloader to chainload GRUB2. Google brings up plenty of info on how to chainload Syslinux from GRUB2, but nothing really useful for the reversed scenario, which is what I'm looking for.
-
Admin almost 11 yearsCan you share your
syslinux.cfg
file please? -
Admin over 5 yearsReally syslinux or extlinux?
-
-
Nils over 5 yearsSame should be true for grub? Where (into which file at which place) do you have to put the lines?