rootmnt="$2"
modprobe -Qb unionfs
- # run-init can't deal with this, but we're going to move all of these
- # away before it runs anyway.
- croot="/casper"
+ # run-init can't deal with images in a subdir, but we're going to
+ # move all of these away before it runs anyway. No, we're not,
+ # put them in / since move-mounting them into / breaks mono and
+ # some other apps.
+
+ croot="/"
# Let's just mount the read-only file systems first
mkdir -p "${croot}"
mount -t unionfs -o dirs=/cow=rw:$rofsstring unionfs "$rootmnt"
+ # move the first mount; no head in busybox-initramfs
for d in $(mount -t squashfs | cut -d\ -f 3); do
- mkdir -p "${rootmnt}/casper/${d##*/}"
- mount -o move "${d}" "${rootmnt}/casper/${d##*/}"
+ mkdir -p "${rootmnt}/rofs"
+ mount -o move "${d}" "${rootmnt}/rofs"
+ break
done
- if grep -q show-cow /proc/cmdline; then
+ if grep -q showmounts /proc/cmdline; then
+ for d in $(mount -t squashfs | cut -d\ -f 3); do
+ mkdir -p "${rootmnt}/casper/${d##*/}"
+ mount -o move "${d}" "${rootmnt}/casper/${d##*/}"
+ done
+
mkdir -p "$rootmnt/cow"
mount -o bind /cow "$rootmnt/cow"
fi
is_usb_device() {
sysfs_path="${1#/sys}"
- if /lib/udev/path_id "${sysfs_path}" | grep -q "ID_PATH=(usb|pci-[^-]*-usb)"; then
+ if /lib/udev/path_id "${sysfs_path}" | grep -E -q "ID_PATH=(usb|pci-[^-]*-usb)"; then
return 0
fi
return 1
done
}
+pulsate() {
+ if [ -x /sbin/usplash_write ]; then
+ /sbin/usplash_write "PULSATE"
+ fi
+}
+
set_usplash_timeout() {
if [ -x /sbin/usplash_write ]; then
/sbin/usplash_write "TIMEOUT 120"
set_usplash_timeout
[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/casper-premount"
+ pulsate
run_scripts /scripts/casper-premount
[ "$quiet" != "y" ] && log_end_msg
maybe_break casper-bottom
[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/casper-bottom"
+ pulsate
run_scripts /scripts/casper-bottom
[ "$quiet" != "y" ] && log_end_msg