LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 11-23-2004, 06:14 PM   #1
boffin
LQ Newbie
 
Registered: Nov 2004
Posts: 2

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


Hi,

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?

Regards

Simon
 
Old 11-24-2004, 01:48 AM   #2
mcleodnine
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
Code:
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
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 61
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.

Yves.
 
Old 11-24-2004, 04:56 AM   #4
varunnarang
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
boffin
LQ Newbie
 
Registered: Nov 2004
Posts: 2

Original Poster
Rep: Reputation: 0
Hi,

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?

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

Rep: Reputation: 64
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.

Cool
 
Old 11-25-2004, 10:38 AM   #7
mcleodnine
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
Code:
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
arctidog
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
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,796

Rep: Reputation: 323Reputation: 323Reputation: 323Reputation: 323
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
JoeyAdams
Member
 
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).
 
  


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
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/Novell 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


All times are GMT -5. The time now is 09:03 AM.

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