~vejnar/doc-website

9b3657d6e4b506758dc706c33d59fad464e73e48 — vejnar 2 months ago 449739d
Switch from Limine to GRUB
1 files changed, 20 insertions(+), 42 deletions(-)

M content/doc/os/install_archlinux/_index.md
M content/doc/os/install_archlinux/_index.md => content/doc/os/install_archlinux/_index.md +20 -42
@@ 95,63 95,41 @@ Configuration files are [available](files) for download.

    * After rebooting, loaded microcode can be check using `dmesg | grep microcode` or reading `/sys/devices/system/cpu/cpu0/microcode/version`

3. Bootloader: *Limine* is recommended
3. Bootloader: *GRUB* is recommended

    * **Limine**
    * **GRUB**

        [Limine](https://limine-bootloader.org/) is an advanced and simple to configure bootloader. In particular, Limine can read the kernel and initramfs directly on the system partition (limited to Ext4) where they are installed by Pacman, and doesn't require them to be copied on the [ESP](https://wiki.archlinux.org/index.php/EFI_system_partition).
        [GRUB](https://www.gnu.org/software/grub/) is an advanced bootloader. Drivers for most filesystems are included: GRUB can read the kernel and initramfs directly on the system partition where they are installed by Pacman, and doesn't require them to be copied on the [ESP](https://wiki.archlinux.org/index.php/EFI_system_partition). While it provides an advanced system to generate a configuration file, it can be manually configured simply in the main configuration file `/boot/grub/grub.cfg`.

        * Mount ESP on `/efi` and create following directories.
            ```bash
            mkdir /efi
            mount /dev/sda1 /efi
            mkdir /efi/EFI
            mkdir /efi/EFI/BOOT
            ```

        * Install `limine` package
        * Install `grub` package

        * Copy Limine to the ESP
        * Install grub
            ```bash
            cp /usr/share/limine/BOOTX64.EFI /efi/EFI/BOOT/
            grub-install --target=x86_64-efi --efi-directory=/efi --removable
            ```
            This will create `/efi/EFI/BOOT/BOOTX64.EFI` and all GRUB config files in `/boot/grub`.

        * Configure Limine. See [CONFIG.md](https://github.com/limine-bootloader/limine/blob/trunk/CONFIG.md) for more help.
            * Copy [limine.cfg](files/limine.cfg) in `/boot`
            * By default, font size is doubled using `TERM_FONT_SCALE=2x2`. On HiDPI monitors, increasing to `TERM_FONT_SCALE=4x4` may be preferred.
            * By default, Limine will run with the first entry (line starting with `:`) in `limine.cfg`. To select a different default entry, for example the 2nd entry, add in the header section before the entries:
                ```
                DEFAULT_ENTRY=2
                ```
            * On multi-GPU system, Limine may have problem detecting the active GPU. While system will boot normally, Limine screen will remain blank. Adding `SERIAL=yes` below `TIMEOUT` fixes the problem.
        * Configure GRUB
            * Copy [grub.cfg](files/grub.cfg) in `/boot/grub`

        * Configure microcode. In `/boot/limine.cfg`, before the initramfs `MODULE_PATH` line, add the line:
            * Intel
                ```
                MODULE_PATH=boot:///boot/intel-ucode.img
                ```
            * AMD
                ```
                MODULE_PATH=boot:///boot/amd-ucode.img
                ```
        * CPU microcode: Since [mkinitcpio](https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio) v38, the CPU microcode is packed together with the main initramfs image. In consequence, no configuration of GRUB is needed.

        * Microsoft Windows: Limine can chainload the Windows bootloader.
            * If Linux and Windows have each their own ESP (for example if Linux and Windows were installed on separate drives):
                1. Label the Windows `ESP` partition (Windows ESP label is only set in the GPT, not on the filesystem) using for example for drive `/dev/nvme1n1p1` (use `lsblk` to identify drive):
                    ```bash
                    fatlabel /dev/nvme1n1p1 ESPWIN
                    ```
                2. Add in `limine.cfg`:
                    ```
                    :Windows
                        PROTOCOL=chainload
                        IMAGE_PATH=fslabel://ESPWIN/EFI/Microsoft/Boot/bootmgfw.efi
                    ```
            * If Linux and Windows share a common ESP, add in `limine.cfg`:
        * Microsoft Windows: GRUB can chainload the Windows bootloader.
            * Add to `/boot/grub/grub.cfg`:
                ```
                :Windows
                    PROTOCOL=chainload
                    IMAGE_PATH=boot://1/EFI/Microsoft/Boot/bootmgfw.efi
                menuentry "Windows" {
                    insmod part_gpt
                    insmod fat
                    insmod chain
                    search --no-floppy --set=root --label "ESP"
                    chainloader ($root)/EFI/Microsoft/Boot/bootmgfw.efi
                }
                ```
            * Turn-off *Fast Startup*



@@ 336,7 314,7 @@ Configuration files are [available](files) for download.
6. Printing

    * Install `cups` package
    * Enable *org.cups.cupsd.service* systemd service
    * Enable *cups.service* systemd service
    * Configure printer(s) at *http://localhost:631*

7. Recommended packages