Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 577496 - sys-apps/kexec-tools: fails to use the INITRD specified in the config file
Summary: sys-apps/kexec-tools: fails to use the INITRD specified in the config file
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-15 18:52 UTC by Joe M
Modified: 2016-03-24 21:41 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joe M 2016-03-15 18:52:53 UTC
Hello,

I specified INITRD="/boot/initramfs.cpio.gz" in /etc/conf.d/kexec.

But, the load_image of /etc/init.d/kexec fails with the below trace:

smart_sudo rc-service kexec start
 * Caching service dependencies ...                                                                                               [ ok ]
 * Configuring kexec ...
+ local ret
+ '[' '' = - ']'
+ BOOTPART=/boot
initrd_path
++ initrd_path
uname -r
+++ uname -r
uname -m
+++ uname -m
++ local x= kver=4.1.15-gentoo-r1-20160312195015 karch=x86_64
++ BOOTPART=/boot
++ INITRD=/boot/initramfs.cpio.gz
++ '[' -e /boot/initramfs.cpio.gz ']'
++ echo /boot/initramfs.cpio.gz
++ return 0
+ local img= initrd=/boot/initramfs.cpio.gz mounted=false initrdopt=
image_path
++ image_path
uname -r
+++ uname -r
uname -m
+++ uname -m
++ local x= kver=4.1.15-gentoo-r1-20160312195015 karch=x86_64
++ BOOTPART=/boot
++ KNAME=bzImage
++ '[' -e bzImage ']'
++ for x in '"${KNAME#${BOOTPART}}"' vmlinuz 'bzImage-${kver}' 'vmlinuz-${kver}' 'kernel-genkernel-${karch}-${kver}' 'kernel-${kver}' 'kernel-${karch}'
++ '[' -e /boot/bzImage ']'
++ for x in '"${KNAME#${BOOTPART}}"' vmlinuz 'bzImage-${kver}' 'vmlinuz-${kver}' 'kernel-genkernel-${karch}-${kver}' 'kernel-${kver}' 'kernel-${karch}'
++ '[' -e /boot/vmlinuz ']'
++ for x in '"${KNAME#${BOOTPART}}"' vmlinuz 'bzImage-${kver}' 'vmlinuz-${kver}' 'kernel-genkernel-${karch}-${kver}' 'kernel-${kver}' 'kernel-${karch}'
++ '[' -e /boot/bzImage-4.1.15-gentoo-r1-20160312195015 ']'
++ for x in '"${KNAME#${BOOTPART}}"' vmlinuz 'bzImage-${kver}' 'vmlinuz-${kver}' 'kernel-genkernel-${karch}-${kver}' 'kernel-${kver}' 'kernel-${karch}'
++ '[' -e /boot/vmlinuz-4.1.15-gentoo-r1-20160312195015 ']'
++ echo /boot/vmlinuz-4.1.15-gentoo-r1-20160312195015
++ return 0
+ img=/boot/vmlinuz-4.1.15-gentoo-r1-20160312195015
+ '[' -n /boot/initramfs.cpio.gz ']'
+ '[' /boot//initramfs.cpio.gz = /boot/initramfs.cpio.gz ']'
+ eerror 'Requested initrd: /initramfs.cpio.gz'
 * Requested initrd: /initramfs.cpio.gz
+ eerror 'could not be found'
 * could not be found
+ return 1
+ eend 1                                                                                                                          [ !! ]
+ exit 1
 * ERROR: kexec failed to start


The above error seems to be caused by the extra "/" in the line:

+ '[' /boot//initramfs.cpio.gz = /boot/initramfs.cpio.gz ']'

Thanks
Comment 1 SpanKY gentoo-dev 2016-03-24 21:41:31 UTC
i've reworked the init script heavily for the 2.0.12 version bump and it should fix this issue in the process

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=292b70740c3eb4516bf99a2cc2d12657a031ab00