cat /path/to/slax_mount/boot/slax.cfg | isol2grub | tee -a /boot/grub/menu.lst
There are 2 ways you can use isol2grub:
Use it as how saikee boots 100+ systems with a single grub menu.
Use it to keep separate systems' boot up menu as separated sub menus.
To explain how to use isol2grub to do above, let's assume that we are adding different systems to our existing NimbleX system. Why NimbleX, you may ask? Because NimbleX uses grub as the default boot loader, so we don't need to do anything to enjoy the grub booting. Further, unlike all the following distros who switch between isolinux and syslinux, NimbleX uses the same consistent grub booting method for both CD, HD and USB installation. Moreover, NimbleX has a nice GUI based grub booting menu which is really great.
BTW, the latest IsoL2Grub code is available at the following svn repository: http://live-developers.svn.sourceforge.net/viewvc/live-developers/boot/IsoL2Grub/trunk/
Let's add slax6's boot menu to our current NimbleX grub menu.
cat /path/to/slax_mount/boot/slax.cfg | isol2grub | tee -a /boot/grub/menu.lst
With this, at the end of our current NimbleX grub boot up menu, we will have 5 more entries to boot Slax:
title Slax Graphics mode (KDE) kernel /boot/vmlinuz ramdisk_size=6666 root=/dev/ram0 rw autoexec=xconf;telinit~4 changes=/slax/ initrd /boot/initrd.gz title Slax Always Fresh kernel /boot/vmlinuz ramdisk_size=6666 root=/dev/ram0 rw autoexec=xconf;telinit~4 initrd /boot/initrd.gz title Slax Copy To RAM kernel /boot/vmlinuz ramdisk_size=6666 root=/dev/ram0 rw copy2ram autoexec=xconf;telinit~4 initrd /boot/initrd.gz title Slax Graphics VESA mode kernel /boot/vmlinuz ramdisk_size=6666 root=/dev/ram0 rw autoexec=telinit~4 changes=/slax/ initrd /boot/initrd.gz title Slax Text mode kernel /boot/vmlinuz ramdisk_size=6666 root=/dev/ram0 rw changes=/slax/ initrd /boot/initrd.gz
The above is the most basic form of the 'isol2grub' usage. However, there are some distros that do not label their boot menus nicely. For example, on seeing the following boot up menu, among the 100+ systems within the single grub menu, I bet most people would be confused as where do they come from and what do they do.
title debug kernel /boot/... initrd /boot/.../initrd.gz title bootchart kernel /boot/... initrd /boot/.../initrd.gz title fb1280x1024 kernel /boot/... initrd /boot/.../initrd.gz title failsafe kernel /boot/... initrd /boot/.../initrd.gz title forensic kernel /boot/... initrd /boot/.../initrd.gz
The '-p' parameter can allow 'isol2grub' to add a prefix string to the boot menu (grub menu title). E.g., if we specify
isol2grub -p "Boot Grml - " /path/to/grml_mount/boot/isolinux/isolinux.cfg
then the above confusing menu will be clearly shown as:
title Boot Grml - debug kernel /boot/... initrd /boot/.../initrd.gz title Boot Grml - bootchart kernel /boot/... initrd /boot/.../initrd.gz title Boot Grml - fb1280x1024 kernel /boot/... initrd /boot/.../initrd.gz title Boot Grml - failsafe kernel /boot/... initrd /boot/.../initrd.gz title Boot Grml - forensic kernel /boot/... initrd /boot/.../initrd.gz
NimbleX has 5 boot entries, and we've just added 5 more entries in order to boot Slax. I.e., we only have 2 distros but our boot up menu now has 10 entries. If we are to put 100+ systems into a single grub menu, we will be looking at an over-500-entry boot up menu. This is not very practical.
The better approach is to put separate systems into separated sub menus:
isol2grub /path/to/slax_mount/boot/slax.cfg | tee /boot/grub/menu-slax.lst
Then add the following entry to the default boot up menu:
title Boot Slax configfile /boot/grub/grub-slax.lst
The above only gives us a basic Slax grub menu. It works but it
does not look pretty.
can not go back to the main menu once descended into the sub menu
To overcome all above, we can use isol2grub's '-i' and '-b' parameters. Let's use Wolvix boot menu as the example this time.
$ isol2grub -i -b /path/to/wolvix_mount/boot/isolinux/isolinux.cfg | tee /boot/grub/menu-wolvix.lst # menu.lst - See: grub(8), grub-install(8), update-grub(8) # /usr/share/doc/grub and /usr/share/doc/grub-doc/. ## default num|saved default saved ## timeout sec timeout 10 # Pretty colours color cyan/blue white/blue title Run wolvix kernel /boot/vmlinuz changes=wolvixsave.xfs max_loop=255 ramdisk_size=6666 root=/dev/ram0 rw vga=791 splash=silent initrd /boot/initrd.gz title Run Memtest utility kernel /boot/mt86p title Back to Root Boot Menu configfile /boot/grub/menu.lst
We can see that at the top of the generated menu.lst there are some standard settings, and at the end there is the "back to the root menu" entry.
In the above example, we actually overlooked the fact that Wolvix uses different kernel and initrd than NimbleX and Slax. What if the new system that we boot uses entirely different kernel and initrd ? No problem, the isol2grub's '-k' parameter can help.
Let's take a look how to add and boot grml-medium from the same partition:
# copy over grml-medium's booting kernel and initrd to a separated folder cp -pr /path/to/grml_mount/boot/grmlmedium /boot/grml
# put grml boot into a separated sub menus with the '-k' parameter isol2grub -k '/boot/grml/' /path/to/grml_mount/boot/isolinux/syslinux.cfg
Here is what we get (after some minor clean up):
title grml - Standard Bootup kernel /boot/grml/linux26 apm=power-off lang=us vga=791 quiet boot=live nomce initrd /boot/grml/initrd.gz title grml2ram - Copy Squashfs file to RAM kernel /boot/grml/linux26 apm=power-off toram=grml-medium.squashfs lang=us vga=791 quiet boot=live nomce initrd /boot/grml/initrd.gz title grml - Bootsplash kernel /boot/grml/linux26 apm=power-off lang=us vga=791 quiet boot=live splash nomce initrd /boot/grml/initrd.gz title grml2hd kernel /boot/grml/linux26 apm=power-off lang=us quiet boot=live nomce initrd /boot/grml/initrd.gz title debian2hd kernel /boot/grml/linux26 apm=power-off lang=us vga=791 boot=live BOOT_IMAGE=debian2hd nomce initrd /boot/grml/initrd.gz title debug kernel /boot/grml/linux26 apm=power-off lang=us vga=791 verbose debug=vc debug boot=live initcall_debug nomce initrd /boot/grml/initrd.gz title bootchart kernel /boot/grml/linux26 init=/sbin/bootchartd apm=power-off lang=us vga=791 quiet boot=live nomce initrd /boot/grml/initrd.gz title vmware kernel /boot/grml/linux26 apm=power-off lang=us nousb nousb2 nofirewire vga=791 quiet boot=live nomce initrd /boot/grml/initrd.gz title qemu kernel /boot/grml/linux26 apm=power-off lang=us nousb nousb2 nofirewire vga=791 quiet boot=live nomce qemu initrd /boot/grml/initrd.gz title grmlx kernel /boot/grml/linux26 apm=power-off lang=us startx=wm-ng vga=791 quiet boot=live nomce initrd /boot/grml/initrd.gz title grml without framebuffer kernel /boot/grml/linux26 apm=power-off lang=us vga=normal video=ofonly quiet boot=live nomce initrd /boot/grml/initrd.gz title linux26 kernel /boot/grml/linux26 apm=power-off lang=us vga=791 quiet boot=live nomce initrd /boot/grml/initrd.gz title memtest kernel /boot/grml/addons/memtest BOOT_IMAGE=memtest title fb1280x1024 kernel /boot/grml/linux26 apm=power-off lang=us vga=794 quiet boot=live nomce initrd /boot/grml/initrd.gz title fb1024x768 kernel /boot/grml/linux26 apm=power-off lang=us vga=791 quiet boot=live nomce initrd /boot/grml/initrd.gz title fb800x600 kernel /boot/grml/linux26 apm=power-off lang=us vga=788 quiet boot=live nomce initrd /boot/grml/initrd.gz title failsafe kernel /boot/grml/linux26 vga=normal lang=us boot=live noautoconfig atapicd noacpi acpi=off nomodules nofirewire noudev nousb nohotplug noapm nopcmcia maxcpus=1 noscsi noagp nodma ide=nodma noswap nofstab nosound nogpm nosyslog nodhcp nocpu nodisc nomodem xmodule=vesa noraid nolvm initrd /boot/grml/initrd.gz title forensic kernel /boot/grml/linux26 vga=791 lang=us nofstab noraid nolvm noautoconfig noswap raid=noautodetect quiet boot=live initrd /boot/grml/initrd.gz title grub kernel /boot/grml/addons/memdisk initrd /boot/addons/allinone.img title dos kernel /boot/grml/addons/memdisk initrd /boot/addons/balder10.imz title serial kernel /boot/grml/linux26 apm=power-off lang=us vga=normal video=vesafb:off quiet boot=live nomce console=tty1 console=ttyS0,9600n8 initrd /boot/grml/initrd.gz title User defined kernel /boot/grml/linux26 initrd /boot/grml/
That's quite a long and impressive boot up menu isn't it. This can reveal that grml is quite a sophisticated system. But IMHO, this also reveals the drawback of using isolinux/syslinux for boot up menu.
For example, suppose the default boot does not work for a weird PC but the 'failsafe' works. So the next question is, which one of the disabled feature is the culprit? The fastest approach is to re-enable the features one by one, starting from the most dangerous ones. If after re-enabling one feature and the system won't boot any more, then we know it is the culprit, and can disable it from the normal boot.
However the problem is that isolinux/syslinux menu is fixed. You can either have the full 'failsafe' or not have it at all. There is no way you can have something in between. To do try out as we just described, you have to type in the full 'APPEND initrd=initrd.gz vga=normal lang=us boot=live noautoconfig atapicd noacpi acpi=off nomodules nofirewire noudev nousb nohotplug noapm nopcmcia maxcpus=1 noscsi noagp nodma ide=nodma noswap nofstab nosound nogpm nosyslog nodhcp nocpu nodisc nomodem xmodule=vesa noraid nolvm' line less one feature each time you test. You really need extremely good patient and precisely tying skill to do so. When using grub, it is not a problem at all. Just boot up grub, edit the grub menu, erase one feature each time, then boot the system. Simple!
Same principle applies to the grml2hd and debian2hd boot menu as well. These are the boot menus that are better be edited before booting up.
Moreover, if grub is used of booting, those less used entries, e.g., 'debug', 'bootchart', 'linux26' and even 'grml - Bootsplash' and 'qemu', can be removed because there are not much difference between them and other related entries. So we don't need such a long boot menu. But that's just only my 2c.