Failed to boot LiveCD iso from ext4 partition

Bug #454456 reported by Dylan Thacker-Smith
This bug report is a duplicate of:  Bug #460740: ext4 not supported for loopback. Edit Remove
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
lupin (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: lupin-casper

The use case is that I was trying to run the LiveCD for the Ubuntu Karmic beta (http://releases.ubuntu.com/releases/9.10/ubuntu-9.10-beta-desktop-i386.iso) without burning a CD. Instead I tried using grub2's loopback feature to load the iso image from an ext4 partition.

Instead my ext4 partition wasn't loaded, and I got dropped to the shell from the initramfs due to a panic in /scripts/casper-premount/20iso_scan (on line 35 along with the error message I get). I was able to continue loading the LiveCD with the following commands:
(initramfs) mount -t ext4 /dev/sda5 /isodevice
(initramfs) echo "LIVEMEDIA=/isodevice/home/dylan/Desktop/ubuntu-9.10-beta-desktop-i386.iso" >> /conf/param.conf
(initramfs) echo "LIVEMEDIA_OFFSET=0" >> /conf/param.conf
(initramfs) exit

# Grub2 menuentry for booting the iso image:
menuentry "ubuntu-9.10-beta.iso" {
    insmod ext2
    loopback loop (hd0,5)/home/dylan/Desktop/ubuntu-9.10-beta-desktop-i386.iso
    linux (loop)/casper/vmlinuz iso-scan/filename=/home/dylan/Desktop/ubuntu-9.10-beta-desktop-i386.iso file=/cdrom/preseed/ubuntu.seed boot=casper quiet
    initrd (loop)/casper/initrd.lz
}

I found the problem was in /scripts/lupin-helper, since it's is_supported_fs function doesn't list ext4 as supported, so my ext4 partitions get skipped when looking for the iso file, even though I had no problem mounting the ext4 filesystem manually. I fixed the problem with the following steps after booting normally (i.e. no LiveCD):

mount -o loop /home/dylan/Desktop/ubuntu-9.10-beta-desktop-i386.iso /mnt
mkdir ~/cpio && cd ~/cpio
lzcat < /mnt/casper/initrd.lz | cpio -id
vi ~/cpio/scripts/lupin-helper # See the attached patch for my changes.
find . -print | cpio -o -H newc | lzma -c > ~/initrd.lz
sudo vi /boot/grub/grub.cfg # Change the initrd line: initrd (hd0,5)/home/dylan/initrd.lz

The lupin-helper script appears to be part of the lupin-casper package, and my patch still applies to bazaar repository for the package (http://bazaar.launchpad.net/~ubuntu-installer/lupin/hardy).

lupin-casper version: 0.25

Let me know if anything isn't clear (e.g. I may have made typos in the commands for this post).

Revision history for this message
Dylan Thacker-Smith (dylan-smith) wrote :
summary: - Failed to boot LiveCD iso from ext4 parition
+ Failed to boot LiveCD iso from ext4 partition
Revision history for this message
Wolfgang Kufner (wolfgangkufner) wrote :

Thank you Dylan for your detailed explanations. I have found them very useful in working on bug #520500 (booting iso from stick via grub2 loopback gets stuck on particular crypt-luks partition).

I have now been able to loopback boot from ext4 partitions for a long time. This issue seems to have been solved by http://bazaar.launchpad.net/~ubuntu-installer/lupin/hardy/revision/130#casper/scripts/lupin-helpers, starting from a duplicate (Bug #460740) of your report. I am setting your report to duplicate of this so that it inherits the "fix released" status.

Regards

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.