Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 647004 - <sys-boot/grub-1 should support multiple concatenated initrd images
Summary: <sys-boot/grub-1 should support multiple concatenated initrd images
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ian Stakenvicius (RETIRED)
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2018-02-08 15:56 UTC by Gil Kloepfer
Modified: 2018-02-09 17:05 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to allow concatenation of multiple initrd images (grub-0.97-handle-multistage-initrd.patch,2.47 KB, patch)
2018-02-08 15:56 UTC, Gil Kloepfer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gil Kloepfer 2018-02-08 15:56:01 UTC
Created attachment 518558 [details, diff]
Patch to allow concatenation of multiple initrd images

In order to early-load Intel microcode images, a .cpio file in a certain format must be seen as the initrd.  This process is explained at https://wiki.gentoo.org/wiki/Intel_microcode

With legacy GRUB, this prevents a normal initrd image from being loaded, as the kernel allows only one initrd ramdisk area.  If multiple initrd directives are provided in GRUB Legacy, the last one is the only one that actually works.

It is possible to chain the early_ucode.cpio and the init ramdisk together via 'cat' after the early_ucode.cpio build (or when the kernel is built) and the kernel will handle this correctly if the concatenated image is specified in GRUB, but it requires that this process be done after every microcode update or kernel build.

This enhancement provides a feature similar to the one in GRUB2 that enables this to happen automatically in GRUB Legacy.  It also detects the condition of two initrd lines for a single boot grouping and provides an error in this case, as it doesn't work and needlessly consumes memory.

This will allow GRUB Legacy users to more easily handle the early-stage Intel microcode updates without extra work.
Comment 1 Ian Stakenvicius (RETIRED) gentoo-dev 2018-02-09 17:05:20 UTC
sys-boot/grub:0 is really a frozen project that I'm maintaining only insofar as making sure it will still build/install with its current feature set.  I don't have any interest in expanding what it currently offers to cover additional use-cases.

Since grub:0 can still process an initrd that has been pre-concatenated upon its generation or creation, there's no massive lack of support or barrier for early-stage intel microcode loading.  I would highly recommend upgrading to grub:2 if this convenience is necessary for you, rather than patching grub:0 to do the same.