Use Lilo or grub to mount and boot from ISO


Recommended Posts

Well, I guess the title says it all. I saw some threads on other forums about using some boot files on a flash drive to mount and bot an ISO image from on the same drive.

I want to do this from a CF card in an SFF pc. I need to boot from the CF card, but the ISO is a bootable CD and is not yet written to boot from flash. It then occured to me that a bootloader like this could be very useful for booting from any cd imagewithout having to burn a CD. This could even be used on a harddrive with multiple images which can be upgraded simpley by replacing the ISO file.

Any thoughts?

Here are the threads I read:

http://damnsmalllinux.org/cgi-bin/forums/i...t=ST;f=5;t=4914

http://www.gibraltar.at/pipermail/gibralta...-June/002917.ht

Linux can mount an ISO image and treat it like a mounted device and read the files.

You just have to find some way to boot an intial kernel, if I am not mistaken. I believe what you are thinking of is very doable in Linux.

I am not very familiar with linux, yet, so this is a little over my head, but I did find this article about using grup to load and boot from a diskimage pulled from tftp, si it should be fairly similar.

http://www.faqs.org/docs/Linux-HOWTO/Clone-HOWTO.html

It is possible to boot from an ISO using GRUB/LILO, but there is an alternative way.

It envolves to make a previous extraction of the contents of the ISO to an HD partition.

This is the procedure that is most commonly used to boot Live CD's from HD without

the need to write them to a CD. Also running a LiveCD from HD, speeds up the system

as the access speeds from an HD are not compared with the ones that CD drives have.

Here's how to boot a LiveCD from HD (using grub, Knoppix [or knoppix based LiveCD iso] and a Linux system):

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

-edit the menu.list located in /boot/grub and add an entry like this to it:

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

using LILO should be like this:

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

This can also be done using an external device such as an USB storage device but GRUB

or LILO has to be installed on it. It can even boot from a win partition by using a floppy with LILO/GRUB

to boot it or adding an entry to the NT bootloader.

Works with all the LiveCD's based on Knoppix, DSL, SLAX... (the fromhd cheatcode of

SLAX is different from the one Knoppix uses).

Not direct boot from an ISO image but pretty usefull to test out a new LiveCD without the need

to burn it.

here's a page for more options using similar techniques:

http://www.knoppix.net/wiki/Hd_Based_HowTo

  • 5 months later...

Hey Lechio

I have also considered this option but I have about 30 live CDs and am looking for a way to dynalically list and select one of them at boot time, mainly for trying out and testing diffrent distros.

I have tried the qemu emulator, althoug it works well it is still a bit sluggish sometimes and sometimes the OS behaves diffrently on the actual Hardware

Any info will be apriciated :)

GX

It is possible to boot from an ISO using GRUB/LILO, but there is an alternative way.

It envolves to make a previous extraction of the contents of the ISO to an HD partition.

This is the procedure that is most commonly used to boot Live CD's from HD without

the need to write them to a CD. Also running a LiveCD from HD, speeds up the system

as the access speeds from an HD are not compared with the ones that CD drives have.

Here's how to boot a LiveCD from HD (using grub, Knoppix [or knoppix based LiveCD iso] and a Linux system):

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

-edit the menu.list located in /boot/grub and add an entry like this to it:

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

using LILO should be like this:

image=/boot/linux26
 ? ? ? ?initrd=/boot/minirt26.gz
 ? ? ? ?label=KNOPPIX
 ? ? ? ?append="ramdisk_size=100000 fromhd=/dev/hda4"

This can also be done using an external device such as an USB storage device but GRUB

or LILO has to be installed on it. It can even boot from a win partition by using a floppy with LILO/GRUB

to boot it or adding an entry to the NT bootloader.

Works with all the LiveCD's based on Knoppix, DSL, SLAX... (the fromhd cheatcode of

SLAX is different from the one Knoppix uses).

Not direct boot from an ISO image but pretty usefull to test out a new LiveCD without the need

to burn it.

here's a page for more options using similar techniques:

http://www.knoppix.net/wiki/Hd_Based_HowTo

