LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-28-2005, 02:42 PM   #1
Orkie
Member
 
Registered: Mar 2005
Distribution: Breezy Badger
Posts: 248

Rep: Reputation: 30
Booting of raw ISO from GRUB/LILO (though preferably GRUB)


Does anybody know how (/ if it is possible) to boot a raw ISO file using GRUB or LILO (though I would prefer to use GRUB since that is what I already have installed). I have found some references to a 'bootfrom=' command for GRUB connected to booting KNOPPIX but it seems to just be for KNOPPIX. I would like to boot ISOs for many OSs without burning them to a CD.

Thanks
 
Old 09-29-2005, 07:18 AM   #2
mickyg
Member
 
Registered: Oct 2004
Location: UK
Distribution: Ubuntu/Kubuntu
Posts: 249

Rep: Reputation: 30
I don't think you can because the boot loaders don't refer to a mounted device, in the conf files they use /dev/hda1 instead of / so I don't see how you would be able to reference an ISO on a hard drive without first mounting it.

Having said that, looking at this excert from the knoppix cheatcodes:

knoppix bootfrom=/dev/hda1/KNX.iso Access image, boot from ISO-Image. ***)

you might be able to try the boot option /dev/hda1/whatever.iso providing your iso in on the root of hard drive hda1.

Give it a go, it'll either work, or it won't.


Let us know if it did.

Last edited by mickyg; 09-29-2005 at 07:19 AM.
 
Old 07-03-2007, 07:52 AM   #3
bobbrandt
LQ Newbie
 
Registered: Sep 2006
Posts: 23

Rep: Reputation: 0
I am doing the same thing, I have a number of small ISOs that I want to use grub on a USB key to launch. That way I can select the ISO I want to run from the grub menu.

I found a few references that gave the following grub code:

grub> map (hdX,Y)/your.iso (hdZ)
grub> map --rehook
grub> chainloader (hdZ)+1
grub> rootnoverify (hdZ)
grub> boot

Problem is I can't find any documentation an what the --rehook switch is (in fact my grub doesn't like it at all)
The next problem is that it doesn't work!

Does anyone else have any ideas?

I didn't think this would be so hard!

Bob
 
Old 08-05-2007, 04:07 PM   #4
McStarfighter
LQ Newbie
 
Registered: Aug 2007
Posts: 2

Rep: Reputation: 0
Hello to all,

I search a solution for the same problem and will be very happy to hear something about this.
 
Old 10-18-2007, 11:39 PM   #5
gnuzilla
LQ Newbie
 
Registered: Apr 2006
Location: Chagrin Falls, OH
Distribution: Ubuntu / Debian
Posts: 17

Rep: Reputation: Disabled
bootfrom

the
"bootfrom=/home/user/foo/bar.iso"

would be the correct way to do this
you have to put in the kernal line
 
Old 10-20-2007, 10:26 AM   #6
FoU
LQ Newbie
 
Registered: Oct 2007
Distribution: *ubuntues
Posts: 1

Rep: Reputation: 0
could you explain it thorougly???
 
Old 10-21-2007, 04:30 AM   #7
McStarfighter
LQ Newbie
 
Registered: Aug 2007
Posts: 2

Rep: Reputation: 0
Argh... the bootfrom parameter is only possible for KNOPPIX and his derivates. SLAX i.E. hasn't this option ...
 
Old 10-21-2007, 08:18 AM   #8
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Some three or four years ago I read an atricle suggesting a possible way to boot a liveCD iso from the hard drive. I haven't tried it yet; it's in my *to do one of these days* folder.

1) create a cd sized partition (700 gb or slightly larger) or a dvd sized partition (4.5 gb or thereabouts).

2) format the partition iso9660 (in essence, creating a cd disk on the hard drive).

3) burn the iso to the new partition just as you would burn to cd, specifying cdrom=/dev/hdX,Y (the partition on the drive instead of the cd drive).

4) add an entry in your grub conf file to point the the new partition, something like:
title some_live_cd
root (hdX,Y) # where X,Y is the partition you just created)
chainloader +1

On reboot, you should see the entry for the iso in your grub menu. Grub *should* pass the boot process off to the bootloader in the iso image, resulting in the iso booting just as though it were a livecd in the cd drive.

I repeat: I haven't tried it yet. But, on the surface, it looks like it should work.

If that fails, here is an alternative method to try:
http://www.linuxquestions.org/questi...out-cd-592527/

Last edited by bigrigdriver; 10-21-2007 at 08:20 AM.
 
Old 11-26-2008, 07:39 AM   #9
philip_rhoades
LQ Newbie
 
Registered: Nov 2008
Posts: 12

Rep: Reputation: 0
Booting of raw ISO from GRUB/LILO (though preferably GRUB)

Quote:
Originally Posted by bigrigdriver View Post
Some three or four years ago I read an atricle suggesting a possible way to boot a liveCD iso from the hard drive. I haven't tried it yet; it's in my *to do one of these days* folder.

1) create a cd sized partition (700 gb or slightly larger) or a dvd sized partition (4.5 gb or thereabouts).

2) format the partition iso9660 (in essence, creating a cd disk on the hard drive).

3) burn the iso to the new partition just as you would burn to cd, specifying cdrom=/dev/hdX,Y (the partition on the drive instead of the cd drive).

4) add an entry in your grub conf file to point the the new partition, something like:
title some_live_cd
root (hdX,Y) # where X,Y is the partition you just created)
chainloader +1

On reboot, you should see the entry for the iso in your grub menu. Grub *should* pass the boot process off to the bootloader in the iso image, resulting in the iso booting just as though it were a livecd in the cd drive.

I repeat: I haven't tried it yet. But, on the surface, it looks like it should work.

If that fails, here is an alternative method to try:
http://www.linuxquestions.org/questi...out-cd-592527/

How is 2) done?

Also, in 3), "cdrom=/dev/hdX,Y" is not a valid wodim switch.

Ideally, it would be much cleaner if "bootfrom=/home/user/foo/bar.iso" was available in standard grub . .

BTW, I used your alternative method - thanks!

Phil.
 
Old 12-05-2008, 02:53 AM   #10
croog
LQ Newbie
 
Registered: Feb 2006
Distribution: fedora-17-x86_64 Xfce
Posts: 29

Rep: Reputation: 1
I have successfully booted from an iso image, thanks to LFS. I'm trying to figure out how to apply what I did for the LFS-Live cd to another iso. according to LFS-Live documentation
Quote:
BOOTING FROM ISO IMAGE

If you want to boot this CD on a computer without a CD-ROM drive, follow the steps below.

Store the ISO image of this CD as a file on a partition formatted with one of the following filesystems: vfat, ntfs, ext2, ext3, ext4, jfs, reiserfs, reiser4, xfs

Copy the boot/isolinux/{linux,initramfs_data.cpio.gz} files from the CD to your hard disk

Configure the boot loader to load “linux” as a kernel image and “initramfs_data.cpio.gz” as an initrd. The following parameters have to be passed to the kernel:

rw root=iso:/dev/XXX:/path/to/lfslivecd.iso rootfstype=fs_type

where /dev/XXX is a partition where you stored the LiveCD image, and fs_type is the type of the filesystem on that partition. You may also want to add “rootflags=…” option if mounting this partition requires special flags.
I don't know what types of files to look for in an iso to use as an 'initrd 'or 'kernel image'
If this means enough to you for you to use the same method on another bootable iso, please explain what it means.

Btw LFS is Linux From Scratch you can check it out at www.linuxfromscratch.org
 
Old 12-25-2008, 07:57 PM   #11
Windows to Linux
Member
 
Registered: Sep 2008
Distribution: Ubuntu LTS
Posts: 57

Rep: Reputation: 16
Hey, philip rhoades!

I believe that the X in your last quote refereed to which hard disk drive, and Y was which partition of the disk

Example: hda1, the first disk and its first partition (known to windows as C)(non-IDE drives are refereed to as sdX,Y), hda2, the 1st disk and it's 2nd partition (a common place to put Linux on a dual-boot system), hdb6, the second hard disk and its 6th partition, hde1, the 5th disk and its first partition

the letter refers to which disk of its type, a=first, b=second, c=third, ect.
the number is which partition of the disk (don't know what a partition exactly is, ask someone else)

Last edited by Windows to Linux; 12-25-2008 at 07:58 PM. Reason: stupid smiles
 
Old 12-26-2008, 02:40 AM   #12
philip_rhoades
LQ Newbie
 
Registered: Nov 2008
Posts: 12

Rep: Reputation: 0
"Windows to Linux",

I know all that - what are you getting at? I said the "cdrom=. . ." line was not a valid wodim command . .

Regards,

Phil.
 
Old 05-03-2009, 11:39 PM   #13
QBall2U
LQ Newbie
 
Registered: Apr 2007
Location: The GREAT USA (if we ever get rid of Obama, that is)
Distribution: The latest one is Mint Linux but I'm still looking into others.
Posts: 16

Rep: Reputation: 0
Quote:
Originally Posted by philip_rhoades View Post
"Windows to Linux",

I know all that - what are you getting at? I said the "cdrom=. . ." line was not a valid wodim command . .

Regards,

Phil.
He is saying that, "cdrom=/dev/hdX,Y" would be "cdrom=/dev/hda1" or "cdrom=/dev/sda1" or whatever your cdrom or dvdrom drive letter and partition number is...you need to replace the 'X' with 'a' or 'b' or 'c', and replace the 'Y' with a number. Your cdrom or dvdrom drive designation changes with almost every linux distro; they usually follow a format such as: hda1 ... hda2 ... etc. for the first hard drive, hdb1 ... hdb2 ... hdb3 ... etc. for the second hard drive, etc. and for cdrom/dvdrom drives it would be like: sda1 ... sda2 ... sdb1 ... sdb2 ... sdc1 ... sdc2 ... etc. where the 'sd' means 'scsi-drive or disc'.

And, from what I gather of what _you_ are saying, that you substituted the drive letter and partition number and yet the switch (cdrom=/dev/sda1 or whatever your cdrom's designation is) does not work?

[EDIT]
I think that I see why the '"cdrom=/dev/hdX,Y" doesn't work ... you need to change the '/dev/hdX,Y' to '/dev/sda1' - - what I mean is, change the 'hd'. 'hd' refers to hard drive, not cdrom or dvdrom drive! Check with the distro which drive designation it uses for a cdrom or dvdrom drive...it will NOT be 'hd'!

Last edited by QBall2U; 05-03-2009 at 11:44 PM. Reason: Saw an error in both my post and original post I replied to.
 
Old 11-12-2009, 07:36 PM   #14
philip_rhoades
LQ Newbie
 
Registered: Nov 2008
Posts: 12

Rep: Reputation: 0
Quote:
Originally Posted by QBall2U View Post
He is saying that, "cdrom=/dev/hdX,Y" would be "cdrom=/dev/hda1" or "cdrom=/dev/sda1" or whatever your cdrom or dvdrom drive letter and partition number is...you need to replace the 'X' with 'a' or 'b' or 'c', and replace the 'Y' with a number. Your cdrom or dvdrom drive designation changes with almost every linux distro; they usually follow a format such as: hda1 ... hda2 ... etc. for the first hard drive, hdb1 ... hdb2 ... hdb3 ... etc. for the second hard drive, etc. and for cdrom/dvdrom drives it would be like: sda1 ... sda2 ... sdb1 ... sdb2 ... sdc1 ... sdc2 ... etc. where the 'sd' means 'scsi-drive or disc'.

And, from what I gather of what _you_ are saying, that you substituted the drive letter and partition number and yet the switch (cdrom=/dev/sda1 or whatever your cdrom's designation is) does not work?

[EDIT]
I think that I see why the '"cdrom=/dev/hdX,Y" doesn't work ... you need to change the '/dev/hdX,Y' to '/dev/sda1' - - what I mean is, change the 'hd'. 'hd' refers to hard drive, not cdrom or dvdrom drive! Check with the distro which drive designation it uses for a cdrom or dvdrom drive...it will NOT be 'hd'!

You misunderstand - I said you can't use the "cdrom= . . " line AT ALL because it is not a WODIM command . .

Phil.
 
Old 05-14-2010, 08:21 AM   #15
hobbes1069
LQ Newbie
 
Registered: Dec 2007
Posts: 4

Rep: Reputation: 0
Quote:
Originally Posted by McStarfighter View Post
Hello to all,

I search a solution for the same problem and will be very happy to hear something about this.
I think I have found a solution but have not had an opportunity to test it yet. There is a program called "memdisk" that is part of the syslinux project and is used to load floppy images in the System Rescue CD. Memdisk can work with Grub to load floppy images, ISO's, and other raw images. A sample grub entry may look like this:

title Memdisk Launcher
root (hd0,0)
kernel /memdisk iso
initrd /path/to/ISO/on/(hd0,0)


See the memdisk homepage[1] for more specifics.

Richard

[1] http://syslinux.zytor.com/wiki/index.php/MEMDISK
 
  


Reply



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 - Booting an ISO image timothykaine Linux - Software 3 04-20-2005 07:14 PM
lilo/grub and iso burning question rossAINTfakin Linux - Newbie 3 08-25-2004 05:27 PM
Booting problems: grub and lilo neri Linux - Newbie 10 05-17-2004 10:17 AM
Booting raw XP in vmware under gentoo, grub Error 17 sharon42 Linux - Software 3 01-08-2004 01:03 PM
Booting GRUB through LILO? TheOneAndOnlySM Linux - Newbie 5 08-01-2003 08:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:18 AM.

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
Open Source Consulting | Domain Registration