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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
09-28-2005, 03:42 PM
|
#1
|
Member
Registered: Mar 2005
Distribution: Breezy Badger
Posts: 248
Rep:
|
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
|
|
|
09-29-2005, 08:18 AM
|
#2
|
Member
Registered: Oct 2004
Location: UK
Distribution: Ubuntu/Kubuntu
Posts: 249
Rep:
|
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 08:19 AM.
|
|
|
07-03-2007, 08:52 AM
|
#3
|
LQ Newbie
Registered: Sep 2006
Posts: 23
Rep:
|
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
|
|
|
08-05-2007, 05:07 PM
|
#4
|
LQ Newbie
Registered: Aug 2007
Posts: 2
Rep:
|
Hello to all,
I search a solution for the same problem and will be very happy to hear something about this.
|
|
|
10-19-2007, 12:39 AM
|
#5
|
LQ Newbie
Registered: Apr 2006
Location: Chagrin Falls, OH
Distribution: Ubuntu / Debian
Posts: 17
Rep:
|
bootfrom
the
"bootfrom=/home/user/foo/bar.iso"
would be the correct way to do this
you have to put in the kernal line
|
|
|
10-20-2007, 11:26 AM
|
#6
|
LQ Newbie
Registered: Oct 2007
Distribution: *ubuntues
Posts: 1
Rep:
|
could you explain it thorougly???
|
|
|
10-21-2007, 05:30 AM
|
#7
|
LQ Newbie
Registered: Aug 2007
Posts: 2
Rep:
|
Argh... the bootfrom parameter is only possible for KNOPPIX and his derivates. SLAX i.E. hasn't this option ...
|
|
|
10-21-2007, 09:18 AM
|
#8
|
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908
|
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 09:20 AM.
|
|
|
11-26-2008, 08:39 AM
|
#9
|
LQ Newbie
Registered: Nov 2008
Posts: 12
Rep:
|
Booting of raw ISO from GRUB/LILO (though preferably GRUB)
Quote:
Originally Posted by bigrigdriver
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.
|
|
|
12-05-2008, 03:53 AM
|
#10
|
LQ Newbie
Registered: Feb 2006
Distribution: fedora-17-x86_64 Xfce
Posts: 29
Rep:
|
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
|
|
|
12-25-2008, 08:57 PM
|
#11
|
Member
Registered: Sep 2008
Distribution: Ubuntu LTS
Posts: 57
Rep:
|
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 08:58 PM.
Reason: stupid smiles
|
|
|
12-26-2008, 03:40 AM
|
#12
|
LQ Newbie
Registered: Nov 2008
Posts: 12
Rep:
|
"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.
|
|
|
05-04-2009, 12:39 AM
|
#13
|
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:
|
Quote:
Originally Posted by philip_rhoades
"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-04-2009 at 12:44 AM.
Reason: Saw an error in both my post and original post I replied to.
|
|
|
11-12-2009, 08:36 PM
|
#14
|
LQ Newbie
Registered: Nov 2008
Posts: 12
Rep:
|
Quote:
Originally Posted by QBall2U
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.
|
|
|
05-14-2010, 09:21 AM
|
#15
|
LQ Newbie
Registered: Dec 2007
Posts: 4
Rep:
|
Quote:
Originally Posted by McStarfighter
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
|
|
|
All times are GMT -5. The time now is 05:05 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|