LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 07-21-2009, 01:40 PM   #1
niravshah
Member
 
Registered: Jul 2009
Posts: 83

Rep: Reputation: 16
Anyone tried grub2 to boot of an iso?


Hi

Has anyone tried and has been successful in installing grub2 to boot of an iso .
I read that it is possible but could not get it to work.
I am just wondering if its even possible to boot an iso from a flash drive using grub2.

Last edited by niravshah; 07-21-2009 at 02:14 PM.
 
Old 07-21-2009, 02:25 PM   #2
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
I haven't tried it, but here's a recent set of directions someone made that appears to work.

Hopefully drive lettering changes don't cause a problem. I assume grub2 will be referencing the USB drive regardless of whether it is /dev/sdb or /dev/sdc, etc.

Last edited by pljvaldez; 07-21-2009 at 02:26 PM.
 
Old 07-21-2009, 02:58 PM   #3
niravshah
Member
 
Registered: Jul 2009
Posts: 83

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by pljvaldez View Post
I haven't tried it, but here's a recent set of directions someone made that appears to work.

Hopefully drive lettering changes don't cause a problem. I assume grub2 will be referencing the USB drive regardless of whether it is /dev/sdb or /dev/sdc, etc.
Well this helped me a lot but the only thing i could not figure out why is the linux and initrd entry different for each iso
What i mean is how should I figure out that ?
Should i put the same thing that is there in isolinux.conf file?????
 
Old 07-21-2009, 03:44 PM   #4
linus72
Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,084

Rep: Reputation: 336Reputation: 336Reputation: 336Reputation: 336
Yes
that's basically right
you gotta copy the kernel and initrd from the iso to usb
whereever the kernel/initrd are at in the iso, then re-create that same folder

like, if kernel initrd is in /boot folder
then put kernel initrd in /boot folder of usb

to see which kernel/initrd are in the iso
make a folder to mount the iso on named "mnt"
make a folder to copy the kernel intrd, etc to from iso, named iso
become root and
mount the iso

"mount -o loop name-of-iso.iso mnt"
now you can llok in the folder "mnt" and the contents of the iso will be there

to copy kernel/initrd from iso
"cp -a mnt/kernel-name iso"
copy kernel to folder iso

just remember to UNMOUNT the mnt folder
"umount mnt"
 
Old 07-21-2009, 05:19 PM   #5
niravshah
Member
 
Registered: Jul 2009
Posts: 83

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by linus72 View Post
Yes
that's basically right
you gotta copy the kernel and initrd from the iso to usb
whereever the kernel/initrd are at in the iso, then re-create that same folder

like, if kernel initrd is in /boot folder
then put kernel initrd in /boot folder of usb

to see which kernel/initrd are in the iso
make a folder to mount the iso on named "mnt"
make a folder to copy the kernel intrd, etc to from iso, named iso
become root and
mount the iso

"mount -o loop name-of-iso.iso mnt"
now you can llok in the folder "mnt" and the contents of the iso will be there

to copy kernel/initrd from iso
"cp -a mnt/kernel-name iso"
copy kernel to folder iso

just remember to UNMOUNT the mnt folder
"umount mnt"
yes yes yes !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I got it to work man
I tried it with ubuntu ISO and it worked

Now i am going to try with the iso i have hopefully that will work too
this sounds pretty awesome

Thanks to this forum now i atleast know that this is possible

I still might need ur help below is the isolinux.cfg file content of my iso


default linux
prompt 1
timeout 600
display boot.msg
F1 boot.msg
F2 options.msg
F3 general.msg
F4 param.msg
F5 rescue.msg
label linux
kernel vmlinuz
append initrd=initrd.img
label text
kernel vmlinuz
append initrd=initrd.img text
label bnc
kernel vmlinuz
append initrd=initrd.img ks=cdrom:/bnc.cfg
label rdc
kernel vmlinuz
append initrd=initrd.img ks=cdrom:/rdc.cfg
label local
localboot 1
label memtest86
kernel memtest
append -
----------------------------------------------------------------------
I know this is pretty complex but how can i get this to work ?
or can i get this file itself to boot??
 
Old 07-21-2009, 05:52 PM   #6
linus72
Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,084

Rep: Reputation: 336Reputation: 336Reputation: 336Reputation: 336
lol
so that's good huh?

You wanna try a distro that will boot from iso using grub or grub2?
?

so, what do you wanna know about the isolinux.cfg?

you using a fat32 usb or ext3?
 
Old 07-21-2009, 05:55 PM   #7
niravshah
Member
 
Registered: Jul 2009
Posts: 83

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by linus72 View Post
Yes
that's basically right
you gotta copy the kernel and initrd from the iso to usb
whereever the kernel/initrd are at in the iso, then re-create that same folder

like, if kernel initrd is in /boot folder
then put kernel initrd in /boot folder of usb

to see which kernel/initrd are in the iso
make a folder to mount the iso on named "mnt"
make a folder to copy the kernel intrd, etc to from iso, named iso
become root and
mount the iso

"mount -o loop name-of-iso.iso mnt"
now you can llok in the folder "mnt" and the contents of the iso will be there

to copy kernel/initrd from iso
"cp -a mnt/kernel-name iso"
copy kernel to folder iso

