LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 02-16-2011, 10:34 AM   #1
felix001
Member
 
Registered: Jan 2009
Posts: 101

Rep: Reputation: 15
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

Code:
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 ...

Code:
root@bt:~# cat /etc/grub.d/40_custom
#!/bin/sh
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 ??

Thanks,
 
Old 02-16-2011, 11:09 AM   #2
corp769
Guru
 
Registered: Apr 2005
Posts: 5,798

Rep: Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978
You will find a good tutorial here http://ubuntuforums.org/showthread.php?t=1195275

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.
 
Old 02-16-2011, 11:11 AM   #3
corp769
Guru
 
Registered: Apr 2005
Posts: 5,798

Rep: Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978
But concerning your question, all you need to do is run update-grub.
 
Old 02-16-2011, 11:53 AM   #4
bryanl
Member
 
Registered: Dec 2003
Posts: 84

Rep: Reputation: 33
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.
 
Old 02-17-2011, 04:53 AM   #5
felix001
Member
 
Registered: Jan 2009
Posts: 101

Original Poster
Rep: Reputation: 15
Thanks for the replies...

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

Code:
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 ?

Last edited by felix001; 02-18-2011 at 05:20 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How To Boot An ISO With GRUB2 (The Easy Way!) LXer Syndicated Linux News 0 02-07-2011 07:42 PM
Anyone tried grub2 to boot of an iso? niravshah Linux - Newbie 12 08-03-2010 09:53 AM
Mount ISO as specific device (ie: /dev/sda1) with GRUB2 to boot KNOPPIX live cd iso BLuFeNiX Linux - General 2 12-23-2009 01:31 AM
Modifying distros iso images to boot with grub2 NightHorse Linux - Distributions 3 10-12-2009 06:46 PM
Grub2 and iso boot ---- Again niravshah Linux - Newbie 6 09-18-2009 03:32 PM


All times are GMT -5. The time now is 08:16 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration