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

debugger 910924 at bugs.launchpad.net
Tue Jan 3 00:57:04 UTC 2012


Initrd extraction/rebuild methods (at the end of
https://help.ubuntu.com/community/LiveCDCustomization#Removing_the_.28Casper.29_Autologin):

- Extraction:
<citation>
# cd extract-cd/casper
# mkdir lztempdir
# cd lztempdir
# lzma -dc -S .lz ../initrd.lz | cpio -imvd --no-absolute-filenames
</citation>

- Rebuild:
<citation>
And to re-create the initrd.lz file:

# cp ../initrd.lz ../inird.lz.orig
# find . | cpio --quiet --dereference -o -H newc | lzma -7 > ../initrd.lz
</citation>

Use the following compression cmd for gzipped initrd:
# find . | cpio --quiet --dereference -o -H newc | gzip -9 > ../initrd.gz

NOTE: Linux Mint 11 Lxde 32bit is a gzip compressed initrd featuring a
misleading suffix ".lz". It's a plain ".gz", though.

-- 
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 “lupin” package in Ubuntu:
  New

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/lupin/+bug/910924/+subscriptions




More information about the foundations-bugs mailing list