With MOUNTBOOT="yes" genkernel tries to mount the bootdir rw before installing the new kernel and tries to restore the state of the bootdir afterwards. If there is another directory that is mounted ro and whose mount point ends in "/boot" genkernel mistakenly considers the bootdir to be mounted ro and remounts it ro after the new kernel has been installed. Reproducible: Always Steps to Reproduce: 1. mount /boot rw 2. mount /some-path/boot ro 3. invoke genkernel --mountboot all Actual Results: /boot has been remouted ro Expected Results: /boot is still mounted rw The problem seems to be caused by the following statement in /usr/share/genkernel/gen_funcs.sh: local proc_ro=$(awk '{ print $2 " ," $4 "," }' /proc/mounts 2>/dev/null | sed -n "/${BOOTDIR//\//\\/} .*,ro,/p") When it is replaced by local proc_ro=$(awk '{ print $2 " ," $4 "," }' /proc/mounts 2>/dev/null | sed -n "/^${BOOTDIR//\//\\/} .*,ro,/p") everything works as expected.
Congratulations, you found a bug in mount-boot.eclass, too! :-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=14aa6eae52b8b9ae476ad2de13cb87f45e28f38b commit 14aa6eae52b8b9ae476ad2de13cb87f45e28f38b Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2019-08-10 19:35:39 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2019-08-10 19:35:39 +0000 gen_funcs.sh: make_bootdir_writable(): Fix ro check Make sure we check $BOOTDIR only for ro and not any mount containing $BOOTDIR value. Bug: https://bugs.gentoo.org/691872 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> gen_funcs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Thank you for the reported, fixed in >=sys-kernel/genkernel-4.0.0_beta12!