Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 203406

Summary: sys-apps/kexec-tools-1.101-r4: default value for KPARAM set incorrectly
Product: Gentoo Linux Reporter: Friedrich Oslage (RETIRED) <bluebird>
Component: Current packagesAssignee: Stefan Schweizer (RETIRED) <genstef>
Status: RESOLVED FIXED    
Severity: normal CC: gentoo, kernel-misc
Priority: High    
Version: 2007.0   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Friedrich Oslage (RETIRED) gentoo-dev 2007-12-27 03:49:42 UTC
As specified in Bug 107527 the default value for KPARAM should be the content of /proc/cmdline with the root= param removed.

The regular expression(in /etc/init.d/kexec line 55) used to strip the root= param strips not only the root= option but it mangles all options that end with root= eg real_root= or myroot=.

root=/dev/ram0 nosmp real_root=/dev/mapper/root pci=assign-busses
becomes
nosmp real_pci=assign-busses

The default value could be determined like this(or maybe someone with a better understanding of regular expressions could make something up):

KPARAM="$(sed -e 's/ /\n/g' /proc/cmdline | grep -v -e "^root=" | tr '\n' ' ')"
Comment 1 Stefan Schweizer (RETIRED) gentoo-dev 2008-01-21 08:50:52 UTC
thanks, fixed