Bootoption "showmounts" broken in Ubuntu 20.04 iso's

Bug #1931027 reported by J. Mueller
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Casper
New
Undecided
Unassigned

Bug Description

When booting from Ubuntu 20.04-iso's (20.04, 20.04.1, 20.04.2), the bootoption "showmounts" is broken, no /cow folder will be created. Because of the missing /cow folder casper-snapshot is not working (--cow is mandatory).

A cat /proc/cmdline shows the passed "showmounts". With 18.04.x-iso's it works correct.

Related branches

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

I guess this was broken in https://launchpad.net/ubuntu/+source/casper/1.428 although that looks like it should _always_ create /cow rather than just when showmounts in passed. It's not working though.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

We have many different types of 20.04 isos.... which one do you mean? server-live? desktop? a flavour?

What are you trying to achieve? Are you trying to make casper-snapshot to work? or showmounts to work? Do you need either of them?

If you are trying to make casper-snapshot to work, where are you storing the snapshots?

Revision history for this message
J. Mueller (jmuell) wrote :

I give you a longer description to explain the situation.

>>> We have many different types of 20.04 isos.... which one do you mean? <<<
All the desktop-isos of Ubuntu (ubuntu-20.04.1.0-desktop-amd64.iso for example, older and newer too) are affected.

>>> What are you trying to achieve? <<<
At the moment i use ubuntu-18.04.1-desktop-amd64.iso, running from USB to create a customized live-system without re-creation of the whole squashfs.

Booted from USB with "showmounts", additional installed initramfs-tools_0.130ubuntu3.6-packages (all, core, bin) and the "dirty fix" of the casper-script from https://bugs.launchpad.net/ubuntu/+source/casper/+bug/1520575 i snapshot all my changes in cpio-format.

The snapshot file must be stored as casper-snapshot.cpio.gz directly under /cdrom in the running live -system (filesystem remounted with -rw), on the USB stick it is then directly in the root of the fs. Now you can boot the live-system with "showmounts persistent" and you have a customized system without re-creation of the whole filesystem.squashfs file. The "dirty fix" from +bug/1520575 makes the deal so the snapshot file will mount properly as the upper layer. Without the fix you will end in a busy box.

>>> Are you trying to make casper-snapshot to work? or showmounts to work? <<<
Now with 20.04 i can not snapshot changes. The /cow folder does not exist when booting with "showmounts", nowhere in the running livesystem you can identify additional / deleted / changed files or folders in a separate location like /cow/upper to snapshot it.

Yes, you can create /cow and /cow/upper manually after booting. But when you create a new file, nothing happens there. In 18.04 (and older) you can see the changes at <original location> and under /cow/upper/<original location>.

My knowledge is not sufficent enough to identify the root cause. Is it a problem with newer 5.x kernels or with newer casper-scripts?

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Oh so this commit explains why /cow is not present in newer releases https://git.launchpad.net/casper/commit/?h=40489842eb531118abe6b164a97b09ea04607fd2

Unfortunately I guess I'm the closest thing casper has to a maintainer right now and I don't understand how the snapshot stuff works :(

Revision history for this message
Matthew Wilker (mwilker) wrote :

I would very much appreciate this being fixed, as I would like to be able to remove overlayfs whiteouts from within a live Ubuntu environment, as well as ease finding large files wasting RAM in the tmpfs mount. The linked commit message says "/root/cow did not exist, and because /cow is tmpfs, one cannot actually move it across." However, I'm convinced that the second portion of is not actually true. If I boot a Ubuntu live USB with break=init in the command line to get to an initrd shell, I can create the /root/cow directory manually and move the /cow mount there with no problems, after which I can exit the shell and Ubuntu boots as normal, with /cow exposed properly. Would it suffice to mkdir -p this directory in casper before doing the mount -o move?

Matthew Wilker (mwilker)
affects: subiquity → casper
tags: added: foundations-todo
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.