Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 11-23-2004, 06:14 PM   #1
LQ Newbie
Registered: Nov 2004
Posts: 2

Rep: Reputation: 0
Boot an iso without a CD off a hard disk?


This I think is simple but I can't make it work. I want to boot an iso from hard disk using grub in a repeatable fashion

The case for it is two fold. I have a system that I want to upgrade the OS on but It has no CD OR floppy. It does however have a spare partition and disk space.
I can also use this to test a live CD I want to build. I know that I can mount an iso in loopback mode but then I wouldn't be able to boot it.

I'm thinking that I can dd a bootable iso image into the partiton and then boot from that partition next boot. This would allow me to boot any OS installer really easily without having to have a CD-RW to hand.

OK so I am doing this which works OK with no errors if the partition is big enough.
# dd if=boot.iso of=/dev/hda4

I can mount this OK using mount -t iso9660 /dev/hda4 /mnt/iso

It's the grub config that gets me. Why doesn't chainloading the disk work? the grub entry is this:
title Boot ISO
root (hd0,3)
chainload +1

This fails and goes back to the grub menu.

I've also tried this config for linux boot cds (Suse 9.1)
title boot suse installer
kernel (hd0,3)/boot/loader/linux
initrd (hd0,3)/boot/loader/initrd

but this fails because grub cannot read iso9660 filesystems. I can boot the CD by copying the kernel and initrd to the /boot on the linux partiition. However this is not going to help me when I want to boot a different os (eg a windows/dos/BSD boot iso)

I'm stuck here, help appreciated. Am I on the right track or should I be trying a different approach?


Old 11-24-2004, 01:48 AM   #2
Senior Member
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
You can mount an ISO image with
mount /path/to/image.iso /mnt/mountpoint -t iso9660 -o loop=/dev/loop0
from there you can copy the image data to a more permanent source.
Old 11-24-2004, 03:20 AM   #3
Senior Member
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 63
Booting an ISO is not possible IMO. But for testing ISO files without burning them, there's maybe a solution: BOCHS. This virtual machine should be able to boot and test an ISO file.

Old 11-24-2004, 04:56 AM   #4
LQ Newbie
Registered: Oct 2004
Location: India
Distribution: RHL 9.0
Posts: 22

Rep: Reputation: 15
Hello Boffin,
How are you doing???
You seem to be knowl'ble person, so please tell me that can I install Linux from the ios images stored on the Hard Disk after booting the system from floppy or CD, if yes How can I make it happen. I am new to Linux but eager to get to the core.
Please help...
Old 11-25-2004, 02:47 AM   #5
LQ Newbie
Registered: Nov 2004
Posts: 2

Original Poster
Rep: Reputation: 0

Thanks for the advice everyone. Can anyone explain why this doesn't work? as I'm really no closer.

I haven't investigated yet but knoppix seems to have a boot from iso on disk trick using bootfrom= option.Does anyone have any experience of this?

Old 11-25-2004, 02:50 AM   #6
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 68
I think what things like that do is 'jump start' the boot, so you are still booting from CD first, and then jumping into the ISO. So directly booting from the ISO wouldn't work, but an intermediate source, for example a bootable CD like knoppix, would get you going and then mount up the ISO and launch it as the OS.

Old 11-25-2004, 10:38 AM   #7
Senior Member
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
Looking at your original post - you shouldn't need to 'dd' the iso image. Mounting it as a loop device will make it 'readable' and from there you can copy it to your new partition with somehting like
cd /mnt/point
find . -xdev | cpio -pmv /path/to/new/partition
The loop device is just a virtualized filesystem, not a permanent one, and that's why you can't see it when you reboot.
Old 12-26-2004, 08:40 PM   #8
LQ Newbie
Registered: Jun 2004
Posts: 28

Rep: Reputation: 15
Well, I hear dd and I hear "just copy the files". Solution is simple, but by no means one-step. First format the partition. Then you mount the loopback and copy all the files. Then configure and install grub or lilo into the PARTITION BOOT SECTOR. Live cds use isolinux, so dd will end up copying that. I'm not sure how exactly that would work on a hard drive, but it sounds wierd.

Best of luck.
Old 12-26-2004, 10:23 PM   #9
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Not to seem disputatious, BUT. I had a similar situation. I d/l'd an ISO, but didn't have a cd-r to burn it to cd. After googling for a while, I found a document which said, quite simply:
If you have room on your harddrive, create a small partition. format it as though it were a cd (iso9660) and install the iso there as though you were burning a cd. Then mount and install from there.
Old 12-31-2007, 03:54 PM   #10
Registered: Jun 2006
Distribution: Kubuntu Hardy
Posts: 94

Rep: Reputation: 15
If you have a floppy drive but not a CD drive, you can use bootstrap floppies (e.g. Debian provides bootstrap floppies, such as boot.img and root.img) and tell the system manually to use a block device rather than the CD drive. Moreover, I think you can mount floppies with chainloader, but I haven't tried it myself (though I know it's possible to mount a floppy on a hard drive).


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
Boot ISO image from hard disk? AlexV Linux - General 8 02-20-2009 08:34 AM
Explore and Extract ISO to Hard Disk Steknos Linux - Software 18 11-30-2008 03:08 PM
how can i install SUSE 9.3 PRO via hard disk ISO file desun SUSE / openSUSE 3 04-17-2005 03:53 AM
Install from hard disk with ISO JermJHart Mandriva 1 11-24-2004 01:50 AM
making a ISO of my hard disk Bradless Linux - General 10 08-17-2004 12:46 PM > Forums > Linux Forums > Linux - Software

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

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