openSUSE / sdbootutil

MIT License
26 stars 14 forks source link

Bind mount snapshot dir onto itself before chroot. #148

Closed radolin closed 1 month ago

radolin commented 1 month ago

This allows dracut running inside chroot to properly detect the root filesystem type and include the relevant dracut module.

When going inside chroot only the mounts under it are visible in /proc/mounts the snashot directory in not a mountpoint itself, it's the upper level subvolume that's mounted. The bind mount to itself solves this issue, and makes it visible inside the chroot.

If there is an x-initrd.mount option in the fstab entry for the rootfs (seems to be the case for prebuilt images) this is not strictly needed, but there isn't one if using .iso and the installer.

aplanas commented 1 month ago

Thanks!