Merge ~anonymouse67/ubuntu-core-initramfs:bugfix/uc20-delete-errant-kernel-wants into ~canonical-foundations/ubuntu-core-initramfs:master

Proposed by Ian Johnson
Status: Merged
Merged at revision: cfd09152c2156fb6e43f2a8590c5eb62f69c4dd1
Proposed branch: ~anonymouse67/ubuntu-core-initramfs:bugfix/uc20-delete-errant-kernel-wants
Merge into: ~canonical-foundations/ubuntu-core-initramfs:master
Diff against target: 16 lines (+0/-1)
1 file modified
dev/null (+0/-1)
Reviewer Review Type Date Requested Status
Dimitri John Ledkov (community) Approve
Review via email: mp+383614@code.launchpad.net

Description of the change

The usr-lib-{modules,firmware} mounts were incorrectly being done too early, as
when snap-bootstrap mounted the kernel snap before the base snap, the initrd
would then proceed to mount sysroot, and then mount
sysroot-usr-lib-{firmware,modules}.mount onto /run/mnt/base, which at that point
didn't actually have the base snap mounted yet, and thus when we did go to mount
/run/mnt/base, we would mount over the firmware and modules mounts did earlier.

Removing these mounts means that we don't end up performing the firmware and
modules mounts until after sysroot, which doesn't get run until after we mount
the base snap on /run/mnt/base.

This will fix the issue where recover and install modes did not have kernel
modules mounted right at switch root, and thus they did not get various kernel
modules loaded, which was the root cause of no networking during install/recover
modes.

To post a comment you must log in.
Revision history for this message
Ian Johnson (anonymouse67) wrote :

Also this explains why it worked in run mode, but not in install mode and recover mode, in run mode, snap-bootstrap just so happens to request the base snap be mounted first, while in recover and install modes, snap-bootstrap requests the kernel snap be mounted first. We should probably also make changes to snap-bootstrap to mount the base snap first, but regardless I think these wants are not necessary at best, and wrong at worst.

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/factory/usr/lib/systemd/system/run-mnt-kernel.mount.wants/sysroot-usr-lib-firmware.mount b/factory/usr/lib/systemd/system/run-mnt-kernel.mount.wants/sysroot-usr-lib-firmware.mount
2deleted file mode 120000
3index 1e939ab..0000000
4--- a/factory/usr/lib/systemd/system/run-mnt-kernel.mount.wants/sysroot-usr-lib-firmware.mount
5+++ /dev/null
6@@ -1 +0,0 @@
7-../sysroot-usr-lib-firmware.mount
8\ No newline at end of file
9diff --git a/factory/usr/lib/systemd/system/run-mnt-kernel.mount.wants/sysroot-usr-lib-modules.mount b/factory/usr/lib/systemd/system/run-mnt-kernel.mount.wants/sysroot-usr-lib-modules.mount
10deleted file mode 120000
11index 5dbf7f0..0000000
12--- a/factory/usr/lib/systemd/system/run-mnt-kernel.mount.wants/sysroot-usr-lib-modules.mount
13+++ /dev/null
14@@ -1 +0,0 @@
15-../sysroot-usr-lib-modules.mount
16\ No newline at end of file

Subscribers

People subscribed via source and target branches