[Bug 910924] Re: livecd: initrd: scripts/casper-helpers: fstype returns ext3 on luks container

Brian Murray brian at ubuntu.com
Wed Jan 25 22:56:26 UTC 2012


** Changed in: casper (Ubuntu)
   Importance: Undecided => Medium

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to casper in Ubuntu.
https://bugs.launchpad.net/bugs/910924

Title:
  livecd: initrd: scripts/casper-helpers: fstype returns ext3 on luks
  container

Status in “casper” package in Ubuntu:
  Confirmed

Bug description:
  Trying to boot ubuntu 11.10  from livecd iso image via grub.

  menuentry "Ubuntu" {
    iso_path=/ubuntu-11.10-desktop-i386.iso
    export iso_path
    search --set --file $iso_path
    loopback loop $iso_path
    root=(loop)
    configfile /boot/grub/loopback.cfg
  }

  However, booting fails w/ an initramfs prompt stating that /dev/sda2
  could not be mounted.

  /dev/sda2 is a luks container.

  /dev/sda7 contains ubuntu-11.10-desktop-i386.iso

  Cause: in initrd.lz: file casper-helpers calls /bin/fstype. fstype returns FSTYPE=ext3 for /dev/sda2 (which is a luks container). 
  find_path() in lupin-helpers then fails to mount /dev/sda2 using fstype ext3 dropping to an initramfs prompt.

  fstype version:
  ba50b66bff0437ff23e6e729de8f5d69 /bin/fstype

  Solution: Unpack casper/initrd.lz, disable  call to fstype and repack
  initrd.lz. Boot the iso file using the patched initrd.lz.

  Patch:

  --- casper-helpers      2012-01-02 18:28:21.000000000 +0100
  +++ scripts/casper-helpers   2012-01-02 01:06:41.000000000 +0100
  @@ -41,11 +41,11 @@
   get_fstype() {
       local FSTYPE
       local FSSIZE
  -    eval $(fstype < $1)
  -    if [ "$FSTYPE" != "unknown" ]; then
  -        echo $FSTYPE
  -        return 0
  -    fi
  +    #eval $(fstype < $1)
  +    #if [ "$FSTYPE" != "unknown" ]; then
  +    #    echo $FSTYPE
  +    #    return 0
  +    #fi
       /sbin/blkid -s TYPE -o value $1 2>/dev/null
   }

  New grub config:

  menuentry "Ubuntu" {
    iso_path=/ubuntu-11.10-desktop-i386.iso
    export iso_path
    search --set --file $iso_path
    loopback loop $iso_path
    root=(loop)
    linux   /casper/vmlinuz  file=/cdrom/preseed/ubuntu.seed boot=casper iso-scan/filename=${iso_path} quiet splash -- lang=de
    initrd (hd0,7)/ubuntu-11.10-desktop-i386-initrd.lz
  }

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/casper/+bug/910924/+subscriptions




More information about the foundations-bugs mailing list