Merge ~crass/casper:fix-showmounts into casper:main

Proposed by Glenn Washburn
Status: Needs review
Proposed branch: ~crass/casper:fix-showmounts
Merge into: casper:main
Diff against target: 18 lines (+4/-1)
1 file modified
scripts/casper (+4/-1)
Reviewer Review Type Date Requested Status
Ubuntu Installer Team Pending
Review via email: mp+453085@code.launchpad.net

Description of the change

Fix a bug that made the initrd parameter "showmounts" not work as intended (at all from a user perspective). Also, allow user access to the upperdir of the overlayfs, aka cow fs, as used to be the case.

To post a comment you must log in.

Unmerged commits

941ba2b... by Glenn Washburn

Have show-cow actually show the cow dir

Until commit 40489842 ("Drop exposing /cow tree"), the upperdir of the
overlayfs of the live cd was exposed as /cow. Confusingly that commit
states that "because /cow is tmpfs, one cannot actually move it". This
is incorrect, the mount --move works fine. This patch conditionally
reinstates the previous behavior, when "showmounts" or "show-cow" is
a kernel parameter. Instead of putting the cow in the root directory, as
was previously done, it is put with the rest of the mounts made user
accessible via the afore mentioned kernel parameters.

65a8188... by Glenn Washburn

Fix showmounts which was broken due to a typo

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/scripts/casper b/scripts/casper
2index 36a724d..b0fc62d 100644
3--- a/scripts/casper
4+++ b/scripts/casper
5@@ -699,9 +699,12 @@ setup_overlay() {
6 fi
7
8 if [ -n "${SHOWMOUNTS}" ]; then
9+ mkdir -p "${rootmnt}/${LIVE_MEDIA_PATH}/cow"
10+ mount --bind /cow "${rootmnt}/${LIVE_MEDIA_PATH}/cow"
11+
12 for d in ${rofslist}; do
13 mkdir -p "${rootmnt}/${LIVE_MEDIA_PATH}/${d##*/}"
14- case d in
15+ case "$d" in
16 *.dir) # do nothing # mount -o bind "${d}" "${rootmnt}/${LIVE_MEDIA_PATH}/${d##*/}"
17 ;;
18 *)

Subscribers

People subscribed via source and target branches