Bug 271881 - Boot ISO image on USB disk from non-USB bootable computer
Boot ISO image on USB disk from non-USB bootable computer
Product: Fedora
Classification: Fedora
Component: LiveCD (Show other bugs)
All All
medium Severity urgent
: ---
: ---
Assigned To: David Zeuthen
: Reopened
Depends On:
  Show dependency treegraph
Reported: 2007-08-31 11:38 EDT by Philip Ashmore
Modified: 2013-03-05 22:51 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-09-04 11:06:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
A modified version of initrd.img capable of handling "nocoaster" (5.61 MB, application/octet-stream)
2007-09-01 12:40 EDT, Philip Ashmore
no flags Details

  None (edit)
Description Philip Ashmore 2007-08-31 11:38:29 EDT
Description of problem:
I'm downloading F8-Test1 because I want to participate in the testing process.
I don't want to burn another CD that's destined to be a coaster.
I would dearly love a new laptop that has USB boot support - I could then avail
of Grubs ISO boot capability, but alas I don't have one of those.
I know other OS's provide floppy disk images you can bootstrap an install from.
I know it's possible to compile a kernel image with loadable modules for
1. USB disk support
2. ISO image mounting
so it would seem perfectly possible for such a kernel diskette to mount a USB
device then mount the ISO image on that device and chroot from there.

Version-Release number of selected component (if applicable):

How reproducible:
Too often

Steps to Reproduce:
1. Download ISO image
2. Burn another coaster?
Actual results:

Expected results:

Additional info:
This would also make it possible to compare multiple live images stored on the
same USB drive - as grub boot options?

It would also help if you supplied 'deltas' when Fedora 8 is released,
containing what was updated to save us poor souls from having to download the
entire image again.
This delta could be a script that patches the already-downloaded-iso to the F8 iso.
Comment 1 Jeremy Katz 2007-08-31 11:46:59 EDT
Floppies don't work anymore -- the size of the kernel alone is more than the
size of a floppy these days.  CDs or booting from USB are the only way to go.
Comment 2 Philip Ashmore 2007-08-31 23:36:14 EDT
Ok - not an option.
But for testing purposes what about the following

1. Copy the CD's isolinux directory to /boot/f8t1
# mount -o ro -o loop /opt/tests/Fedora-8-Test-1-KDE-Live-i686.iso /mnt/loop
# cp -fr /mnt/loop/isolinux /boot/f8t1

2. Add a Grub entry
title Fedora 8 Test 1
    root (hd0,0)
    kernel /f8t1/vmlinuz ro root=Fedora-8-Test-1-KDE-Live-i686 liveimg nocoaster
    initrd /f8t1/initrd-lvm.img

3. Create a modified initrd.img for LVM/local ISO image to handle "nocoaster"
/boot/f8t1/init-lvm.ing would be a modified version of /boot/f8t1/initrd.img
containing lvm (and lvm.static?) as well as a modified init script that did the
if [ "x$nocoaster" == "x1" ] ; then
    echo "********************************************************************"
    echo "********************************************************************"
    echo "******************************  NO  ********************************"
    echo "***************************** COASTER  *****************************"
    echo "********************************************************************"
    echo "********************************************************************"
    echo "Scanning logical volumes"
    lvm vgscan --ignorelockingfailure
    echo "Activating logical volumes"
    lvm vgchange -ay --ignorelockingfailure  VolGroup00
    mount -t ext3 -o ro /dev/VolGroup00/LogVol00 /localdrive
    mountoptions=-o loop -o ro
    mount -n -t $rootfstype $mountoptions $thingtomount /sysroot
    echo "Dropping to a shell. "
    echo "Check /localdrive and /sysroot and exit shell to continue. Good luck!"
    mount -n -t $rootfstype $mountoptions $thingtomount /sysroot

You should be able to tell from the last mount statement where this goes.
I got this far by copying lvm from my current kernels initrd.img.

Unfortunately I got kicked into a bash prompt before this (learning curve) but
was at least able to run the two lvm lines.

lvm couldn't get logical volumes working - missing entry in /proc/misc - missing
kernel module?

I'm sure you can see where I'm going with this - should I clone this bug using a
new summary like
"Boot ISO image from local disk"?
Comment 3 Philip Ashmore 2007-09-01 12:40:10 EDT
Created attachment 184521 [details]
A modified version of initrd.img capable of handling "nocoaster"
Comment 4 Philip Ashmore 2007-09-01 12:53:53 EDT
Lots of changes to init and even etc/fstab to run an iso image from
/opt/tests/Fedora-8-Test-1-KDE-Live-i686.iso on /dev/VolGroup00/LogVol00, using
the above addition to grub.conf.

I added 'nocoaster check' to my grub.conf - the iso image checksummed OK.

I'm sure you could do better
 - option to unsquash iso.img locally
 - better ordering of my changes in init
 - script to provide an easier means to specify the ISO location and to
   automatically determine whether it resides on a logical volume.
 - easier means of generating initrd.img (in my case initrd-lvm.img)

Notes on Fedora 8 Test 1:
1. It's _slow_. I suspect this is squashfs at work - should offer unsquash.
2. Release notes seem to refer to Fedora 7.
3. Hyperlinks don't work on release notes.
4. kpowersave still crashes with alt-click/configure kpowersave(as it does in F7)
Comment 5 Philip Ashmore 2007-09-04 09:41:21 EDT
Using this approach in combination F8 'delta' images one could make a logical
volume 'sandwich' with the F8 test 1 image at the bottom, intervening delta
images successively above it and the sparse file on top.
This could really encourage widespread testing, but I think these deltas and F8
test 1 would have to be unsquashed.
Comment 6 Jeremy Katz 2007-09-04 11:06:29 EDT
While things like this can be hacked together, doing it right has to be such
that it doesn't depend on specific partitioning schemes, etc.  Which is going to
make it quite a bit harder and I don't know that it's really realistic. 
Especially as you have to be very careful mucking around with (potentially not
cleanly unmounted filesystems, or even ones that are actively hibernated).

If you want to keep working towards it, you can send patches to
fedora-livecd-list, but I have some serious reservations up-front and I don't
think that the complication is really going to be worth it.

Note You need to log in before you can comment on or make changes to this bug.