lbwww/site/docs/linux/index.md

96 lines
3.4 KiB
Markdown
Raw Normal View History

2021-05-18 12:21:48 +00:00
---
2023-04-09 21:38:30 +00:00
title: Linux guides
2021-05-18 12:21:48 +00:00
x-toc-enable: true
...
2022-11-16 22:10:02 +00:00
NOTE: This guide pertains to x86 hosts, and does not cover supported CrOS/ARM
chromebooks. For ARM targets, you should refer to u-boot documentation.
2021-05-18 12:21:48 +00:00
This page is useful for those who wish to use the GRUB GRUB payload directly.
If you're using SeaBIOS, the boot process will work similarly to traditional
BIOS systems; refer to the SeaBIOS documentation
on <https://seabios.org/SeaBIOS>
2022-11-23 01:26:21 +00:00
Linux is generally assumed, especially for Libreboot development, but Libreboot
also works quite nicely with [BSD systems](../bsd/).
2021-05-18 12:21:48 +00:00
Useful links
============
Refer to the following pages:
* [How to Prepare and Boot a USB Installer in libreboot Systems](grub_boot_installer.md)
* [Modifying the GRUB Configuration in libreboot Systems](grub_cbfs.md)
2021-05-18 12:21:48 +00:00
* [How to Harden Your GRUB Configuration, for Security](grub_hardening.md)
2022-11-19 01:16:55 +00:00
Encrypted (LUKS/dm-crypt) installations
=======================================
2023-03-21 03:19:05 +00:00
A better solution for encryption would be a Linux payload in flash, handling the
2022-11-19 01:16:55 +00:00
encryption, at least if you want to use Linux, because then it'll have
perfect LUKS support.
2022-11-19 01:16:55 +00:00
GRUB otherwise has good filesystem support, so if you have a valid `grub.cfg`
in `/boot/grub` on your installed system, Libreboot's GRUB configuration has
logic in it that will try to automatically use whatever you have installed,
by switching to it. In this way, most installations Just Work, so long as
the `/boot` partition is accessible.
2023-03-21 03:19:05 +00:00
Full encryption for basic LUKS2 is supported in libreboot.
See [the guide](encryption.md) for more detail.
2023-03-22 03:45:08 +00:00
[The ZFSbootmenu guide](zfsbootmenu.md) builds upon the main encryption guide but describes a setup with ZFS native encryption and ZFSbootmenu.
Rebooting system in case of freeze
===================================
Linux kernel has a feature to do actions to the system any time, even
with it freezes, this is called a
[Magic SysRq keys](https://en.wikipedia.org/wiki/Reisub). You can do these
actions with Alt + Sysrq + Command. These are the actions:
* Alt + SysRq + B: Reboot the system
* Alt + SysRq + I: Send SIGKILL to every process except PID 1
* Alt + SysRq + O: Shut off the system
If some of them don't work, you have to enable it in the kernel
command line paramter. So append `sysrq_always_enabled=1` to your
`GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`
You can also run `# sysctl kernel.sysrq=1` to enable them.
2021-07-24 21:27:52 +00:00
Fedora won't boot?
==================
This may also apply to CentOS or Redhat. Chroot guide can be found on
[fedora website](https://docs.fedoraproject.org/en-US/quick-docs/bootloading-with-grub2/#restoring-bootloader-using-live-disk)
linux16 issue
-------------
Libreboot's default GRUB config sources fedora's grub config
`grub.cfg` (in `/boot/grub2/grub.cfg`), fedora by default makes use of the
`linux16` command, where it should be saying `linux`
2021-07-24 21:27:52 +00:00
Do this in fedora:
Open `/etc/grub.d/10_linux`
Set the `sixteenbit` variable to an empty string, then run:
2023-01-08 01:22:04 +00:00
grub2-mkconfig -o /boot/grub2/grub.cfg
2021-07-24 21:27:52 +00:00
BLS issue
---------
With [newer versions of fedora](https://fedoraproject.org/wiki/Changes/BootLoaderSpecByDefault),
scripts from grub package default to generating [BLS](https://www.freedesktop.org/wiki/Specifications/BootLoaderSpec/)
instead of `grub.cfg`. To change that behaviour add following line
to `/etc/default/grub` (or modify existing one if it already exists):
2023-01-08 01:22:04 +00:00
GRUB_ENABLE_BLSCFG=false
2021-07-24 21:27:52 +00:00
Then generate `grub.cfg` with:
2023-01-08 01:22:04 +00:00
grub2-mkconfig -o /boot/grub2/grub.cfg