snapcore / core-initrd

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

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

Closed valentindavid closed 5 months ago

valentindavid commented 5 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 5 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 5 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 5 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 5 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 5 months ago

ok fair enough

alfonsosanchezbeato commented 5 months ago

Tests seem to be failing atm though

valentindavid commented 5 months ago

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