585740612[/snapback]

  • 5 years later...
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Which finger's fingernail are we talking about? I can see how not having this info can lead to massive differences in interpretation.
    • This Chinese company is reportedly developing a feature Apple and Samsung can only dream of by Hamid Ganji While companies like Apple and Samsung have been relatively conservative with their devices’ battery capacities in recent years, Chinese manufacturers have taken the competition to the next level by introducing significantly larger batteries. However, the latest report from China suggests that a local company may already be developing a smartphone with a whopping 14,000mAh battery. Chinese leaker Digital Chat Station claimed on Weibo that a smartphone maker is developing a device with a 14,000mAh battery. If true, it would be the largest battery ever used in a smartphone and could, in theory, provide up to a week of battery life on a single charge. The leaker did not reveal the name of the company behind the device, but there are some clues. This week, HONOR unveiled the X80 Pro Max in China with an 11,000mAh battery and 90W wired charging support. The company also launched the Honor Win in January, which packs a 10,000mAh battery. HONOR, a former subsidiary of Huawei, has a proven track record of developing smartphones with unusually large batteries. However, other Chinese brands, including Xiaomi, have also launched devices such as the Xiaomi 17 Pro Max with 7,500mAh batteries. Though Chinese users on Weibo also believe the company behind the new battery is HONOR. Interestingly, Digital Chat Station said the device with the 14,000mAh battery weighs around 220 grams, making it lighter than the Apple iPhone 17 Pro Max (233 grams) and slightly heavier than the Samsung Galaxy S26 Ultra (214 grams). The iPhone 17 Pro Max currently packs a 5,088mAh battery in eSIM-only versions, while the Galaxy S26 Ultra features a 5,000mAh battery. Neither device is expected to see a dramatic increase in battery capacity in its next-generation successor. So when it comes to battery comparison, Chinese brands are unbeaten. HONOR smartphones are currently available in the EU, but the Chinese brand has no official presence in the United States due to restrictions imposed by the U.S. government.
    • Qualcomm takes on NVIDIA with new Dragonfly CPU and AI chips by Pradeep Viswanathan Microsoft, Google, Amazon, AMD, Meta, Apple, OpenAI, and several others have been developing their own chips for AI infrastructure. However, NVIDIA still remains the dominant player in the market. Today, Qualcomm announced a major expansion of its data center infrastructure portfolio to better compete with NVIDIA. The new lineup includes the Qualcomm Dragonfly C1000 CPU, Qualcomm High Bandwidth Compute technology, the Dragonfly AI300 inference accelerator, new connectivity products, and custom silicon solutions. Qualcomm claims that this new lineup improves performance per watt, token throughput, and total cost of ownership for AI data centers. The Dragonfly C1000 is a new data center CPU built with Qualcomm’s custom Oryon cores. This chip will feature more than 250 cores, frequencies above 5GHz, and a chiplet-based design. Qualcomm claims that this new C1000 can deliver more than 2x better performance per watt compared to existing server CPU offerings based on specifications. The Dragonfly C1000 will support PCIe Gen 7 with more than 2TB/s of connectivity, along with CXL, advanced RAS features, and both air and liquid cooling. Qualcomm expects the Dragonfly C1000 to be commercially available in 2028. Additionally, Qualcomm and Meta announced a multi-year, multi-generation agreement under which Qualcomm will supply Dragonfly C1000 data center CPUs for Meta’s next-generation server fleet. Qualcomm also announced High Bandwidth Compute, a new near-memory computing architecture designed to address AI’s memory bandwidth bottleneck. HBC Gen 1 will debut with the Dragonfly AI250, which is expected to sample in mid-2027. The AI250 will deliver 133TB/s per card, an 18x increase in effective memory bandwidth compared to the AI200 with LPDDR5X. The new Dragonfly AI300 with HBC Gen 2 is a rack-level AI inference platform from Qualcomm. Qualcomm claims that the AI300 can deliver 4x to 8x better performance per watt compared to existing GPU-based architectures based on memory bandwidth per watt per card. The Dragonfly AI300 is expected to be available in 2028.
  • Recent Achievements

    • Week One Done
      Meta Plast earned a badge
      Week One Done
    • First Post
      kinowa earned a badge
      First Post
    • Rookie
      krychek57 went up a rank
      Rookie
    • Grand Master
      Jaybonaut went up a rank
      Grand Master
    • One Year In
      Philsl earned a badge
      One Year In
  • Popular Contributors

    1. 1
      +primortal
      461
    2. 2
      +Edouard
      171
    3. 3
      PsYcHoKiLLa
      136
    4. 4
      Michael Scrip
      78
    5. 5
      Xenon
      77
  • Tell a friend

    Love Neowin? Tell a friend!