Bug 27203 - PXE initrd download to the wrong memory space
Summary: PXE initrd download to the wrong memory space
Keywords:
Status: CLOSED DUPLICATE of bug 11773
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: pxe
Version: 7.0
Hardware: i386
OS: Linux
high
high
Target Milestone: ---
Assignee: Elliot Lee
QA Contact: Brock Organ
URL:
Whiteboard:
: 18277 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-02-12 21:26 UTC by Michael Johnson
Modified: 2005-10-31 22:00 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-08-08 05:08:48 UTC
Embargoed:


Attachments (Terms of Use)

Description Michael Johnson 2001-02-12 21:26:55 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.2.17-14 i686)


On a server with > 2Gig RAM I am getting the following messages:
initrd already destroyed by paging_init!
initrd overwritten (0x4faf0000 < 0xc19bdc98) - disabling it.
RAMDISK: Couldn't find valid RAM disk image starting at 0.
Invalid session number or type of track
Kernel panic: VFS: Unable to mount root fs on 01:01

On inspection it appears that pxe-linux/nbp.linux/download.c is loading the
initrd image into a place the kernel doesn't expect it.

PXELINUX(part of the syslinux package) implies that there is an upper bound
on the address that initrd can be loaded into, specifically 0x038000000. 
download.c does not take this into account.

I do not know enough about the kernel's memory model to know if this is the
"right thing to do".  Hopefully someone can use this information to verify
that this is the problem. 

If it is the problem, the following patch may work.  I have successfully
tried it on the failing server.

*** download.c	Thu Sep 23 17:58:21 1999
--- /tmp/downloadpatch/download.c	Mon Feb 12 12:07:50 2001
*************** t_IP sip;
*** 95,100 ****
--- 95,102 ----
          t_PXE_MTFTP_TMOUT *mtftp_tmout;
          t_PXE_MTFTP_DELAY *mtftp_delay;
  
+         unsigned long mem_size = 0;
+ 
          if (bootfile = find_dhcp_tag(&reply, 67, 0)) {
                  strncpy(dl_fname, bootfile->buf, bootfile->len);
                  dl_fname[bootfile->len] = 0;
*************** t_IP sip;
*** 116,122 ****
  
          initrd_size = 4 * 1024L * 1024L;
  
!         initrd_addr = (get_memsize() - 1024L) * 1024L - initrd_size;
  
          cll();
          bputs("Downloading initrd image...\n");
--- 118,129 ----
  
          initrd_size = 4 * 1024L * 1024L;
  
!         mem_size = get_memsize();
!         if (mem_size > 0x038000000) {
!                 initrd_addr = 0x038000000 - initrd_size;
!         } else {
!                 initrd_addr = (mem_size - 1024L) * 1024L - initrd_size;
!         }
  
          cll();
          bputs("Downloading initrd image...\n");



Reproducible: Always
Steps to Reproduce:
1. Use PXE to boot a server with > 2Gig RAM.
2.
3.
	

Actual Results:  ...
mapped APIC to ffffe000 (fee00000)
mapped IOAPIC to ffffd000 (fec00000)
mapped IOAPIC to ffffc000 (fec01000)
initrd already destroyed by paging_init!
Detected 700084 kHz processor.
Console: colour VGA+ 80x25
Calibrating delay loop... 1395.92 BogoMIPS
initrd overwritten (0x4faf0000 < 0xc19bdc98) - disabling it.
...
RAMDISK: Couldn't find valid RAM disk image starting at 0.
Invalid session number or type of track
Kernel panic: VFS: Unable to mount root fs on 01:01

Expected Results:  The boot should have completed.

I have tried booting kernels with BIGMEM turned on and off, as well as 2
gig support.  All showed the same result.

Comment 1 Michael Johnson 2001-02-12 22:29:43 UTC
Opps, wrong patch file.  The patch should read:

*** download.c	Thu Sep 23 17:58:21 1999
--- /tmp/downloadpatch/download.c	Mon Feb 12 13:35:52 2001
*************** t_IP sip;
*** 95,100 ****
--- 95,102 ----
          t_PXE_MTFTP_TMOUT *mtftp_tmout;
          t_PXE_MTFTP_DELAY *mtftp_delay;
  
+         unsigned long mem_size = 0;
+ 
          if (bootfile = find_dhcp_tag(&reply, 67, 0)) {
                  strncpy(dl_fname, bootfile->buf, bootfile->len);
                  dl_fname[bootfile->len] = 0;
*************** t_IP sip;
*** 116,122 ****
  
          initrd_size = 4 * 1024L * 1024L;
  
!         initrd_addr = (get_memsize() - 1024L) * 1024L - initrd_size;
  
          cll();
--- 118,129 ----
  
          initrd_size = 4 * 1024L * 1024L;
  
!         mem_size = (get_memsize() - 1024L) * 1024L;
!         if (mem_size > 0x038000000) {
!                 initrd_addr = 0x038000000 - initrd_size;
!         } else {
!                 initrd_addr = mem_size - initrd_size;
!         }
  
          cll();
          bputs("Downloading initrd image...\n");

          bputs("Downloading initrd image...\n");


Comment 2 Michael Johnson 2001-02-12 22:31:31 UTC
Let's try that again, it pasted wrong...

*** download.c	Thu Sep 23 17:58:21 1999
--- /tmp/downloadpatch/download.c	Mon Feb 12 13:35:52 2001
*************** t_IP sip;
*** 95,100 ****
--- 95,102 ----
          t_PXE_MTFTP_TMOUT *mtftp_tmout;
          t_PXE_MTFTP_DELAY *mtftp_delay;
  
+         unsigned long mem_size = 0;
+ 
          if (bootfile = find_dhcp_tag(&reply, 67, 0)) {
                  strncpy(dl_fname, bootfile->buf, bootfile->len);
                  dl_fname[bootfile->len] = 0;
*************** t_IP sip;
*** 116,122 ****
  
          initrd_size = 4 * 1024L * 1024L;
  
!         initrd_addr = (get_memsize() - 1024L) * 1024L - initrd_size;
  
          cll();
          bputs("Downloading initrd image...\n");
--- 118,129 ----
  
          initrd_size = 4 * 1024L * 1024L;
  
!         mem_size = (get_memsize() - 1024L) * 1024L;
!         if (mem_size > 0x038000000) {
!                 initrd_addr = 0x038000000 - initrd_size;
!         } else {
!                 initrd_addr = mem_size - initrd_size;
!         }
  
          cll();
          bputs("Downloading initrd image...\n");



Comment 3 Elliot Lee 2001-08-08 04:59:17 UTC
Whee a patch, must apply.

Apologies for the unresponsiveness of the previous pxe maintainer...

Comment 4 Elliot Lee 2001-08-08 05:08:44 UTC
*** Bug 18277 has been marked as a duplicate of this bug. ***

Comment 5 Elliot Lee 2001-08-26 20:11:08 UTC

*** This bug has been marked as a duplicate of 11773 ***


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