/etc/init.d/kexec tries to mount /boot if there is no initrd, and if /boot is not on a separate filesystem that obviously fails. $ df /boot Filesystem Size Used Avail Use% Mounted on /dev/root 905M 693M 166M 81% / Example using kexec -d stop ++ local img=/boot/vmlinuz-3.3.2 initrd= mounted=false initrdopt= ++ [[ -z /boot/vmlinuz-3.3.2 ]] ++ [[ -z '' ]] ++ grep -q ' /boot ' /proc/mounts ++ ebegin 'Mounting /boot' * Mounting /boot ... ++ mount /boot mount: can't find /boot in /etc/fstab or /etc/mtab ++ eend 1 I can make it work on my machine by just removing the test for initrd in load_image() like this: --- /usr/portage/sys-apps/kexec-tools/files/kexec.init-2.0.3 2012-03-18 08:46:02.000000000 +0100 +++ /etc/init.d/kexec 2012-04-15 01:30:08.000000000 +0200 @@ -50,7 +50,7 @@ BOOTPART="${BOOTPART:-/boot}" local img="$(image_path)" initrd="$(initrd_path)" mounted=false initrdopt= - if [[ -z "${img}" ]] || [[ -z "${initrd}" ]]; then + if [[ -z "${img}" ]]; then # If we cannot find our image, try mounting ${BOOTPART} if ! grep -q " ${BOOTPART} " /proc/mounts; then ebegin "Mounting ${BOOTPART}" Reproducible: Always
thanks for the report, I did put it on the list.
Can this trivial patch be put in portage? kexec failures are really annoying.
(In reply to comment #2) > Can this trivial patch be put in portage? > kexec failures are really annoying. No, thats would be bad for anyone having a separate /boot, but not currently mounted. The real fix have to be smarter.
(In reply to comment #3) > No, thats would be bad for anyone having a separate /boot, but not > currently mounted. The real fix have to be smarter. Sorry, I don't understand how. If someone have a separate /boot, then both kernel image and initrd should be there. This patch omits only initrd check and keeps kernel image check. For Gentoo it is very natural not to use initrd at all, because most user kernels are custom build kernels, and obviously you do not need initrd if you build your own hardware specific kernel except for several really rare cases.
(In reply to comment #4) > Sorry, I don't understand how. If someone have a separate /boot, then > both kernel image and initrd should be there. This patch omits only > initrd check and keeps kernel image check. I think you are right. Then the real test should be with and instead of or. if [[ -z "${img}" ]] && [[ -z "${initrd}" ]] > > For Gentoo it is very natural not to use initrd at all, because most > user kernels are custom build kernels, and obviously you do not need > initrd if you build your own hardware specific kernel except for several > really rare cases. Agree I have never needed a initrd.
(In reply to comment #5) > (In reply to comment #4) > > Sorry, I don't understand how. If someone have a separate /boot, then > > both kernel image and initrd should be there. This patch omits only > > initrd check and keeps kernel image check. > > I think you are right. Then the real test should be with and instead > of or. > > if [[ -z "${img}" ]] && [[ -z "${initrd}" ]] Hmm, formally it will work fine in my case, so I don't mind. But I can't imagine a case where kernel image is not available, but initrd is.
(In reply to comment #6) > (In reply to comment #5) > > (In reply to comment #4) > > > Sorry, I don't understand how. If someone have a separate /boot, then > > > both kernel image and initrd should be there. This patch omits only > > > initrd check and keeps kernel image check. > > > > I think you are right. Then the real test should be with and instead > > of or. > > > > if [[ -z "${img}" ]] && [[ -z "${initrd}" ]] > > Hmm, formally it will work fine in my case, so I don't mind. But I can't > imagine a case where kernel image is not available, but initrd is. Hmm, I changed my mind again. :) That test would be bad for someone having a separate /boot but no initrd in it. Back to just testing for ${img} again. That is the best solution.
+*kexec-tools-2.0.4 (27 Mar 2013) + + 27 Mar 2013; Justin Lecher <jlec@gentoo.org> files/kexec.init-2.0.3, + +files/kexec.conf-2.0.4, +files/kexec.init-2.0.4, +kexec-tools-2.0.4.ebuild, + +files/kexec-tools-2.0.4-disable-kexec-test.patch, metadata.xml: + Version BUmp; drop bashism from initscript, #447548; enhanced detection of + kernel and initrd image, #412039 +