Β§2023-10-26
UEFI is a hardware-based firmware, and GRUB is software that interacts with the firmware to initiate the booting of the operating system. Together, they work in tandem to start the computer and load the operating system.
GRUB 2 superseded GRUB legacy long ago, today it is commonly called simply "GRUB".
sdb
|-sdb1 vfat FAT32 47DB-2E54
|-sdb2 swap 1 78672ca5-f865-4282-8cee-df35a385abd9
`-sdb3 ext4 1.0 4a47f5a1-b321-4b88-8342-b6753403a93c 51.5G 12% /
emerge emerge sys-fs/dosfstools
(chroot) h2Jammy /usr/src # mkfs.vfat -F 32 -n efi-boot /dev/sdb1
mkfs.fat 4.2 (2021-01-31)
mkfs.fat: Warning: lowercase labels might not work properly on some systems
(chroot) h2Jammy /usr/src # mkdir /boot/efi
(chroot) h2Jammy /usr/src # mount /dev/sdb1 /boot/efi/ <-- ubuntu, gentoo ... convetion to be mounted here
(chroot) h2Jammy /usr/src # lsblk -f
sdb
|-sdb1 vfat FAT32 efi-boot 6B3D-DD28 511M 0% /boot/efi
|-sdb2 swap 1 78672ca5-f865-4282-8cee-df35a385abd9
`-sdb3 ext4 1.0 4a47f5a1-b321-4b88-8342-b6753403a93c 51.5G 12% /
nano /etc/fstab
as,#LABEL=/boot/efi
UUID=6B3D-DD28 /boot/efi vfat noauto,noatime 1 2
#LABEL=/root
UUID=4a47f5a1-b321-4b88-8342-b6753403a93c / ext4 defaults 0 1
#LABEL=swap none swap sw 0 0
UUID=78672ca5-f865-4282-8cee-df35a385abd9 none swap sw 0 0
(chroot) h2Jammy /usr/src # echo 'GRUB_PLATFORMS="efi-64"' >> /etc/portage/make.conf
(chroot) h2Jammy /usr/src # emerge --ask --update --newuse --verbose sys-boot/grub <-- safer with --newuse
(chroot) h2Jammy /usr/src # tree /boot/
/boot/ <-- start with an empty
βββ efi
2 directories, 0 files
(chroot) h2Jammy /usr/src # grub-install --efi-directory=/boot/efi
Installing for x86_64-efi platform.
Installation finished. No error reported.
(chroot) h2Jammy /usr/src # tree /boot/
/boot/
βββ efi
β βββ EFI
β βββ gentoo
β βββ grubx64.efi <-- bootloader
βββ grub
βββ fonts
β βββ unicode.pf2
βββ grubenv <-- GRUB Environment Block
βββ locale
β βββ ast.mo
β βββ ca.mo
β βββ da.mo
β βββ de_CH.mo
β βββ de@hebrew.mo
β βββ de.mo
β βββ en@arabic.mo
β βββ en@cyrillic.mo
β βββ en@greek.mo
β βββ en@hebrew.mo
β βββ en@piglatin.mo
β βββ en@quot.mo
β βββ eo.mo
β βββ es.mo
β βββ fi.mo
β βββ fr.mo
β βββ gl.mo
β βββ hr.mo
β βββ hu.mo
β βββ id.mo
β βββ it.mo
β βββ ja.mo
β βββ ko.mo
β βββ lg.mo
β βββ lt.mo
β βββ nb.mo
β βββ nl.mo
β βββ pa.mo
β βββ pl.mo
β βββ pt_BR.mo
β βββ pt.mo
β βββ ro.mo
β βββ ru.mo
β βββ sl.mo
β βββ sr.mo
β βββ sv.mo
β βββ tr.mo
β βββ uk.mo
β βββ vi.mo
β βββ zh_CN.mo
β βββ zh_TW.mo
βββ themes
β βββ starfield
β βββ blob_w.png
β βββ boot_menu_c.png
β βββ boot_menu_e.png
β βββ boot_menu_ne.png
β βββ boot_menu_n.png
β βββ boot_menu_nw.png
β βββ boot_menu_se.png
β βββ boot_menu_s.png
β βββ boot_menu_sw.png
β βββ boot_menu_w.png
β βββ COPYING.CC-BY-SA-3.0
β βββ dejavu_10.pf2
β βββ dejavu_12.pf2
β βββ dejavu_14.pf2
β βββ dejavu_16.pf2
β βββ dejavu_bold_14.pf2
β βββ README
β βββ slider_c.png
β βββ slider_n.png
β βββ slider_s.png
β βββ starfield.png
β βββ terminal_box_c.png
β βββ terminal_box_e.png
β βββ terminal_box_ne.png
β βββ terminal_box_n.png
β βββ terminal_box_nw.png
β βββ terminal_box_se.png
β βββ terminal_box_s.png
β βββ terminal_box_sw.png
β βββ terminal_box_w.png
β βββ theme.txt
βββ x86_64-efi
βββ acpi.mod
βββ adler32.mod
βββ affs.mod
βββ afs.mod
βββ afsplitter.mod
βββ ahci.mod
βββ all_video.mod
βββ aout.mod
βββ appleldr.mod
βββ archelp.mod
βββ ata.mod
βββ at_keyboard.mod
βββ backtrace.mod
βββ bfs.mod
βββ bitmap.mod
βββ bitmap_scale.mod
βββ blocklist.mod
βββ boot.mod
βββ bsd.mod
βββ bswap_test.mod
βββ btrfs.mod
βββ bufio.mod
βββ cat.mod
βββ cbfs.mod
βββ cbls.mod
βββ cbmemc.mod
βββ cbtable.mod
βββ cbtime.mod
βββ chain.mod
βββ cmdline_cat_test.mod
βββ cmp.mod
βββ cmp_test.mod
βββ command.lst
βββ configfile.mod
βββ core.efi
βββ cpio_be.mod
βββ cpio.mod
βββ cpuid.mod
βββ crc64.mod
βββ cryptodisk.mod
βββ crypto.lst
βββ crypto.mod
βββ cs5536.mod
βββ ctz_test.mod
βββ datehook.mod
βββ date.mod
βββ datetime.mod
βββ diskfilter.mod
βββ disk.mod
βββ div.mod
βββ div_test.mod
βββ dm_nv.mod
βββ echo.mod
βββ efifwsetup.mod
βββ efi_gop.mod
βββ efinet.mod
βββ efi_uga.mod
βββ ehci.mod
βββ elf.mod
βββ eval.mod
βββ exfat.mod
βββ exfctest.mod
βββ ext2.mod
βββ extcmd.mod
βββ f2fs.mod
βββ fat.mod
βββ file.mod
βββ fixvideo.mod
βββ font.mod
βββ fshelp.mod
βββ fs.lst
βββ functional_test.mod
βββ gcry_arcfour.mod
βββ gcry_blowfish.mod
βββ gcry_camellia.mod
βββ gcry_cast5.mod
βββ gcry_crc.mod
βββ gcry_des.mod
βββ gcry_dsa.mod
βββ gcry_idea.mod
βββ gcry_md4.mod
βββ gcry_md5.mod
βββ gcry_rfc2268.mod
βββ gcry_rijndael.mod
βββ gcry_rmd160.mod
βββ gcry_rsa.mod
βββ gcry_seed.mod
βββ gcry_serpent.mod
βββ gcry_sha1.mod
βββ gcry_sha256.mod
βββ gcry_sha512.mod
βββ gcry_tiger.mod
βββ gcry_twofish.mod
βββ gcry_whirlpool.mod
βββ geli.mod
βββ gettext.mod
βββ gfxmenu.mod
βββ gfxterm_background.mod
βββ gfxterm_menu.mod
βββ gfxterm.mod
βββ gptsync.mod
βββ grub.efi
βββ gzio.mod
βββ halt.mod
βββ hashsum.mod
βββ hdparm.mod
βββ hello.mod
βββ help.mod
βββ hexdump.mod
βββ hfs.mod
βββ hfspluscomp.mod
βββ hfsplus.mod
βββ http.mod
βββ iorw.mod
βββ iso9660.mod
βββ jfs.mod
βββ jpeg.mod
βββ json.mod
βββ keylayouts.mod
βββ keystatus.mod
βββ ldm.mod
βββ legacycfg.mod
βββ legacy_password_test.mod
βββ linux16.mod
βββ linux.mod
βββ loadbios.mod
βββ loadenv.mod
βββ loopback.mod
βββ lsacpi.mod
βββ lsefimmap.mod
βββ lsefi.mod
βββ lsefisystab.mod
βββ lsmmap.mod
βββ ls.mod
βββ lspci.mod
βββ lssal.mod
βββ luks2.mod
βββ luks.mod
βββ lvm.mod
βββ lzopio.mod
βββ macbless.mod
βββ macho.mod
βββ mdraid09_be.mod
βββ mdraid09.mod
βββ mdraid1x.mod
βββ memdisk.mod
βββ memrw.mod
βββ minicmd.mod
βββ minix2_be.mod
βββ minix2.mod
βββ minix3_be.mod
βββ minix3.mod
βββ minix_be.mod
βββ minix.mod
βββ mmap.mod
βββ moddep.lst
βββ modinfo.sh
βββ morse.mod
βββ mpi.mod
βββ msdospart.mod
βββ mul_test.mod
βββ multiboot2.mod
βββ multiboot.mod
βββ nativedisk.mod
βββ net.mod
βββ newc.mod
βββ nilfs2.mod
βββ normal.mod
βββ ntfscomp.mod
βββ ntfs.mod
βββ odc.mod
βββ offsetio.mod
βββ ohci.mod
βββ part_acorn.mod
βββ part_amiga.mod
βββ part_apple.mod
βββ part_bsd.mod
βββ part_dfly.mod
βββ part_dvh.mod
βββ part_gpt.mod
βββ partmap.lst
βββ part_msdos.mod
βββ part_plan.mod
βββ part_sun.mod
βββ part_sunpc.mod
βββ parttool.lst
βββ parttool.mod
βββ password.mod
βββ password_pbkdf2.mod
βββ pata.mod
βββ pbkdf2.mod
βββ pbkdf2_test.mod
βββ pcidump.mod
βββ pgp.mod
βββ play.mod
βββ png.mod
βββ priority_queue.mod
βββ probe.mod
βββ procfs.mod
βββ progress.mod
βββ raid5rec.mod
βββ raid6rec.mod
βββ random.mod
βββ rdmsr.mod
βββ read.mod
βββ reboot.mod
βββ regexp.mod
βββ reiserfs.mod
βββ relocator.mod
βββ romfs.mod
βββ scsi.mod
βββ search_fs_file.mod
βββ search_fs_uuid.mod
βββ search_label.mod
βββ search.mod
βββ serial.mod
βββ setjmp.mod
βββ setjmp_test.mod
βββ setpci.mod
βββ sfs.mod
βββ shift_test.mod
βββ signature_test.mod
βββ sleep.mod
βββ sleep_test.mod
βββ smbios.mod
βββ spkmodem.mod
βββ squash4.mod
βββ strtoull_test.mod
βββ syslinuxcfg.mod
βββ tar.mod
βββ terminal.lst
βββ terminal.mod
βββ terminfo.mod
βββ test_blockarg.mod
βββ testload.mod
βββ test.mod
βββ testspeed.mod
βββ tftp.mod
βββ tga.mod
βββ time.mod
βββ tpm.mod
βββ trig.mod
βββ tr.mod
βββ true.mod
βββ udf.mod
βββ ufs1_be.mod
βββ ufs1.mod
βββ ufs2.mod
βββ uhci.mod
βββ usb_keyboard.mod
βββ usb.mod
βββ usbms.mod
βββ usbserial_common.mod
βββ usbserial_ftdi.mod
βββ usbserial_pl2303.mod
βββ usbserial_usbdebug.mod
βββ usbtest.mod
βββ video_bochs.mod
βββ video_cirrus.mod
βββ video_colors.mod
βββ video_fb.mod
βββ videoinfo.mod
βββ video.lst
βββ video.mod
βββ videotest_checksum.mod
βββ videotest.mod
βββ wrmsr.mod
βββ xfs.mod
βββ xnu.mod
βββ xnu_uuid.mod
βββ xnu_uuid_test.mod
βββ xzio.mod
βββ zfscrypt.mod
βββ zfsinfo.mod
βββ zfs.mod
βββ zstd.mod
10 directories, 351 files
(chroot) h2Jammy /usr/src #
# GRUB Environment Block
# WARNING: Do not edit this file by tools other than grub-editenv!!!
##################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
(chroot) h2Jammy /usr/src/linux-6.1.57-gentoo # make install INSTALL_PATH=/boot
INSTALL /boot
dracut: Executing: /usr/bin/dracut -f --kernel-image arch/x86/boot/bzImage --no-uefi --kver 6.1.57-gentoo-x86_64 /tmp/kernel-install.staging.GsZUqMa/initrd
dracut: dracut module 'dash' will not be installed, because command 'dash' could not be found!
dracut: dracut module 'mksh' will not be installed, because command 'mksh' could not be found!
dracut: dracut module 'systemd-integritysetup' will not be installed, because command '/lib/systemd/systemd-integritysetup' could not be found!
dracut: dracut module 'systemd-integritysetup' will not be installed, because command '/lib/systemd/system-generators/systemd-integritysetup-generator' could not be found!
dracut: dracut module 'systemd-pcrphase' will not be installed, because command '/lib/systemd/systemd-pcrphase' could not be found!
dracut: dracut module 'systemd-veritysetup' will not be installed, because command '/lib/systemd/systemd-veritysetup' could not be found!
dracut: dracut module 'systemd-veritysetup' will not be installed, because command '/lib/systemd/system-generators/systemd-veritysetup-generator' could not be found!
dracut: dracut module 'modsign' will not be installed, because command 'keyctl' could not be found!
dracut: dracut module 'busybox' will not be installed, because command 'busybox' could not be found!
dracut: dracut module 'dbus-broker' will not be installed, because command 'dbus-broker' could not be found!
dracut: dracut module 'rngd' will not be installed, because command 'rngd' could not be found!
dracut: dracut module 'connman' will not be installed, because command 'connmand' could not be found!
dracut: dracut module 'connman' will not be installed, because command 'connmanctl' could not be found!
dracut: dracut module 'connman' will not be installed, because command 'connmand-wait-online' could not be found!
dracut: dracut module 'network-legacy' will not be installed, because command 'dhclient' could not be found!
dracut: dracut module 'network-wicked' will not be installed, because command 'wicked' could not be found!
dracut: 62bluetooth: Could not find any command of '/usr/lib/bluetooth/bluetoothd /usr/libexec/bluetooth/bluetoothd'!
dracut: dracut module 'lvmmerge' will not be installed, because command 'lvm' could not be found!
dracut: dracut module 'lvmthinpool-monitor' will not be installed, because command 'lvm' could not be found!
dracut: dracut module 'btrfs' will not be installed, because command 'btrfs' could not be found!
dracut: 90crypt: Could not find any command of '/lib/systemd/systemd-cryptsetup cryptsetup'!
dracut: dracut module 'dm' will not be installed, because command 'dmsetup' could not be found!
dracut: dracut module 'dmraid' will not be installed, because command 'dmraid' could not be found!
dracut: dracut module 'dmsquash-live-ntfs' will not be installed, because command 'ntfs-3g' could not be found!
dracut: dracut module 'lvm' will not be installed, because command 'lvm' could not be found!
dracut: dracut module 'mdraid' will not be installed, because command 'mdadm' could not be found!
dracut: dracut module 'multipath' will not be installed, because command 'multipath' could not be found!
dracut: dracut module 'pcsc' will not be installed, because command 'pcscd' could not be found!
dracut: dracut module 'tpm2-tss' will not be installed, because command 'tpm2' could not be found!
dracut: dracut module 'cifs' will not be installed, because command 'mount.cifs' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'dcbtool' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'fipvlan' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'lldpad' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'fcoemon' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'fcoeadm' could not be found!
dracut: dracut module 'fcoe-uefi' will not be installed, because command 'dcbtool' could not be found!
dracut: dracut module 'fcoe-uefi' will not be installed, because command 'fipvlan' could not be found!
dracut: dracut module 'fcoe-uefi' will not be installed, because command 'lldpad' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsi-iname' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsiadm' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsid' could not be found!
dracut: dracut module 'nbd' will not be installed, because command 'nbd-client' could not be found!
dracut: 95nfs: Could not find any command of 'rpcbind portmap'!
dracut: dracut module 'nvmf' will not be installed, because command 'nvme' could not be found!
dracut: dracut module 'biosdevname' will not be installed, because command 'biosdevname' could not be found!
dracut: dracut module 'memstrack' will not be installed, because command 'memstrack' could not be found!
dracut: memstrack is not available
dracut: If you need to use rd.memdebug>=4, please install memstrack and procps-ng
dracut: dracut module 'squash' will not be installed, because command 'mksquashfs' could not be found!
dracut: dracut module 'squash' will not be installed, because command 'unsquashfs' could not be found!
dracut: *** Including module: systemd ***
dracut: *** Including module: systemd-initrd ***
dracut: *** Including module: i18n ***
dracut: *** Including module: kernel-modules ***
dracut: *** Including module: kernel-modules-extra ***
dracut: *** Including module: nvdimm ***
dracut: *** Including module: qemu ***
dracut: *** Including module: qemu-net ***
dracut: *** Including module: lunmask ***
dracut: *** Including module: resume ***
dracut: *** Including module: rootfs-block ***
dracut: *** Including module: terminfo ***
dracut: *** Including module: udev-rules ***
dracut: Skipping udev rule: 40-redhat.rules
dracut: Skipping udev rule: 50-firmware.rules
dracut: Skipping udev rule: 50-udev.rules
dracut: Skipping udev rule: 91-permissions.rules
dracut: Skipping udev rule: 80-drivers-modprobe.rules
dracut: *** Including module: virtiofs ***
dracut: *** Including module: dracut-systemd ***
dracut: *** Including module: usrmount ***
dracut: *** Including module: base ***
dracut: *** Including module: fs-lib ***
dracut: *** Including module: shutdown ***
dracut: *** Including modules done ***
dracut: *** Installing kernel module dependencies ***
dracut: *** Installing kernel module dependencies done ***
dracut: *** Resolving executable dependencies ***
dracut: *** Resolving executable dependencies done ***
dracut: *** Hardlinking files ***
dracut: Mode: real
dracut: Method: sha256
dracut: Files: 1637
dracut: Linked: 4 files
dracut: Compared: 0 xattrs
dracut: Compared: 446 files
dracut: Saved: 6.9 KiB
dracut: Duration: 0.046010 seconds
dracut: *** Hardlinking files done ***
dracut: *** Generating early-microcode cpio image ***
dracut: *** Constructing AuthenticAMD.bin ***
dracut: *** Constructing GenuineIntel.bin ***
dracut: *** Store current command line parameters ***
dracut: *** Stripping files ***
dracut: *** Stripping files done ***
dracut: *** Creating image file '/tmp/kernel-install.staging.GsZUqMa/initrd' ***
dracut: Using auto-determined compression method 'gzip'
dracut: *** Creating initramfs image file '/tmp/kernel-install.staging.GsZUqMa/initrd' done ***
Return to Top