iPXE-menu for a second linux on the Hd
-
Hello,
I would like to boot a second linux distro from the harddisk. Till now I have an Windows and an Debian (boots from /dev/sdb3) on that disk. I installed an second Linux (Kali) on /dev/sdb6. But how has to be the iPXE-Menu for that constellation.
For Windows I difined an “fog.local” with the parameter
“chain -ar http://<fogserver>/fog/service/ipxe/grub.exe --config-file=rootnoverify (hd1);chainloader (hd1)+1 || MENU”
For the first Linux there is an “fog.linux” with the parameter
“chain tftp://<fogserver>/boot/grub/i386-pc/core.0 || goto MENU”
This Linux boots witch help from /tftpboot/boot/grub/grub.cfgmenuentry 'Linux' --class ubuntu --class gnu-linux --class gnu --class os { insmod biosdisk insmod part_msdos insmod ntfs set root=(hd1,3) if [ -f /ubuntu/disks/root.disk ]; then loopback loop0 /ubuntu/disks/root.disk set root=(loop0) linux /vmlinuz root=/dev/sdb3 loop=/ubuntu/disks/root.disk rw rootflags=sync splash nomdmonddf nomdmonisw vt.handoff=7 initrd /initrd.img else set root=(hd1,3) linux /vmlinuz root=/dev/sdb3 rw splash vt.handoff=7 initrd /initrd.img fi }
If I change /dev/sdb3 with /dev/sdb6 in this grub.cfg the second Linux will boot, but howto integrate both Linux distros ?
Thanks for help. -
@robert70569 There are several ways of getting another Linux distro booted.
One way would be to add another
menuentry
to your existing/tftpboot/boot/grub/grub.cfg
. Maybe you need to add a timeout value for grub to display a menu for you to select one of the two. That way you end up with two menu selections.Another way might be using
grub.exe
, e.g.:chain -ar http://<fogserver>/fog/service/ipxe/grub.exe --config-file=root=(hd2,6);kernel /vmlinuz root=/dev/sdb6 rw;initrd /initrd.img || goto MENU
This is untested. Just trying to come up with some ideas for you to play with. Find a list of possible commands on the web - take a look at
find
as well.A third way you might look into is embedding a grub.cfg into your core.0 binary. That way you could create one binary for Debian and another one for Kali.
-
@sebastian-roth
ok, add another menuentry to /tftpboot/boot/grub/grub.cfg
and add an timeout worked. But there will be a second menu to select one of the two menuentry. Not so nice, but it works.
I could not find a working chain-syntax for the grub.exe.
Embedding a grub.cfg into your core.0 binary I didnt test yet.