bugGNU GRUB - Bugs: bug #27641, grub strips quotes from arguments

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #27641: grub strips quotes from arguments

Submitter:  Norbert Preining <norbusan>
Submitted:  Fri 09 Oct 2009 06:50:35 AM UTC
   
 
Category:  Booting Severity:  Major
Priority:  5 - Normal Item Group:  None
Status:  Fixed Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Closed Release:  Bazaar - trunk
Release:  Reproducibility:  Every Time
Planned Release:  None

Thu 22 Mar 2012 04:43:56 PM UTC, comment #4: 

There is a regression in trunk: entering +verbatim+ acpi="Windows 2009" -verbatim- in the GRUB script puts +verbatim+ "acpi=Windows 2009" -verbatim- into the kernel command line, making the argument unrecognised by the kernel; using +verbatim+ acpi=\"Windows 2009\" -verbatim- passes the escape characters along with the quotation marks. This is caused by grub_create_loader_cmdline() in grub-core/lib/cmdline.c, introduced in revision 3028. Please fix it in whatever way fits best.

Bugmenot User <bugmenot>
Fri 07 Jan 2011 04:15:31 PM UTC, comment #3: 

Fixed in trunk

Vladimir Serbinenko <phcoder>
Group administrator
Sun 14 Nov 2010 05:44:07 PM UTC, comment #2: 

Wrong window, sorry

Vladimir Serbinenko <phcoder>
Group administrator
Sun 14 Nov 2010 04:16:07 PM UTC, comment #1: 

I added the code which automatically add -Wno-trampolines when it's supported.

Vladimir Serbinenko <phcoder>
Group administrator
Fri 09 Oct 2009 06:50:35 AM UTC, original submission:  

Grub2 strips quotes from kernel command line arguments:
My linux command line looks like:
    linux   /boot/vmlinuz-2.6.32-rc3 root=/dev/sda3 ro acpi_osi="!Windows 2006" nmi_watchdog=0 reboot=pci
but when booting the kernel I get the following message:
    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-2.6.32-rc3 root=/dev/sda3 ro acpi_osi=!Windows 2006 nmi_watchdog=0 reboot=pci
indicating that the quotes were stripped.

So I believed that maybe in this message but internally the arguments are right, but indeed, they are hosed. I added printk to the kernel params.c parsing routine and what do I get:
[    0.000000] DDDD param=BOOT_IMAGE, val=.../boot/vmlinuz-2.6.32-rc3...
[    0.000000] DDDD param=root, val=.../dev/sda3...
[    0.000000] DDDD param=ro, val=...<NULL>...
[    0.000000] DDDD param=acpi_osi, val=...!Windows...
[    0.000000] DDDD param=2006, val=...<NULL>...
[    0.000000] DDDD param=nmi_watchdog, val=...0...
[    0.000000] DDDD param=reboot, val=...pci...
which clearly shows that grub is doing something completely wrong here.

The only way to fix that is to boot into grub, edit the command line and add change it to \"    \", and then boot with Ctrl-x.

Changing the original boot.cfg cmd line to any variant of \"...\", or \\"...\\", etc etc does not work.

That is a serious regression against grub1 and lilo, both of them did it right!

Best

Norbert

Norbert Preining <norbusan>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bugmenot (Posted a comment)
  • -email is unavailable- added by phcoder (Posted a comment)
  • -email is unavailable- added by bvk
  • -email is unavailable- added by norbusan (Submitted the item)
  • -email is unavailable- added by norbusan
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-01-07 phcoder StatusNone Fixed
        Open/ClosedOpen Closed
    2010-11-14 phcoder StatusFixed None
        Open/ClosedClosed Open
    2010-11-14 phcoder StatusNone Fixed
        Open/ClosedOpen Closed
    2009-11-02 bvk Carbon-Copy- Added bvk
    2009-10-09 norbusan Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.14-3b9d.
    Corresponding source code