Bug 75508 - PXE bootloader truncates kernel parameters
Summary: PXE bootloader truncates kernel parameters
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: pxe
Version: 2.1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-10-09 10:52 UTC by Nick Strugnell
Modified: 2007-11-30 22:06 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-01-15 17:07:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch proposed by richard.coley@csfb.com (8.41 KB, patch)
2002-10-11 12:36 UTC, 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 06:35 UTC, Aleksandr Brezhnev
no flags Details | Diff
modified pxe.spec file with pxe-1.0-prepare.patch (5.26 KB, text/plain)
2002-10-12 06:38 UTC, Aleksandr Brezhnev
no flags Details

Description Nick Strugnell 2002-10-09 10:52:49 UTC
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:
Always

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
characters

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 12:36:32 UTC
Created attachment 79946 [details]
Patch proposed by richard.coley

Comment 2 Aleksandr Brezhnev 2002-10-12 06:35:41 UTC
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 06:38:55 UTC
Created attachment 80105 [details]
modified pxe.spec file with pxe-1.0-prepare.patch

Comment 4 Aleksandr Brezhnev 2002-10-16 05:01:55 UTC
The bug is fixed. Please, include patch into errata.

Comment 5 Jim Wright 2002-10-27 11:07:24 UTC
this is a duplicate of 30837


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