Customized LiveUSB setup cannot handle persistence
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
casper (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
I'm making a LiveUSB with xubuntu-
Here are my syslinux params ("break=
KERNEL /os/xubuntu/
APPEND file=/os/
What we get after break:
casper.log:
Begin: Running /scripts/
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,
proc /proc proc rw,nosuid,
udev /dev devtmpfs rw,relatime,
devpts /dev/pts devpts rw,nosuid,
tmpfs /run tmpfs rw,nosuid,
/dev/loop0 /root/rofs squashfs ro,noatime 0 0
tmpfs /cow tmpfs rw,noatime,mode=755 0 0
/cow /root overlayfs rw,relatime,
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/
The solution to this should be replacing the live-media argument with uuid, like this:
APPEND file=/os/
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.
Sorry, wrong patch :( Here is the correct one.