-   Ubuntu (
-   -   BackTrack / Grub2 ISO Boot (

felix001 02-16-2011 11:34 AM

BackTrack / Grub2 ISO Boot
Ive just finished a persistent USB installation of BackTrack 4 r2 (Ubuntu based) on my USB Stick. This is all booting fine and dandy.

My goal is to add the ability to boot from another iso from my USB stick using grub2.

So far I have...

-- Copied the ISO to /boot/iso


root@bt:~# ls -l /boot/iso/
total 402372
-rw-r--r-- 1 root root 411619328 2011-02-16 16:16 HirensBootCD.13.1.iso

-- And I have add a file to the following directory ...


root@bt:~# cat /etc/grub.d/40_custom
echo "Adding 40_custom." >&2
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.

menuentry "Hirens Boot CD 13.1" {
loopback loop /boot/iso/HirensBootCD.13.1.iso
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/iso/HirensBootCD.13.1.iso noprompt noeject
initrd (loop)/casper/initrd.lz

Can anyone else let me know what else I need to do to add this to the menu and from the ISO ??


corp769 02-16-2011 12:09 PM

You will find a good tutorial here

There are tutorials both all over the web, and on this site to my knowledge. You just have to search... Use the link in my signature if need be.

corp769 02-16-2011 12:11 PM

But concerning your question, all you need to do is run update-grub.

bryanl 02-16-2011 12:53 PM

If the iso doesn't show up in the boot menu, then the odds are it has something to do with the extension of the grub.cfg to find the stanza you cited. Pendrive Linux suggested directly editing grub.cfg to install such stanzas for booting multiple iso images.
-- see summary and links at TCL: multiple boot from ISO on USB pen drive

As long as you don't run update-grub (as is often done when updating kernel software in Ubuntu) and don't goof too bad on syntax, directly editing grub.cfg usually works. For the multiple boot iso with no system to refresh or update on the USB stick, an auto run of grub update to wipe out your edits won't happen. With a system on the USB stick, you'll either need to figure out how the extension to grub.cfg works or re-edit after system updates.

felix001 02-17-2011 05:53 AM

Thanks for the replies...

After checking Im wondering if i am running the right version of grub to allow me to do this.


root@bt:~# grub-install -v
grub-install (GNU GRUB 0.97)

From this output it appears that I not running Grub2 ? Also considering I haven't got a grub.cfg file but only a menu.lst within my /boot/grub directory.

Does anyone know how I would go about upgrading this to grub2 ?

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