[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Initrd file not loaded
From: |
Jesús Velazquez |
Subject: |
Re: Initrd file not loaded |
Date: |
Mon, 5 Jun 2006 14:44:54 -0500 |
Hi:
I posted an issue loading the initrd file in a Xeon Platform, the problem was the following:
>On Wednesday 31 May 2006 03:18, Jesús Velazquez wrote:
>> We are trying to use Grub2 for booting RedHat Enterprise Linux 4 update 2
>> on Xeon Platforms. But, we found that the initrd file is not loaded by grub
>> and the kernel can't mount /. The linux kernel doesn't recognize the boot
>> disk and It dies.
>Please describe how you boot the linux.
>Thanks,
>Okuji
We found the following misbehavior:
In the function grub_rescue_cmd_initrd (at file loader/i386/pc/linux.c), the following lines of code (lines 335-336)
if (!linux_mem_size && linux_mem_size < addr_max)
addr_max = linux_mem_size;
Setup the addr_max to linux_mem_size when "mem=" option is not specified. I mean the condition is inverted. That means
that if somebody doesn't specify the "mem=" option, linux_mem_size is 0 and addr_max = linux_mem_size. If we remove
the inverted condition (!linux_mem_size), the initrd file is loaded without any problem, and the system boots ok. We think that
the logic of this condition is if someone specifies the "mem=" option we need to adjust the addr_max variable to point to the upper memory boundary, right?
We are working with a 8-Way Xeon Platform with 8GB of memory. The weird thing is that the original code works without any issues on Desktop
configurations (< 4GB of memory). We also forced addr_max to GRUB_LINUX_INITRD_MAX_ADDRESS (lines 324-329 at file loader/i386/pc/linux.c).
#if 0
if (grub_le_to_cpu16 (lh->version) >= 0x0203)
addr_max = grub_cpu_to_le32 (lh->initrd_addr_max);
#else
addr_max = GRUB_LINUX_INITRD_MAX_ADDRESS;
#endif
We have 8 GB of memory (4G available for protected mode), so we don't bother about it, we have enough memory.
Regards,
Jesus & Oscar