just remember to UNMOUNT the mnt folder
"umount mnt"

i get error saying "you may need to load the kernel first"
my grub.cfg looks like this

menuentry "nirav rpd" {
loopback loop /boot/iso/rpd_nirav.iso
linux (loop)/isolinux/vmlinuz --
initrd (loop)/isolinux/initrd.img
}
 
Old 07-21-2009, 05:57 PM   #8
linus72
Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,084

Rep: Reputation: 336Reputation: 336Reputation: 336Reputation: 336
what iso is it?
some distro's won't run from usb

where are the "append" options??
 
Old 07-21-2009, 05:58 PM   #9
niravshah
Member
 
Registered: Jul 2009
Posts: 83

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by linus72 View Post
lol
so that's good huh?

You wanna try a distro that will boot from iso using grub or grub2?
?

so, what do you wanna know about the isolinux.cfg?

you using a fat32 usb or ext3?
i am using grub2
how do i get the exact same option od isolinux.cfg into grub
i mean when i boot from grub it should appear as if i have booted for a bootable dvd made from the iso

i m using ext3 usb
 
Old 07-21-2009, 06:17 PM   #10
linus72
Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,084

Rep: Reputation: 336Reputation: 336Reputation: 336Reputation: 336
ok
to CONVERT a isolinux.cfg entry to a menu.lst grub entry


puppy isolinux.cfg entry
Code:
label puppyr
menu label RescuePuppy49 RestoreSave
kernel vmlinuz
append initrd=initrd.gz pmedia=cd pfix=copy
puppy grub menu.lst entry

Code:
title RescuePuppy49 RestoreSave
root (hdx,x)
kernel /vmlinuz pmedia=cd pfix=copy
initrd /initrd.gz
you must move the "append" line in isolinux.cfg to the kernel line in menu.lst
so, replace

Code:
label puppyr
menu label RescuePuppy49 RestoreSave
with this

Code:
title RescuePuppy49 RestoreSave
and then place the "kernel options/bootcodes" at the kernel line
not the initrd line

isolinux.cfg kernel line

Code:
kernel vmlinuz
grub menu.lst kernel line

Code:
kernel /vmlinuz pmedia=cd pfix=copy
dig?
 
Old 07-21-2009, 06:38 PM   #11
niravshah
Member
 
Registered: Jul 2009
Posts: 83

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by linus72 View Post
ok
to CONVERT a isolinux.cfg entry to a menu.lst grub entry


puppy isolinux.cfg entry
Code:
label puppyr
menu label RescuePuppy49 RestoreSave
kernel vmlinuz
append initrd=initrd.gz pmedia=cd pfix=copy
puppy grub menu.lst entry

Code:
title RescuePuppy49 RestoreSave
root (hdx,x)
kernel /vmlinuz pmedia=cd pfix=copy
initrd /initrd.gz
you must move the "append" line in isolinux.cfg to the kernel line in menu.lst
so, replace

Code:
label puppyr
menu label RescuePuppy49 RestoreSave
with this

Code:
title RescuePuppy49 RestoreSave
and then place the "kernel options/bootcodes" at the kernel line
not the initrd line

isolinux.cfg kernel line

Code:
kernel vmlinuz
grub menu.lst kernel line

Code:
kernel /vmlinuz pmedia=cd pfix=copy
dig?

its a RHEL distro with my software in it
Also did u see my isolinux.cfg file its just kernel line and in append line it has initrd = initrd.img


Also where if i use menu.lst how can i use the loop option for iso that i absolutely want.

Last edited by niravshah; 07-21-2009 at 06:40 PM.
 
Old 07-22-2009, 12:32 PM   #12
niravshah
Member
 
Registered: Jul 2009
Posts: 83

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by niravshah View Post
its a RHEL distro with my software in it
Also did u see my isolinux.cfg file its just kernel line and in append line it has initrd = initrd.img


Also where if i use menu.lst how can i use the loop option for iso that i absolutely want.
?????????????
 
Old 08-03-2010, 10:53 AM   #13
anandogc
LQ Newbie
 
Registered: Apr 2009
Posts: 5

Rep: Reputation: 0
Thumbs up booting Ubuntu 10.04 iso using grub2

I use this in grub.cfg to boot an Ubuntu 10.04 iso
menuentry "Ubuntu 10.04 Live ISO" {
loopback loop (hd0,4)/ISO/ubuntu-10.04-desktop-i386.iso
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/ISO/ubuntu-10.04-desktop-i386.iso file=(loop)/preseed/ubuntu.seed quiet splash --
initrd (loop)/casper/initrd.lz
}
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
grub.iso vs isolinux.iso Differences, Uses, and Advantages? linus72 Linux - Newbie 8 06-07-2009 11:53 AM
Why /boot/grub/grub.conf is symlinked to /boot/grub/menu.lst raj_hcl1986@rediffma Linux - Newbie 2 10-19-2008 03:19 AM
Can GRUB Boot from an iso azurvii Linux - General 1 05-02-2006 12:55 PM
Is it possible to boot an .iso from Grub? rollo Linux - General 4 03-07-2006 06:40 PM
grub boot iso image xrado Linux - General 2 12-20-2005 05:00 PM


All times are GMT -5. The time now is 03:20 PM.

Main Menu
Advertisement
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