Bug 500198 - Anaconda /proc/cmdline parsing during the installation is broken.
Anaconda /proc/cmdline parsing during the installation is broken.
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: anaconda (Show other bugs)
All Linux
medium Severity medium
: rc
: ---
Assigned To: Will Woods
Release Test Team
Depends On:
  Show dependency treegraph
Reported: 2009-05-11 12:06 EDT by Stanislav Polasek
Modified: 2011-07-21 02:52 EDT (History)
4 users (show)

See Also:
Fixed In Version: anaconda-
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-07-21 02:52:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Stanislav Polasek 2009-05-11 12:06:12 EDT
Description of problem:
Anaconda /proc/cmdline parsing during the installation is broken.

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

How reproducible:

Steps to Reproduce:
1. Boot the installation media (boot.iso, virt-install kernel+initrd.img, install DVD)
2. Add some parameters at the boot: prompt line, use quotation marks (for example: ethtool="speed 100 duplex full autoneg off"
3. Continue the installation
4. Anaconda gets the stage2 and tracebacks

Actual results:
shlex.py booms with ValueError: "No closing quotation"

Expected results:
Installation without a problem.

Additional info:
Probably related to the bug 453212.

The code in flags.py is just wrong. It may solve pxe case, but it breaks other booting methods (see the lines 40-41):

 33     def createCmdlineDict(self):
 34         cmdlineDict = {}
 35         cmdline = open("/proc/cmdline", "r").read().strip()
 37         # if the BOOT_IMAGE contains a space, pxelinux will strip one of the
 38         # quotes leaving one at the end that shlex doesn't know what to do
 39         # with
 40         if cmdline.find("BOOT_IMAGE=") and cmdline.endswith('"'):
 41             cmdline = cmdline.replace("BOOT_IMAGE=", "BOOT_IMAGE=\"")
 43         lst = shlex.split(cmdline)
Comment 3 RHEL Product and Program Management 2011-03-11 17:39:24 EST
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
Comment 4 David Cantrell 2011-03-22 12:11:01 EDT
qa_ack+ please?
Comment 6 Alexander Todorov 2011-05-10 08:52:44 EDT
Tested and verified with 0430.2 build. Booted from DVD with:
linux ethtool="speed 100 duplex full autoneg off"

There was no traceback.
Comment 7 errata-xmlrpc 2011-07-21 02:52:11 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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