Skip to content

os-prober: Allow initrd to contain spaces

Simon McVittie requested to merge smcv/grub:bug838177 into master

From: "General Chaos"

linux-boot-prober produces structured output with newline-terminated rows representing kernels, each with colon-delimited columns. We translate this into a sequence of space-separated words representing kernels, each containing colon-delimited fields where spaces are represented by carets.

When we parse each of those words into colon-delimited fields, if the field could conceivably contain spaces then we need to translate carets back into spaces. We did this for label and parameters, but not for the initrd.

In particular, when CPU microcode is installed on Arch Linux or its derivatives, they write CPU microcode into one initrd archive and the rest of early user-space into another, instead of concatenating the archives into a single file like Debian derivatives do. To boot Arch successfully from the grub menu, we need to add all of their initrds to the grub menu entry (detecting this situation requires an os-prober patch, for which see https://bugs.debian.org/820838 / installer-team/os-prober!8 (merged)).

[Commit message added by Simon McVittie smcv@collabora.com]

Bug: https://savannah.gnu.org/bugs/index.php?47681
Bug-Debian: https://bugs.debian.org/838177
Forwarded: https://savannah.gnu.org/bugs/index.php?47681
Closes: #838177

Edited by Simon McVittie

Merge request reports

Loading