Change to mount sequence order breaks persistence on casper-rw partitions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
casper (Ubuntu) |
Fix Released
|
Undecided
|
Michael Hudson-Doyle |
Bug Description
the system boots fine when using a casper-rw FILE but drops to a busybox when using a partition
the short log would be:
_______
Begin: Running /scripts/
done.
umount: can't umount /cdrom: Device or resource busy
Warning: Unable to find the persistent home medium
umount: can't umount /cdrom: Device or resource busy
Warning: Impossible to include the casper-sn Snapshot
umount: can't umount /cdrom: Device or resource busy
Warning: Impossible to include the home-sn Snapshot
done.
_______
removing the "persistence" keyword from the syslinux.cfg works and the live usb drive boots just fine.
using a persistence file instead of the partition and the usb drive boots just fine.
i found older bug reports concerning the same problem but the fix proposed in 2010 is already integrated into the script "casper".
so i started the flashdrive with the casper debug= option and i see the following (after probing several other devices it finally finds the right device and partition (sdb3)
_______
+ cow_backing_
+ [ -e /cdrom/casper-rw ]
+ umount /cdrom
+ sys2dev /sys/block/sdb/sdb3
+ sysdev=
+ udevadm info -q name -p /block/sdb/sdb3
+ echo /dev/sdb3
+ devname=/dev/sdb3
+ /sbin/blkid -s LABEL -o value /dev/sdb3
+ [ casper-rw = casper-rw ]
+ echo /dev/sdb3
+ return
+ cowprobe=/dev/sdb3
+ [ -b /dev/sdb3 ]
+ cowdevice=/dev/sdb3
+ get_fstype /dev/sdb3
+ local FSTYPE
+ local FSSIZE
+ fstype
+ eval FSTYPE=ext4 FSSIZE=8458862592
+ FSTYPE=ext4 FSSIZE=8458862592
+ [ ext4 != unknown ]
+ echo ext4
+ return 0
+ cow_fstype=ext4
+ cow_mountopt=
+ mount -t ext4 -o rw,noatime /dev/sdb3 /cow
+ [ ! -d /cow/upper ]
+ mkdir -p /cow/upper
+ continue
+ continue
+ mkdir -p /cow/work
+ [ -f /cow/format ]
+ [ DEFAULT = DEFAULT ]
+ modprobe -q -b overlay
+ grep -q ^overlay$
+ cut -f2 /proc/filesystems
+ UNIONFS=overlay
+ break
_______
this looks fine to me.. it looks like it recognizes everything .. it's ext4 .. label casper-rw.. it's mounting it...
a little bit further down in the loooong log file it states the following:
_______
+ cow_backing_
+ [ -e /home-rw-
+ umount /home-rw-backing
+ sys2dev /sys/block/sdb/sdb3
+ sysdev=
+ udevadm info -q name -p /block/sdb/sdb3
+ echo /dev/sdb3
+ devname=/dev/sdb3
+ /sbin/blkid -s LABEL -o value /dev/sdb3
+ [ casper-rw = home-rw ]
+ get_fstype /dev/sdb3
+ local FSTYPE
+ local FSSIZE
+ fstype
+ eval FSTYPE=ext4 FSSIZE=8458862592
+ FSTYPE=ext4 FSSIZE=8458862592
+ [ ext4 != unknown ]
+ echo ext4
+ return 0
+ [ ext4 = vfat ]
+ homecow=
+ [ -b ]
+ [ n != y ]
+ log_warning_msg Unable to find the persistent home medium
+ _log_msg Warning: Unable to find the persistent home medium\n
+ [ n = y ]
+ printf Warning: Unable to find the persistent home medium\n
Warning: Unable to find the persistent home medium
_______
a warning about the home medium is shown in both cases (file and partition) but the persistence file works never the less..
my system:
kubuntu linux 15.10 beta1
uname -a
Linux wald 4.1.0-3-generic #3-Ubuntu SMP Tue Jul 28 12:25:10 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Related branches
- git-ubuntu developers: Pending requested
-
Diff: 146 lines (+53/-46)2 files modifieddebian/changelog (+8/-0)
scripts/casper-helpers (+45/-46)
summary: |
- kubuntu 15.10 beta1 live usb drops to busybox with persistence PARTITION + Change to mount sequence order breaks persistence |
summary: |
- Change to mount sequence order breaks persistence + Change to mount sequence order breaks persistence on casper-rw + partitions |
tags: | added: id-5cfac2e9c17e1d85a84198b8 |
Did you ever resolve this?
I think I have the same issue with the final release of Ubuntu 15.10 fa3d4974b5fd273 37 *ubuntu- 15.10-desktop- amd64.iso
ece816e12f97018
Here's what I've done so far, I've combined concepts of different guides. I'm starting from a Windows 10 environment.
1) I used diskpart on the windows command line to wipe the partition table off the usb drive, As window's "Disk Management" can be restrictive (next step). Any good partition tool would do.
2) Created a 1.2 GB fat32 partition, 4096 cluster size. The rest of the usb is left unpartitioned. I determined the size by trial and error, originally I used a guide that suggest installing on the whole usb and resizing/shrinking, I found this to be easier.
3) Used the tool at pendrive linux. Added about 70mb of persistence.
Until this point everything works as expected. It Boots to the live environment, it has persistence and I'm using only a portion of the USB.
4) I created two ext4 partitions. My USB drive is 16GB, and wanted to have more control of what would be in and out of casper-rw So the first one is labeled "casper-rw" and the second one is labeled "data".
At this point I can reboot, and everything is just like before, the system will continue to use the casper FILE, and not take advantage of the PARTITION. Both partitions are automatically mounted on /media/ubuntu
It's when I delete the casper-rw file that the problem happens. After a few failed attempts, I decided to move it out instead. I'm using windows for this, and it sits on my desktop while I test. I can then revert successfully.
Summary:
When I boot without the casper-rw FILE, I get a busybox, even though I have the casper-rw PARTITION created.
I expect it to automatically revert to using the partition.