Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 733674 - linuxrc doesn't read CMS config file
Summary: linuxrc doesn't read CMS config file
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dracut
Version: 16
Hardware: s390x
OS: Linux
high
high
Target Milestone: ---
Assignee: Harald Hoyer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: ZedoraTracker
TreeView+ depends on / blocked
 
Reported: 2011-08-26 13:18 UTC by Jan Stodola
Modified: 2011-09-07 03:21 UTC (History)
6 users (show)

Fixed In Version: dracut-013-8.fc16
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-09-07 03:21:15 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
boot log from the installation (19.44 KB, text/plain)
2011-08-26 13:18 UTC, Jan Stodola
no flags Details

Description Jan Stodola 2011-08-26 13:18:46 UTC
Created attachment 520090 [details]
boot log from the installation

Description of problem:
When installing F16 alpha for s390x on a z/VM guest and one want to use CMS config file, linuxrc doesn't read it. User has to enter all values in linuxrc manually:

...
Scanning for available network devices...
Autodetection found 0 devices.
Note: There is a device blacklist active! (Clearing might take long)
c) clear blacklist, m) manual config, r) rescan, s) shell:
s
Enter 'exit' at the shell prompt to get back to the installation dialog.
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell

bash-4.2# cat /proc/cmdline
root=/dev/ram0 ro ip=off ramdisk_size=40000 cio_ignore=all,!0.0.0009
CMSDASD=191 CMSCONFFILE=e40.conf

bash-4.2# export
declare -x HOME="/" 
declare -x LD_LIBRARY_PATH="/lib64:/usr/lib64:/usr/X11R6/lib64:/usr/kerberos/lib
64:/lib:/usr/lib:/usr/X11R6/lib:/usr/kerberos/lib" 
declare -x OLDPWD 
declare -x PATH="/usr/local/bin:/bin:/usr/bin:/usr/bin:/bin:/sbin:/usr/sbin:/mnt
/sysimage/bin:/mnt/sysimage/usr/bin:/mnt/sysimage/usr/sbin:/mnt/sysimage/sbin:/m
nt/sysimage/usr/X11R6/bin" 
declare -x PWD="/" 
declare -x PYTHONPATH="/tmp/updates" 
declare -x RD_TIMESTAMP="1314362670635527 1912231" 
declare -x S390ARCH="zSeries" 
declare -x SHLVL="2" 
declare -x TERM="linux" 
declare -x TEXTDOMAIN="s390installer" 
declare -x TEXTDOMAINDIR="/usr/lib/locale" 


Compare with RHEL6 (anaconda-13.21.134-1.el6), parameters from kernel command line are exported in linuxrc shell:
...
Note: There is a device blacklist active! (Clearing might take long)
c) clear blacklist, m) manual config, r) rescan, s) shell: 
s
Enter 'exit' at the shell prompt to get back to the installation dialog. 
bash: cannot set terminal process group (-1): Inappropriate ioctl for device 
bash: no job control in this shell
bash-4.1# cat /proc/cmdline
root=/dev/ram0 ro ip=off ramdisk_size=40000 
CMSDASD=191 _MSCONFFILE=e40.conf            
cio_ignore=all,!0.0.0009 _ips=1 _nc neco=nic

bash-4.1# export | grep CMSDASD
declare -x CMSDASD="191" 


Version-Release number of selected component (if applicable):
anaconda-16.15

How reproducible:
always

Steps to Reproduce:
1. make sure that CMSDASD and CMSCONFFILE parameters are set in CMS parameter file
2. start the installation
3. wait until linuxrc starts
  
Actual results:
linuxrc doesn't read configuration from CMS config file

Expected results:
CMS config file is used to configure devices in linuxrc

Comment 1 Dan Horák 2011-08-30 08:30:44 UTC
Something could change in the kernel, it was responsible for adding unused name=value pairs to the environment. I will ask the kernel people.

Comment 2 Harald Hoyer 2011-08-30 14:00:42 UTC
dracut's fault.

Comment 3 Fedora Update System 2011-08-30 14:41:22 UTC
dracut-013-6.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/dracut-013-6.fc16

Comment 4 Fedora Update System 2011-08-30 20:45:01 UTC
Package dracut-013-6.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dracut-013-6.fc16'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/dracut-013-6.fc16
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2011-08-31 15:17:58 UTC
dracut-013-7.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/dracut-013-7.fc16

Comment 6 Harald Hoyer 2011-08-31 15:52:13 UTC
Can you please convert your tools to use /proc/cmdline instead of relying on the environment?
In the future, dracut might not provide this environment anymore.

Comment 7 Kay Sievers 2011-08-31 16:21:44 UTC
> Something could change in the kernel, it was responsible for adding unused
> name=value pairs to the environment.

Please never rely on anything like that, it is too fragile.

You can never know what the kernel understands and what it doesn't,
or who hooks into the cmdline processing and suppresses the values,
like all keys with '.' in it are read as module parameters, there is
no guarantee things end up in the process environment.

Tools must read /proc/cmdline directly themselves if they look
for bootloader parameters.

Comment 8 David Cantrell 2011-08-31 17:16:20 UTC
(In reply to comment #7)
> > Something could change in the kernel, it was responsible for adding unused
> > name=value pairs to the environment.
> 
> Please never rely on anything like that, it is too fragile.
> 
> You can never know what the kernel understands and what it doesn't,
> or who hooks into the cmdline processing and suppresses the values,
> like all keys with '.' in it are read as module parameters, there is
> no guarantee things end up in the process environment.
> 
> Tools must read /proc/cmdline directly themselves if they look
> for bootloader parameters.

We can probably do that.  For now, the s390x port relies on the horrible linuxrc.s390 script.  We would like to move as much device setup and discovery functionality out of that and in to dracut or anaconda proper and ultimately reduce linuxrc.s390 to nothing so it can removed.  In the interim, we're sort of stuck with this script.

I don't have a problem changing linuxrc.s390 to pull these variables out of /proc/cmdline directly.

Comment 9 Mads Kiilerich 2011-09-01 14:41:58 UTC
The dracut-013-7.fc16 fix causes a regression for me.

I do for other reasons use a kernel parameter such as foo,bar=1,baz=2 on my live image - and parse /proc/cmdline outside dracut.

The problem is that the kerneal apparently exports it to the environment as the key "foo,bar" so that export -p creates a /tmp/export.orig with
  export foo,bar='1,baz=2'

When that is sourced by modules.d/99base/init it fails and the trap will halt the boot process and give a dracut shell.

Comment 10 Fedora Update System 2011-09-02 17:47:10 UTC
dracut-013-8.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/dracut-013-8.fc16

Comment 11 Fedora Update System 2011-09-07 03:21:02 UTC
dracut-013-8.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.