Bug 500198 - Anaconda /proc/cmdline parsing during the installation is broken.
Anaconda /proc/cmdline parsing during the installation is broken.
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: anaconda (Show other bugs)
5.3
All Linux
medium Severity medium
: rc
: ---
Assigned To: Will Woods
Release Test Team
:
Depends On:
Blocks:
  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-11.1.2.229-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-07-21 02:52:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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):
anaconda-11.1.2.168

How reproducible:
always

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()
 36 
 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=\"")
 42 
 43         lst = shlex.split(cmdline)
 44
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
release.
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.

http://rhn.redhat.com/errata/RHBA-2011-0984.html

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