#274 IMPORTANT: substantially improve instructions for correctly configuring GRUB in Libreboot

Open
opened 2 years ago by vimuser · 3 comments

Debian Stretch and some other distros fail to boot in the automatic Load Operating System option in the default libreboot grub.cfg. Either fix that (probably not feasible), or substantially improve the documentation for how to manually edit the grub.cfg in the libreboot ROM image, since those distros do actually boot correctly and some of them just require manual GRUB configuration in Libreboot.

EDIT (clarification): The issue is that, with the valid partitioning setup, the fallback commands in the default menuentry also don't work all of the time. See: #274

Debian Stretch and some other distros fail to boot in the automatic *Load Operating System* option in the default libreboot grub.cfg. Either fix that (probably not feasible), or substantially improve the documentation for how to manually edit the grub.cfg in the libreboot ROM image, since those distros do actually boot correctly and some of them just require manual GRUB configuration in Libreboot. EDIT (clarification): The issue is that, with the valid partitioning setup, the fallback commands in the default menuentry also don't work all of the time. See: https://notabug.org/libreboot/libreboot/issues/274#issuecomment-5435
Swift Geek commented 2 years ago
Collaborator

This isn't related to libreboot, but can be documented

This isn't related to libreboot, but can be documented
Leah Rowe commented 2 years ago
Owner

With the exact same partitioning scheme, and exact same file systems in use, where the following is valid:

  • set root='ahci0,msdos1'
  • linux /vmlinuz root=/dev/sda1
  • initrd /initrd.img

Without GRUB or grub.cfg being present on the HDD at all, Trisquel 7 boots perfectly, using the default Load Operating System menu entry.

Without GRUB or grub.cfg being present on the HDD at all, Debian Stretch does not boot using that default menuentry. However, the very same commands work when entered manually on the GRUB console, and the distro then boots correctly.

In both cases, without grub.cfg being present, the GRUB configuration in Libreboot should default to trying the above GRUB commands.

I can offer no explanation for this. My current solution is to just add a custom menuentry in grub.cfg.

With the exact same partitioning scheme, and exact same file systems in use, where the following is valid: - set root='ahci0,msdos1' - linux /vmlinuz root=/dev/sda1 - initrd /initrd.img Without GRUB or grub.cfg being present on the HDD at all, Trisquel 7 boots perfectly, using the default *Load Operating System* menu entry. Without GRUB or grub.cfg being present on the HDD at all, Debian Stretch does not boot using that default menuentry. However, the very same commands work when entered manually on the GRUB console, and the distro then boots correctly. In both cases, without grub.cfg being present, the GRUB configuration in Libreboot should default to trying the above GRUB commands. I can offer no explanation for this. My current solution is to just add a custom menuentry in grub.cfg.
Andrew Robbins commented 2 years ago
Collaborator

Libreboot's grub.cfg has the following differences (emphasized in bold) from the commands you listed:

  • set root=ahci0,1
  • linux /vmlinuz root=/dev/sda1 rw
  • initrd /initrd.img

You can set the root device without specifying a partition type, like msdos or gpt for example, but the GRUB manual discourages it. This is unlikely to be the problem, though.

Another possibility is the command line option passed to the kernel (rw). Could you try removing that bit from grub.cfg and reflash to see if the problem persists? The reason for reflashing rather than editing the menu config is because I'm unsure exactly how GRUB treats an edited menu entry (i.e. is it like typing in the commands on the GRUB command line and executing them, or something else?).

Libreboot's grub.cfg has the following differences (emphasized in bold) from the commands you listed: * set root=**ahci0,1** * linux /vmlinuz root=/dev/sda1 **rw** * initrd /initrd.img You can set the root device without specifying a partition type, like msdos or gpt for example, but the GRUB manual discourages it. This is unlikely to be the problem, though. Another possibility is the command line option passed to the kernel (`rw`). Could you try removing that bit from `grub.cfg` and reflash to see if the problem persists? The reason for reflashing rather than editing the menu config is because I'm unsure exactly how GRUB treats an edited menu entry (i.e. is it like typing in the commands on the GRUB command line and executing them, or something else?).
Sign in to join this conversation.
Loading...
Cancel
Save
There is no content yet.