[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Initramfs not loaded or passed to kernel in grub2 UEFI x86_64

From: Vladimir 'φ-coder/phcoder' Serbinenko
Subject: Re: Initramfs not loaded or passed to kernel in grub2 UEFI x86_64
Date: Sun, 20 Jun 2010 00:46:13 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100515 Icedove/3.0.4

On 06/18/2010 03:44 PM, KESHAV P.R. wrote:
> The problem seems to be related to the way grub2 allocates the memory
> for the kernel and initramfs. Both my Archlinux x86_64 kernel and its
> corresponding initramfs are LZMA compressed (which is now Archlinux
> default).
Can you try experimental branch?
> I guess the problem is as follows :-
> 1. First load the LZMA compressed x86_64 kernel bzImage into memory.
> 2. Then load the LZMA compressed initramfs cpio archive into memory.
> 3. Launch the linux kernel.
> 4. The kernel decompresses itself and then takes in all the boot
> parameters passed by grub2 and the memory location of loaded initramfs
> image (which is still LZMA compressed as in memory).
> The kernel might have overwritten parts of the initramfs LZMA archive
> in the memory and once the kernel tries to create the rootfs it find a
> corrupted initramfs in the memory. If I am right grub2 does not
> decompress either the kernel or the initramfs. It is the job of the
> kernel.
> This kernel panic or error somehow doee not occur with BIOS version of
> GRUB2. It occurs in the x86_64 UEFI version only as of now (not sure
> about i386 UEFI GRUB2). As I mentioned before Fedora's grub-legacy
> grub.efi boots Archlinux without any problem. Archlinux does not
> include any disk-controller driver or filesystem driver built-in the
> kernel by default and it is impossible to boot without the initramfs
> (atleast in GRUB2 UEFI x86_64 for now).
> Is this in anyway related to assumption of a compression ratio of 50%
> for kernel/initramfs in the file
> (grub2-source-dir)/loader/i386/efi/linux.c ? LZMA generally produces
> even smaller compression ratios (between 20 to 30 %). I think adequate
> contiguous memory should be allocated for uncompressed kernel alone so
> that after its own decompression it finds a not-corrupted initramfs in
> the memory.
> I am attaching the memory map reported by the UEFI firmware used (both
> EDK and EDK2 of tianocore.sourceforge.net) if it is of help in any
> case. Output using "memmap > fs0:\edk2_duet_memmap.txt" and "memmap >
> fs0:\edk_duet_memmap.txt" in EFI shell.
> Regards
> _______________________________________________
> Bug-grub mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bug-grub

Vladimir 'φ-coder/phcoder' Serbinenko

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]