LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   debootstrap install on uefi with systemd-boot (https://www.linuxquestions.org/questions/debian-26/debootstrap-install-on-uefi-with-systemd-boot-4175673938/)

sadpepe 04-25-2020 03:37 AM

debootstrap install on uefi with systemd-boot
 
I've been immensely struggling with installing debian via debootstrap method on a uefi system. It seems that there are very few tutorials online for uefi specifically. So I've been trying to follow the existing ones, with the attempt to modify them, but had no luck whatsoever.

Probably, the hardest part is bootloader. I really want to use systemd-boot, but I couldn't make it work.

My install follows these steps:

1. I start with making and formatting EFI and ext4 partition

2. Then I try to mount them
Code:

mount /dev/sda2 /mnt
mkdir -p /mnt/boot/efi
mount /dev/sda1 /mnt/boot/efi

3. I run debootstrap command and mount other partitions
Code:

debootstrap --variant=minbase --arch=amd64 --include systemd,vim sid /mnt
mount -o bind /proc /mnt/proc
mount -o bind /sys /mnt/sys
mount -o bind /dev /mnt/dev

4. After that I chroot, edit fstab and set root password
fstab:
Code:

/dev/sda2 / ext4 defaults 0 1
5. Now I install kernel, headers and microcode
Code:

apt-get install linux-image-amd64 linux-headers-amd64 firmware-linux firmware-linux-free intel-microcode
And after that I am stuck.

Here is my attempt at systemd-boot:
Code:

bootctl --path=/boot/efi install
cd /boot/efi/loader
vim loader.conf
------------------------
        default debian-*
cd entries
vim debian.conf
------------------------
        title        Debian
        linux        /vmlinuz-linux
        initrd        /intel-ucode.img
        initrd        /initramfs-linux.img
        options        root=UUID=07de1a8d-ba01-4b47-32cc-2403e7464d74 rw

It doesn't give any errors, but after reboot it doesn't display the entry on the bootloader either.
What am I doing wrong? I desperately need help, this thing drains my sanity.

LBuhler 06-06-2020 07:39 AM

If you're okay with switching to Grub (at least for the initial installation) the following guide should do the trick for you:

https://blog.heckel.io/2017/05/28/cr...e-linux-system

Some alterations are necessary, you don't need a 1 MiB Bios boot partition and Grub installation should just be run with:

grub-install /dev/<dest drive>

Make sure that you have the EFI partition mounted at /boot/efi before running the grub installation command.

You can omit the creation of a grub efi image using grub-mkimage, grub should take care of that by itself.

If you get this to work, you could try to give the systemd-boot another go.

I just posted this guide to get that bootstrapping installation up and running on a Slackware USB drive, it could also provide you with some additional information:
https://www.linuxquestions.org/quest...ap-4175676603/


All times are GMT -5. The time now is 10:24 PM.