LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Boot ISO image from hard disk? (https://www.linuxquestions.org/questions/linux-general-1/boot-iso-image-from-hard-disk-294744/)

AlexV 02-25-2005 10:19 AM

Boot ISO image from hard disk?
 
Does anyone know if there is a way to save a bootable ISO (say Knoppix for example) to your hard drive and then get GRUB to boot from it? The idea would be for it to act just like a bootable CD -- make all changes to RAM disk, nothing permanent -- but it would be faster and not take up the CD-ROM drive.

Thanks :)

dwight1 02-27-2005 07:02 PM

This question has been asked many times in the past. The answer is currently no. Though yes, it would be useful.

syg00 02-27-2005 10:06 PM

Knoppix (and DSL, maybe others) have a toram boot option.
Slows down the boot (a one-time cost), but releases the CD drive, and runs quick.

rosh1182 04-27-2005 09:18 AM

the answer is .... YES
 
It is possible to d/l an iso and boot from it without burning to a cd. I have done it before, but there are a few steps which involve (from what I remember) essentially making a disk image of the iso onto a partition of your hard drive, then pointing to that partition with either lilo or GRUB. I am currently kicking myself for not bookmarking the site from which I got the instructions, but I will find it and post.

bigrigdriver 04-27-2005 05:28 PM

As i recall, it involves making a partition on the hard drive and formatting for iso9660, then burn the iso to that partition (just like it was a cd). But, to get grub to boot it? Don't know yet. Still looking.

rosh1182 04-27-2005 05:42 PM

here is the answer
 
http://www.neowin.net/forum/lofivers.../t305843.html:

-create a mountpoint to mount the ISO with loopback:
mkdir /mnt/LiveISO

-mount the image:
mount -t iso9660 -o loop,ro /DOWNLOADS/Knoppix-3.7-en.iso /mnt/LiveISO

-create a directory on the device where you are going to boot from:
mkdir /mnt/hda4/KNOPPIX

-copy the contents of the mounted image to that directory:
cp /mnt/LiveISO/KNOPPIX/* /mnt/hda4/KNOPPIX/

-copy kernel and initrd files to yor boot device:
cp /mnt/LiveISO/boot/* /boot

* Grub:
title KNOPPIX
root (hd0,0)
kernel /linux26 ramdisk_size=100000 fromhd=/dev/hda4
initrd /minirt26.gz
savedefault
boot

* Lilo:
image=/boot/linux26
initrd=/boot/minirt26.gz
label=KNOPPIX
append="ramdisk_size=100000 fromhd=/dev/hda4"
-------------------

The basic idea is that you copy the contents of the iso to a partition. Then, in your current linux os, you copy the kernel and initrd images from the iso to your current boot directory. Last, you edit LILO so that it points to the kernel and initrd images you just copied, and make sure you append the "fromhd" line so that the "livecd" will know where the rest of the knoppix files are. I know that similar instructions worked with kanotix as well (which makes sense since it is knoppix based). The only possible problem for other isos (say non-livecds, for example) is that they may not have a "fromhd" option the way knoppix distros do.

kencaz 04-27-2005 05:46 PM

Yes it is possible. Called "Poor Man's Install" I used it successfully for a long time. You can use a bootable .iso but I used the "tohd" option to copy the uncompressed image to my windows partition /dev/hda1. It created a C:\KNOPPIX folder. I still had to boot from the CD but after intering a cheat code:

boot: knoppix fromhd /dev/hda1

I was able to run from my hard drive as if it was the live CD. It ran incredibly faster from the HD, (of course). You can even save your configurations on the windows partition.

The only drawback is that you can't mount your HD in write mode because it then mounts the whole partition as a CDROM.

Here is some more information on it:
http://www.knoppix.net/wiki/Poor_Mans_Install

KC

bigrigdriver 04-27-2005 06:22 PM

Just wondering.

Suppose you have created a partition formated for iso9660 and burned the iso to that partition as if it were a cd.

Could you edit grub.conf (or menu.lst) as follows and make it boot?

title <isoname>
kernel (hdx,y)/boot/<isoimage> root=(hdm,n)
initrd (hdx,y)/boot/<initrd.img)

where (hdx,y) is the grub designation for the partition, and (hdm,n) is the usual (hda,1) type of designation.

salahabdalaly 02-20-2009 07:34 AM

urgent need
 
Quote:

Originally Posted by rosh1182 (Post 1614000)
http://www.neowin.net/forum/lofivers.../t305843.html:

-create a mountpoint to mount the ISO with loopback:
mkdir /mnt/LiveISO

-mount the image:
mount -t iso9660 -o loop,ro /DOWNLOADS/Knoppix-3.7-en.iso /mnt/LiveISO

-create a directory on the device where you are going to boot from:
mkdir /mnt/hda4/KNOPPIX

-copy the contents of the mounted image to that directory:
cp /mnt/LiveISO/KNOPPIX/* /mnt/hda4/KNOPPIX/

-copy kernel and initrd files to yor boot device:
cp /mnt/LiveISO/boot/* /boot

* Grub:
title KNOPPIX
root (hd0,0)
kernel /linux26 ramdisk_size=100000 fromhd=/dev/hda4
initrd /minirt26.gz
savedefault
boot

* Lilo:
image=/boot/linux26
initrd=/boot/minirt26.gz
label=KNOPPIX
append="ramdisk_size=100000 fromhd=/dev/hda4"
-------------------

The basic idea is that you copy the contents of the iso to a partition. Then, in your current linux os, you copy the kernel and initrd images from the iso to your current boot directory. Last, you edit LILO so that it points to the kernel and initrd images you just copied, and make sure you append the "fromhd" line so that the "livecd" will know where the rest of the knoppix files are. I know that similar instructions worked with kanotix as well (which makes sense since it is knoppix based). The only possible problem for other isos (say non-livecds, for example) is that they may not have a "fromhd" option the way knoppix distros do.

how i can setup GRUB from terminal


All times are GMT -5. The time now is 12:13 AM.