• 0 Posts
  • 2 Comments
Joined 1 year ago
cake
Cake day: December 28th, 2023

help-circle
  • renzev@lemmy.worldtoLinux@lemmy.mlGRUB is confusing
    link
    fedilink
    English
    arrow-up
    6
    arrow-down
    1
    ·
    1 day ago

    If GRUB is too confusing, just uninstall it? You said you have a UEFI system, you don’t need a bootloader. You can just put the vmlinuz and initramfs onto the ESP and boot into it directly. You can use efibootmgr to create the boot entry, something like this:

    efibootmgr \
    	--create \
    	--disk /dev/sda \
    	--part 1 \
    	--index 0 \
    	--label "Void linux" \
    	--loader /vmlinuz-6.6.52_1 \
    	--unicode " \
    		root=PARTLABEL=VOID_ROOT \
    		rw \
    		initrd=\\initramfs-6.6.52_1.img \
    		loglevel=4 \
    		net.ifnames=0 \
    		biosdevname=0 \
    		nowatchdog \
    		iomem=relaxed \
    		"
    
    • --disk /dev/sda: What disk is the esp on?
    • --part 1 What partition number (counting from 1) is the esp on?
    • --index 0 At what index in the boot menu should the boot entry appear?
    • --loader Path to the vmlinuz file. These are normally in /boot, you have to move it to the esp yourself
    • root=PARTLABEL=VOID_ROOT this is the linux root partiion. I’m using PARTLABEL to identify mine, but you can use pretty much anything that /etc/fstab supports
    • initrd=\\initramfs-6.6.52_1.img Again, you have to move the initramfs file from /boot into the esp. For some reason this uses backslashes, not forward slashes as path separator (double backslashes in this case are to prevent the shell from interpreting it as an escape sequence)
    • The rest of the arguments are just misc kernel parameters that I use

    Just search for EFISTUB for more info.