Results 1 to 8 of 8

Thread: LiveUsb / Casper: Mount error with live-media-path and persistence; other related ?'s

Threaded View

  1. #1
    Join Date
    Sep 2008
    Appleton, WI
    Ubuntu 9.04 Jaunty Jackalope

    Question LiveUsb / Casper: Mount errors with persistence (/cow); other related ?'s

    I've been having pretty good success creating a bootable USB flash drive with the Ubuntu "live" environment (casper). I'm using the official release of Karmic Koala (9.10), x86, and have followed the notes at (method 3) and .

    The only real difference so far is that I plan on using Ext2 (or maybe even 3 or 4) instead of Fat16/32, and as such am using Grub2 (1.97) instead of SYSLINUX. I'm also testing everything using VirtualBox, and as such, am using a virtual hard disk instead of an actual USB drive, as VirtualBox currently doesn't support booting from USB.

    I had everything working great, including persistence. However, the root of my boot drive seemed very messy, with 5+ folders created for the contents of the live CD (casper, preseed, etc.), another 5+ folders for persistence (etc, home, var, etc.), and everything else I was hoping to share the partition with. Ideally, all of the contents of the live CD would be copied into a "ubuntu-live" directory, and all of the persistence data would be kept in a "ubuntu-persistence" directory.

    Here is the Grub2 entry that I had when everything was working as expected:

    menuentry "Ubuntu 9.10 32-bit - Live" {
    	linux /casper/vmlinuz boot=casper persistent --
    	initrd /casper/initrd.lz
    I then moved all of the live CD folders (casper, preseed, etc.) into /ubuntu-live, and updated the Grub2 entry with the "live-media-path" option as documented at :

    menuentry "Ubuntu 9.10 32-bit - Live" {
    	linux /ubuntu-live/casper/vmlinuz boot=casper live-media-path=/ubuntu-live/casper ignore_uuid persistent --
    	initrd /ubuntu-live/casper/initrd.lz
    I had to add the "ignore_uuid" option to prevent the boot from hanging with infinite "stdin: error 0" outputs (after "Begin: Running /scripts/casper-premount ...", 2 "Done." lines, and a few EXT4-4s kernel debug outputs, apparently due to the hidden ".disk" directory missing from the root of the drive.

    However, I'm stuck with the following output: (OCR'd from VirtualBox print-screen using tesseract with manual edits)

    [ 5.780380] device-mapper: dm-raid45: initialized v0.2594b
    Begin: Running /scripts/init-premount ...
    Begin: Mounting root file system... ...
    [ 6.937398] EXT4-fs (sda1): barriers enabled
    Begin: Running /scripts/casper-premount ...
    [ 6.939426] kjournald2 starting: pid 339, dev sda1:8, commit interval 5 seconds
    [ 6.940156] EXT4-fs (sda1): delayed allocation enabled
    [ 6.940575] EXT4-fs: file extents enabled
    [ 6.941079] EXT4-fs: mballoc enabled
    [ 6.941384] EXT4-fs (sda1): mounted filesystem with ordered data mode
    [ 6.996176] aufs 2-standalone.tree-30-20090727
    [ 7.167173] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    BusyBox u1.13.3 (Ubuntu 1:1.13.3-lubuntu?) built-in shell (ash)
    Enter 'help’ for a list of built-in commands.
    (initramfs) mount: mounting /dev/sdal on /cow failed: Device or resource busy
    Can not mount /dev/sdal on /cow
    Hitting enter gives a "(initramfs)" BusyBox prompt.

    Removing the "persistent" option allows for a successful boot as a normal live CD, but without persistence.

    What does "cow" stand for in this context?

    After some digging, this appears to be coming from line 426 in /initrd/scripts/casper , shortly after calling the "find_cow_device" function that is defined in casper-helpers. Overall, it seems that something else already has /dev/sda1 locked, but I don't know what. Not knowing exactly what "/cow" is supposed to be or what it is used for doesn't help, either. I'm wondering if maybe this entire mount section is unnecessary, and if a symbolic link would suffice instead?

    I considered trying to edit the casper script to make this work, or at least to add some additional debugging. Is there an easier way to do this short of rebuilding it into a new casper/initrd.lz every time? (

    Some additional references that I found:

    Finally, I also found . It mentions that it is a fork of Casper, and most significantly, includes a "persistent-path" option in addition to "live-media-path" and other potentially useful options. Should I consider trying to switch over to this, instead, if even possible?

    Are there any other ideas or fixes to get this working as expected?

    Last edited by ziesemer; December 18th, 2009 at 10:35 PM.

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts