Bug 75508 - PXE bootloader truncates kernel parameters
PXE bootloader truncates kernel parameters
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: pxe (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2002-10-09 06:52 EDT by Nick Strugnell
Modified: 2007-11-30 17:06 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-01-15 12:07:22 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch proposed by richard.coley@csfb.com (8.41 KB, patch)
2002-10-11 08:36 EDT, Nick Strugnell
no flags Details | Diff
patch against pxe-0.1-33.src.rpm to fix problem with long cmdline (711 bytes, patch)
2002-10-12 02:35 EDT, Aleksandr Brezhnev
no flags Details | Diff
modified pxe.spec file with pxe-1.0-prepare.patch (5.26 KB, text/plain)
2002-10-12 02:38 EDT, Aleksandr Brezhnev
no flags Details

  None (edit)
Description Nick Strugnell 2002-10-09 06:52:49 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020513

Description of problem:
When doing a PXE install, any kernel parameters that are passed to the
installing client locally (i.e. on the local console, not passed via TFTP or
DHCP) are truncated to the first 28 characters.

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

How reproducible:

Steps to Reproduce:
1.Setup a PXE installation environment
2.Boot a client and hit F8 to bring up the PXE boot menu
3.Select install
4.Press a key to enter kernel parameters
5.Enter a long list of kernel parameters that will be ignored (e.g. -s
a123456789 b123456789 c123456789
6.Let the installation complete
7.After the post-installation reboot, type 'cat /proc/cmdline' to see the kernel
parameters that the kernel was started with

Actual Results:  The contents of /proc/cmdline is truncated to the first 28

Expected Results:  The contents of /proc/cmdline should contain up to 255 chars

Additional info:

Possibly found the problem in pxe-linux/nbp.linux/prepare.c

line 18:
typedef struct s_bootsect_table {
        unsigned char reserved1[32];
        unsigned cmdline_magic;
        unsigned cmdline_offset;
        unsigned char reserved2[461];

line 214:
        strcpy(bootsect.reserved2, cmdline);    // copy the kernel
                                                // params to bootsect
line 258:
        memset(&((UINT8 *)&bootsect)[0x40], 0, 0x12); // fill bootsect
                                                      // starting at
                                                      // offset 64

Line 258 appears to be the culprit - reserved2 starts at offset 36 and we blank
it from 64 onwards, leaving only the first 28 characters of the kernel parameters.
Comment 1 Nick Strugnell 2002-10-11 08:36:32 EDT
Created attachment 79946 [details]
Patch proposed by richard.coley@csfb.com
Comment 2 Aleksandr Brezhnev 2002-10-12 02:35:41 EDT
Created attachment 80104 [details]
patch against pxe-0.1-33.src.rpm to fix problem with long cmdline
Comment 3 Aleksandr Brezhnev 2002-10-12 02:38:55 EDT
Created attachment 80105 [details]
modified pxe.spec file with pxe-1.0-prepare.patch
Comment 4 Aleksandr Brezhnev 2002-10-16 01:01:55 EDT
The bug is fixed. Please, include patch into errata.
Comment 5 Jim Wright 2002-10-27 06:07:24 EST
this is a duplicate of 30837

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