You are not logged in.

#1 2020-09-11 18:33:34

robin_m
Member
Registered: 2013-12-11
Posts: 17

[solved] Bootloader not working

Hello,
Long story short: I don't understand what I forgot to do, but I cannot manage to have a working boot loader. Any help would be extremely appreciated.

My last few installs of archlinux have not been successful, and all of them for the same reason. After successfully loaded the live usb of archlinux, partionned, chrooted and installed base + the software I need, I had one last thing to do: installing a bootloader. It could be grub, it could be systemd-boot, I don't really care. But in my last few attempt it was always a failure. Fortunately for me, I still have a few SSDs with working archlinux inside, so it has never been an issue that I wasn't able any more to install arch. All of those unsuccessful installs had the following common points: one disk with gpt partitioning, one partition for /,  one for /home, and one for the boot (more on that later). I had some systems with a Windows partition, some not. My / and /home are usually using ext4, but I also tried btrfs. The boot partition is always using FAT32. All those machines had an intel processor (i3 or i5), and were using UEFI.

Unfortunately for me in a recent update my working installation of arch on my laptop broke (ie, I wasn't able anymore to boot to even a fullscreen console). I used a live usb to try to fix it made think probably worse. I would like to fix it, but more importantly, I would like to understand why I didn't do it the last years on all those unsuccessful installation.

This install has 3 partitions: / and /home in btrfs and a boot partition in FAT32. Only archlinux is installed on this system. I'm not using anything fancy like encryption or LVM)

As far as understand, what I need to do is:
- First, I need to boot using a live usb of arch.
- I know that the current content of my boot partition is a mess, so I will format it.
- Then I will mount all my partition in /mnt. And by the way, should I mount the boot partition on /mnt/boot, /mnt/boot/efi, or /mnt/efi?
- I will re-install base and intel-ucode using pacstrap just in case, as well a re-generating my fstab with genfstab (the UUID of the / and /home partitions didn't changed, but I need to double check the one of my boot partition)
- Then I will use arch-chroot
- At that point I need to install a bootloader, and this is where I'm stuck

Is this plan good? Which bootloader should I choose. What are the gotchas? I saw that if you are using intel processor, you need to install intel-ucode. I also saw that you may need to add hooks for custom module but I don't think it's needed in my case (is it needed for btrfs?). It's been ages since I formatted my / and /home partitions in btrfs, so I forgot if I used RAID, but I assume that since there is a single disk it shouldn't be using RAID. During the installation of the bootloader, is the archlinux entry automatically created (I assume it can be different from one bootloader to another, but let's assume it's systemd-boot or grub)? Is there specific things to do related to UEFI (like using modprobe efivars or something like this)?

I'm sorry to have to ask those questions, I'm sure that it's clearly written in the wiki, but I can't manage to find it alone.

Last edited by robin_m (2020-10-24 18:22:20)

Offline

#2 2020-09-11 19:28:43

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,568

Re: [solved] Bootloader not working

It's all documented here: https://wiki.archlinux.org/index.php/Arch_boot_process
The first thing to check, and this is crucial, is to see if your EFI partition or boot partition has a partition type GUID otherwise your bootloader won't find it. This ID tells the system where the bootloader and kernels reside and there should only be one partition of this ID in the whole system.
The bootloader is really a personal preference. Grub is the most used and sort of default. rEFInd can be configured to have a bit of eye-candy. The wiki has a comparison table.
Then generate an entry into your NVRAM with efibootmgr and use it too check the bootorder.
Make sure your kernel parameters point to the intramdisk you intend to boot.
Have a good read of the wiki, including links it points to, to understand the boot process and the role of the bootloader.

Last edited by d_fajardo (2020-09-11 19:29:42)

Offline

#3 2020-09-11 19:33:27

robin_m
Member
Registered: 2013-12-11
Posts: 17

Re: [solved] Bootloader not working

Thanks for the link and the explanation. I think I never found that page, and it really look like it's (at least part) of the piece of knowledge I was missing. I think I will try to fix my installation tomorrow after some rest.

Offline

#4 2020-10-24 18:21:54

robin_m
Member
Registered: 2013-12-11
Posts: 17

Re: [solved] Bootloader not working

I finally took the time to repair it, and it worked. Thanks @d_fajardo

Offline

Board footer

Powered by FluxBB