lilo, initrd and RAM > 1GB
Hi!
I found a problem booting with lilo 22.1, linux-2.2.20 and initrd on a machine with more than 1GB of physical memory!
The kernel is configured with CONFIG_2GB set and lilo is called with the following parameters in /etc/lilo.conf:
[...]
boot = /dev/scsi/host0/bus0/target0/lun0/disc
install = /boot/boot.b
timeout = 100
verbose = 1
prompt
read-only
lba32
image = /boot/vmlinuz
label = linux
root = /dev/scsi/host0/bus0/target0/lun0/part3 initrd = /boot/initrd.gz
append = "apm=power-off"
vga = 1
[...]
With this setting, the system boots fine if I have 1GB - epsilon of RAM installed.
As soon as I put more than 1GB of physical memory into the machine (for example: 1.5GB), the kernel itself recognizes the correct amount of memory, but tells me at boot time:
[...]
initrd overwritten (0x80f30000 < 0x8115af08) - disabling it [...]
It boots fine, if I boot it with "linux mem=960M"...
I tried the same kernel and initrd image with the syslinux bootloader (version 1.65), and here linux boots fine even with 1.5GB RAM installed.
I've put a printk statement into init/main.c to get the initrd_start address in this case, and it says:
[...]start_kernel: initrd_start = 0xb7f30000
[...]
I then called lilo again on the 1.5GB system booted with syslinux, but this didn't help: initrd was still loaded at address 0x80f30000 and thus got overwritten at boot time...
This behaviour is reproducable on a different system, too.
To me it looks like lilo get's the initrd start address wrong if there is more than 1GB of RAM in the system. I haven't found anything in the lilo documentation how to solve this problem.
Is this a lilo or a user bug?
Any idea, anyone?
- andreas
Signature · 4 lines
Andreas Haumer | mailto:[email protected] *x Software + Systeme | http://www.xss.co.at/ Karmarschgasse 51/2/20 | Tel: +43-1-6060114-0 A-1100 Vienna, Austria | Fax: +43-1-6060114-71
Followup to: <[email protected]> By author: Andreas Haumer <[email protected]> In newsgroup: linux.dev.kernel
Quoted 6 lines
To me it looks like lilo get's the initrd start address wrong if there is more than 1GB of RAM in the system. I haven't found anything in the lilo documentation how to solve this problem.
The initrd end address should be obtained via the following algorithm:
# high_addr here is the highest byte that can be occupied by
# the initrd if ( bootproto >= 0x203 ) {
high_addr := header->ramdisk_max
} else {
high_addr := 0x37ffffff
}
high_addr := min(memsize-1, high_addr)The "magic constant" 0x37ffffff was widely believed to have been 0x3bffffff (which it might have originally been); this value, however, doesn't work with most kernels.
This is why the ramdisk ceiling needs to be explicitly reported by the kernel, as is done in the 2.03 boot protocol.
-hpa
Signature · 3 lines
<[email protected]> at work, <[email protected]> in private! "Unix gives you enough rope to shoot yourself in the foot." http://www.zytor.com/~hpa/puzzle.txt <[email protected]>