[Bug 1279106] Re: Customized LiveUSB setup cannot handle persistence

Ubuntu Foundations Team Bug Bot 1279106 at bugs.launchpad.net
Wed Feb 12 00:28:14 UTC 2014


The attachment "casper-initrd.patch" seems to be a patch.  If it isn't,
please remove the "patch" flag from the attachment, remove the "patch"
tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the
team.

[This is an automated message performed by a Launchpad user owned by
~brian-murray, for any issues please contact him.]

** Tags added: patch

-- 
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/1279106

Title:
  Customized LiveUSB setup cannot handle persistence

Status in “casper” package in Ubuntu:
  New

Bug description:
  I'm making a LiveUSB with xubuntu-13.10-desktop-i386 as one of the
  OSes. It happens that specifying live-media kernel parameter with UUID
  breaks the find_cow_device() function in casper-helpers script.

  Here are my syslinux params ("break=casper-bottom vga=normal
  nomodeset" are there for debugging, of course):

      KERNEL /os/xubuntu/casper/vmlinuz
      APPEND file=/os/xubuntu/preseed/xubuntu.seed boot=casper initrd=/os/xubuntu/casper/initrd.lz live-media=/dev/disk/by-uuid/DD9D-5941 live-media-path=os/xubuntu/casper persistent persistent-path=os/xubuntu/casper break=casper-bottom vga=normal nomodeset --

  What we get after break:

  casper.log:
          Begin: Running /scripts/casper-premount ... done.
          done.
          mount: mounting /dev/sda1 on /casper-rw-backing failed: Device or resource busy
          Warning: Unable to find the persistent medium      
          mount: mounting /dev/sda1 on /home-rw-backing failed: Device or resource busy
          Warning: Unable to find the persistent home medium
          /init: line 7: can't open /dev/fd0: No such device or address        
          mount: mounting /dev/sda1 on /casper-sn-backing failed: Device or resource busy
          Warning: Impossible to include the casper-sn Snapshot
          /init: line 7: can't open /dev/fd0: No such device or address    
          mount: mounting /dev/sda1 on /home-sn-backing failed: Device or resource busy
          Warning: Impossible to include the home-sn Snapshot
          done.            
          Begin: Creating debconf-communicate fifo mechanism ... done.
          Spawning shell within the initramfs

  /proc/mounts:
          rootfs / rootfs rw 0 0
          sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
          proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
          udev /dev devtmpfs rw,relatime,size=503316k,nr_inodes=125829,mode=755 0 0
          devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
          tmpfs /run tmpfs rw,nosuid,noexec,relatime,size=102640k,mode=755 0 0
          /dev/disk/by-uuid/DD9D-5941 /cdrom vfat ro,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0
          /dev/loop0 /root/rofs squashfs ro,noatime 0 0
          tmpfs /cow tmpfs rw,noatime,mode=755 0 0
          /cow /root overlayfs rw,relatime,lowerdir=//filesystem.squashfs,upperdir=/cow 0 0

  
  I've investigated the issue; the source of the problem is that the where_is_mounted() function in casper-helpers doesn't recognize that /dev/disk/by-uuid/DD9D-5941 is a symlink to /dev/sda1, and thus the try_mount() function attempts to do an actual mount instead of bind, which, of course, fails.

  The solution to this should be replacing the live-media argument with
  uuid, like this:

         APPEND file=/os/xubuntu/preseed/xubuntu.seed boot=casper
  initrd=/os/xubuntu/casper/initrd.lz uuid=DD9D-5941 live-media-
  path=os/xubuntu/casper persistent persistent-path=os/xubuntu/casper
  break=casper-bottom vga=normal nomodeset --

  so that casper looks for the proper block device by itself. But this
  doesn't work either. In this case we repeatedly get the following
  lines in the console:

          calling: test-builtin
          error reading /lib/udev/hwdb.bin: No such file or directory
          load module index
          unload module index

  After lots of repetitions, we finally get the "Unable to find a medium
  containing a live file system" message.

  This happens in the is_nice_device() function of casper script, when
  executing "udevadm test-builtin path_id". Adding the hwdb.bin file
  from squashfs to the initrd.lz doesn't help either. Looks like casper
  isn't compatible with the current udevadm.

  The provided patch addresses both these issues, although I'm not sure
  if the second one is solved correctly. Please take a look.

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



More information about the foundations-bugs mailing list