You are not logged in.

#1 2024-07-02 09:16:12

mrconfused
Member
Registered: 2023-06-17
Posts: 38

How to correctly edit fstab for mounting efi boot partition?

As the last step of fixing a problem involving the wrong kernel being loaded, I have to add my arch installations efi boot partition to fstab so at startup it mounts on /boot.

My arch is a removable install partitioned as:
-sda1 swap
-sda2 root
-sda3 efi boot partition

sda1 and 2 are already in fstab using their UUIDs

What is the correct way to add sda3?

I can get the UUID and filesystem type from: lsblk -f

But how do I know which options to use, if any? Is there another tool I should be using? (genfstab?)

As I mentioned at the beginning, I have already messed up by not doing things correctly, so I would like to make sure I get this right.

Appreciate any advice.

Thanks.

Offline

#2 2024-07-02 10:38:45

cryptearth
Member
Registered: 2024-02-03
Posts: 2,184

Re: How to correctly edit fstab for mounting efi boot partition?

last time I went the easy way:
boot archiso
mount
genfstab

you can also install arch-setup-scripts and run genfstab on the live system - but it has the habit of finding additional mountpoints - so I run it without piping the output into any file but just copy the line for boot by hand

Offline

#3 2024-07-02 10:53:14

d.ALT
Member
Registered: 2019-05-10
Posts: 959

Re: How to correctly edit fstab for mounting efi boot partition?

In my configuration I have the $ESP being also the $BOOTPARTITION and it is mounted at /boot: /dev/nvme0n1p5 = $ESP = $BOOTPARTITION

As example, here's some infos to you

$ mount | grep \/boot
/dev/nvme0n1p5 on /boot type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro)
$ grep -A1 EFI /etc/fstab 
# /dev/nvme0n1p5 LABEL=EFI
UUID=1EAC-44E4	/boot	vfat	rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0	2
$ sudo blkid | grep 1EAC-44E4
/dev/nvme0n1p5: LABEL_FATBOOT="EFI" LABEL="EFI" UUID="1EAC-44E4" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI" PARTUUID="69d9ed12-8560-4ac9-afb2-6d818e868db8"

<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#4 2024-07-03 05:26:54

mrconfused
Member
Registered: 2023-06-17
Posts: 38

Re: How to correctly edit fstab for mounting efi boot partition?

I went with genfstab -U and copied the relevant output to fstab

Thanks for help!

Offline

Board footer

Powered by FluxBB