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

    • Personally, I’ve found that it’s usually worth investing in the infrastructure you don’t want to replace later, especially cabling. Running Cat6A (or better, depending on your needs) during an upgrade is relatively inexpensive compared to having to re-cable a few years down the road. For switches I try to balance current specs with realistic growth. If my budget allows it Ill choose switches with higher uplink speeds which leaves room for expanding later on, but I don’t necessarily overspend on access ports if the endpoints won’t benefit from them anytime soon. One lesson I’ve learned is that planning for scalability pays off. It’s much easier to add devices, VLANs, or higher-bandwidth workloads when your network infrastructure already supports it than to replace hardware later.  What is your budget like?
    • I hate the term, "future-proof." We saw it back in the 90's / 2000's, if not before. You cannot future-proof anything, since there is no definition of how far into the future you plan on prepping for. Best idea is to tell us what you currently have and what its use is at the moment, and we can then offer ideas about some areas that might need an upgrade and other areas that can be left alone.
    • I can agree that it is being used in a small capacity. I worked for a company where their engineers still used XP, and when asked why it was because their sensor software wasn't compatible with newer operating systems and the software was discontinued so they couldn't upgrade the software. Given that the sensors were still in use by companies, they had to continue using XP to support the sensor, otherwise the price to the company would have gone into the millions or billions. Our response was simple: Ok, you can keep the XP machine. But we're removing it from the network. "But then it can't access the Internet or folder shares!" Yup, kinda the point. If someone wants to continue using an unsecure OS they can do, I have no problem with that. But it should be isolated. Simple. I had a fight with a guy in the engineering department for weeks before he finally relented. But we digress.   What do I plan on doing to commemorate the anniversary? Nothing. I have fond memories of the OS, but at the end of the day it's just an OS. If I had some time I might see if I could install it on my Raspberry Pi for a laugh. But my reflex memory with today's OS ideas would probably get me frustrated and I'd uninstall it after 5 mins.
    • Shutter Encoder 20.2 by Razvan Serea Shutter Encoder is one of the best video converter software and image, audio available today. It has been designed by video editors in order to be as accessible and efficient as possible. It is one of the few free professional tools. Based on FFmpeg, it has the largest codec library available. You can thus convert your files into many different formats. Complete settings for the most advanced Shutter Encoder has a panel containing a large number of settings, in order to define your own choices based on your files and perfect your video or audio output. Well-thought-out settings, with parameters predefined to create files quickly and easily. List of functions Without conversion: Cut without re-encoding, Replace audio, Rewrap, Conform, Merge, Extract, Subtitling, Video inserts Sound conversions: WAV, AIFF, FLAC, MP3, AAC, AC3, OPUS, OGG Editing codecs: DNxHD, DNxHR, Apple ProRes, QT Animation, GoPro CineForm, Uncompressed YUV Output codecs: H.264, H.265, VP9, AV1, OGV Broadcast codecs XDCAM HD422, AVC-Intra 100, XAVC, HAP....and much more. Shutter Encoder 20.2 changelog: Added "Intel Quick Sync" hardware acceleration for Linux Added 'Identify speakers' option for "Audio transcription" function Improved installer package Improved video player performance Improved timecode display with drop-frame videos Improved naming convention for surround audio files Fixed splash screen freeze Fixed bug with file hanging Fixed bugs with presets loading Fixed bugs with video player's buffer Fixed bug with 'Total length of file' option Fixed bugs with 'Record screen/device' option Fixed bug with "XAVC" & "XAVC Long GOP" functions Rollback to XPDF tool for PDF conversion Removed unused binary architecture for Mac Various corrections Various improvements Download: Shutter Encoder 20.2 | 166.0 MB (Open Source) Download: Shutter Encoder Portable | 185.0 MB Links: Shutter Encoder Home Page | FAQ / Tips | macOS | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • did you give it permission to do so? its probably on the ToS. After that South Park episode I'm paying attention to them lol
  • Recent Achievements

    • Reacting Well
      NovaEdgeX earned a badge
      Reacting Well
    • Week One Done
      NovaEdgeX earned a badge
      Week One Done
    • One Year In
      BA the Curmudgeon earned a badge
      One Year In
    • Conversation Starter
      rosiecharles earned a badge
      Conversation Starter
    • First Post
      KMilenkoski1202 earned a badge
      First Post
  • Popular Contributors

    1. 1
      +primortal
      534
    2. 2
      +Edouard
      265
    3. 3
      PsYcHoKiLLa
      152
    4. 4
      Steven P.
      99
    5. 5
      macoman
      66
  • Tell a friend

    Love Neowin? Tell a friend!