Welcome! Log In Create A New Profile

Advanced

GRUB and initrd_addr_max

Posted by Mike 
GRUB and initrd_addr_max
October 26, 2018 11:01AM
Hi!

I have a little question, that I am going to ask on GRUB's mailing list as well, considering the title, but I would like to get an opinion from someone who works with linux kernel up close as well.

The question addresses value that can be retrieved from kernel's header and which points and the max address in memory that initrd can be extracted to. if I check my kernel image, I can see that it's set to 0x7fffffff. However, if you look into grub's code, the grub-core/loader/i386/linux.c to be exact, this value is considered as "bogus" and it's cut down to GRUB_LINUX_INITRD_MAX_ADDRESS which is 0x37ffffff. Now, the commit (92907110) that introduced this change in grub's code doesn't say much except: "Without them [the constraint], initrd was allocated too high for Linux to find it.". Now, this is a bit problematic, since it limits the actual size of initrd that you can load to something around ~400MB. More or less. Maybe more.

So to finally go with the question - is this justified? Is that really the case for recent kernels (the grub's commit is from 2008)? I have been planning to test that by removing this constraint and allowing addr_max to be of the value that comes with the kernel, but I also wanted to confirm first if something like that would actually make any sense.

Any hints would be appreciated!
Do you know how to write according to an Oxford rules? check this out for a detailed tips.
Author:

Your Email:


Subject:


Spam prevention:
Please, solve the mathematical question and enter the answer in the input field below. This is for blocking bots that try to post this form automatically.
Question: how much is 21 plus 17?
Message: