canonical / core-initrd

initrd implementation in ubuntu core
https://ubuntu.com/core/docs
GNU General Public License v3.0
10 stars 29 forks source link

ubuntu-core-initramfs: fix path to /sbin/modprobe #236

Closed valentindavid closed 8 months ago

valentindavid commented 8 months ago

The kernel will call specifically path /sbin/modprobe. So we need to make sure this path exists and points to modprobe.

valentindavid commented 8 months ago

it seems we also need /sbin/dmsetup because systemd thinks it is there. But that sounds more like a bug in the systemd package.

valentindavid commented 8 months ago

Also the path where to mount /usr/lib/modules from was prefixed with /sysroot, which is incorrect in our case. So we have to force it. This is a change in systemd behavior.

vorlonofportland commented 8 months ago

Why are you proposing to create /sbin as a directory with individual symlinks here, instead of making /sbin a symlink to /usr/sbin which is consistent with what the wider ecosystem is doing wrt "usrmerge" systems?

valentindavid commented 8 months ago

Why are you proposing to create /sbin as a directory with individual symlinks here, instead of making /sbin a symlink to /usr/sbin which is consistent with what the wider ecosystem is doing wrt "usrmerge" systems?

To better keep track what paths need fixing. After all it is the initrd, nothing extra will run there.

vorlonofportland commented 8 months ago

ok fair enough

alfonsosanchezbeato commented 8 months ago

Tests seem to be failing atm though

valentindavid commented 8 months ago

There was a typo, and it was not always failing locally. But now it should be fixed.