Skip to contentSkip to conversation

error: "no free pages available"?

DISCUSSION Charles Turner 2 participants 4 messages Sep 7, 2007 – Nov 10, 2007

lore
Share & tools
lore
#0 lore raw

Hi all-

After many years as a happy Linux-PPC user, I'm really working to get Debian running on my Mac Mini. It's a new Core 2 Duo machine.

I'm trying to install Debian Lenny on an external USB disk (30gb) and have tried quite a few combinations. The most recent and successful is this:

Get latest Grub2 from CVS and build on Debian Lenny running in VMware Fusion. Make grub.efi as per the Grub Wiki's "TestingOnEFI" page, with the addition of ext2 and linux modules to the image.

Partition the disk via OSX DiskUtility to have a 1gb HFS+ volume on the GPT, the rest free space. Install grub.efi as per the wiki page and bless.

Boot a recent (09/2007) Debian i386 Lenny netinst CD, chosen because I believe the EFI support is on by default in the kernel. Partition and install a basic system in the free space. Don't install Grub via the installer.

Reboot holding down the option key, "EFI Boot" USB volume appears, select and get Grub2 shell prompt. Enter:

linux (hd0,3)/boot/vmlinuz-2.6.21-2-686

which returns:

[Linux-EFI, setup=0x1e00, size=0x142490]

and then:

initrd (hd0,3)/boot/initrd.img-2.6.21-2-686

which returns:

error: no free pages available

. . .

Could someone amplify on the significance of this message? I'm not sure where to go with this bit of information.

Thanks in advance, Charles Turner

#1 lore raw

Ok, please forgive the bizarro Grub logfile:

<http://www.propheticdesire.us/efi_dump20070906.jpg>

I put some grub_printf() statements in grub_rescue_cmd_initrd() in the file loader/i386/efi/linux.c, which is where the "no free pages available" error shows up.

At the beginning of the dump, before the function enters into the loop looking for initrd memory, I print out the variables:

initrd_pages
addr_min
addr_max

So I know what the size of the image is that needs to be loaded, and where in the memory map.

Inside the loop, I continually print out:

desc->type
desc->physical_start
desc->num_pages

So what Grub finds is recorded in the above JPEG.

It seems like the loop finds a chunk of GRUB_EFI_CONVENTIONAL_MEMORY (enum 7) that is 2542 pages in size at memory address 1,010,688,000. That's the right type and big enough for initrd.img, but the location is way beyond the 536,805,375 addr_max that Grub returned earlier.

I have 1GB of memory in my MacMini, so is Grub returning a bad value for addr_max?

Any suggestions on where to go from here?

Best, Charles

#2 lore raw

Wow, tough crowd on this list...

Pursuant to my previous email, I placed grub_printf() statements at approximately line #351 and #606 in the file loader/i386/efi/linux.c. That would be where grub_rescue_cmd_linux() and grub_rescue_cmd_initrd() get their ideas about what initrd_addr_max should be.

In both cases, 0x1fffffff is returned, which is a value carved into the kernel header of my vmlinuz file. So Grub2 is doing its job, and it seems there's some conflict between where initrd memory is on my Core 2 Duo MacMini (@ around 1gb), and where the Debian AMD64 vmlinuz-2.6.21-2-686 kernel is saying it can't be found above.

I don't have any experience compiling the kernel as I've not so far had a reason to. :-)

Is initrd_addr_max a configurable piece of the kernel? Again, not really sure right now where to take this info...

Best, Charles

#3 lore raw
Quoted 1 line · Charles Turner

Wow, tough crowd on this list...

It seemed we all picked the same time to be very busy :-/

Quoted 12 lines

Pursuant to my previous email, I placed grub_printf() statements at approximately line #351 and #606 in the file loader/i386/efi/linux.c. That would be where grub_rescue_cmd_linux() and grub_rescue_cmd_initrd() get their ideas about what initrd_addr_max should be.

In both cases, 0x1fffffff is returned, which is a value carved into the kernel header of my vmlinuz file. So Grub2 is doing its job, and it seems there's some conflict between where initrd memory is on my Core 2 Duo MacMini (@ around 1gb), and where the Debian AMD64 vmlinuz-2.6.21-2-686 kernel is saying it can't be found above.

Quoted 5 lines

I don't have any experience compiling the kernel as I've not so far had a reason to. :-)

Is initrd_addr_max a configurable piece of the kernel? Again, not really sure right now where to take this info...

Recently, some patches for EFI were sent in. Did these fix your problem? If not, please keep poking us... We might wake up ;)

--
Marco