Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Failed to automount /boot and /boot/efi partitions
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Fulgurance
Guru
Guru


Joined: 15 Feb 2017
Posts: 588

PostPosted: Wed Nov 14, 2018 3:33 pm    Post subject: Failed to automount /boot and /boot/efi partitions Reply with quote

Hello, i tell you because i have little problem. When my system start, he failed to mount /boot and /boot/efi partition.
I have configured this partitions in /etc/fstab file, but i have no success...

Code:
# <fs>                  <mountpoint>                    <type>          <opts>                  <dump/pass>

efivarfs                /sys/firmware/efi/efivars       efivarfs        rw,relatime,discard     0       0
/dev/nvme0n1p1          /boot/efi                       vfat            defaults,discard        0       3
/dev/nvme0n1p2          /boot                           ext4            defaults,disdard        0       2
/dev/System/swap        none                            swap            sw,discard              0       0
/dev/System/root        /                               ext4            defaults,discard        0       1
tmpfs                   /tmp                            tmpfs           defaults,size=10G       0       0
tmpfs                   /var/tmp                        tmpfs           defaults,size=10G       0       0


My disk usage:
Code:
fulgurance@msi-gs73vr-6rf ~ $ lsblk
NAME              MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
nvme0n1           259:0    0 465,8G  0 disk 
├─nvme0n1p1       259:1    0   500M  0 part 
├─nvme0n1p2       259:2    0   500M  0 part 
└─nvme0n1p3       259:3    0 464,8G  0 part 
  └─nvme0n1p3     253:0    0 464,8G  0 crypt
    ├─System-swap 253:1    0    20G  0 lvm   [SWAP]
    └─System-root 253:2    0 444,8G  0 lvm   /
Back to top
View user's profile Send private message
ali3nx
l33t
l33t


Joined: 21 Sep 2003
Posts: 612
Location: Winnipeg, Canada

PostPosted: Wed Nov 14, 2018 4:01 pm    Post subject: Re: Failed to automount /boot and /boot/efi partitions Reply with quote

Fulgurance wrote:
Hello, i tell you because i have little problem. When my system start, he failed to mount /boot and /boot/efi partition.
I have configured this partitions in /etc/fstab file, but i have no success...

Code:
# <fs>                  <mountpoint>                    <type>          <opts>                  <dump/pass>

efivarfs                /sys/firmware/efi/efivars       efivarfs        rw,relatime,discard     0       0
/dev/nvme0n1p1          /boot/efi                       vfat            defaults,discard        0       3
/dev/nvme0n1p2          /boot                           ext4            defaults,disdard        0       2
/dev/System/swap        none                            swap            sw,discard              0       0
/dev/System/root        /                               ext4            defaults,discard        0       1
tmpfs                   /tmp                            tmpfs           defaults,size=10G       0       0
tmpfs                   /var/tmp                        tmpfs           defaults,size=10G       0       0


My disk usage:
Code:
fulgurance@msi-gs73vr-6rf ~ $ lsblk
NAME              MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
nvme0n1           259:0    0 465,8G  0 disk 
├─nvme0n1p1       259:1    0   500M  0 part 
├─nvme0n1p2       259:2    0   500M  0 part 
└─nvme0n1p3       259:3    0 464,8G  0 part 
  └─nvme0n1p3     253:0    0 464,8G  0 crypt
    ├─System-swap 253:1    0    20G  0 lvm   [SWAP]
    └─System-root 253:2    0 444,8G  0 lvm   /


Code:
efivarfs                /sys/firmware/efi/efivars       efivarfs        rw,relatime,discard     0       0


efivars should not be added to fstab

vfat filesystem type only supports trim with linux 4.19 or newer. https://wiki.archlinux.org/index.php/Solid_state_drive#TRIM

If you want a filesystem such as ext4 or vfat other than rootfs auto mounted at boot if i recall correctly specifing automount in fstab mount options may be required for some circumstances.

Here's an example of my fstab using disk UUID's

Code:
UUID=9E02-759B                                          /boot/EFI       vfat            noauto,defaults 1 2
UUID=55692f9a-1321-4ca8-b4df-701b13ebc02a               /               ext4            defaults        0 1
UUID=00a7cd77-63d5-4c42-9c5f-7fd9a7718d64               none            swap            sw              0 0
UUID=75a471c3-75f2-41c8-bd49-5384f49bf1d8               /home           ext4            defaults        0 1
UUID=2f9464ae-e0c1-4491-a0e0-e2bd9566c49c               /mnt/nvme       ext4            defaults        0 1
UUID=374abbee-3560-4bae-a373-6af0e5f44da0               /mnt/dbraid     ext4            defaults        0 1
/dev/cdrom                                              /mnt/cdrom      auto            noauto,ro       0 0

# temporal mountpoints on TMPFS

# use /tmp on tmpfs for openrc as openrc does not mount /tmp to tmpfs by default
#tmpfs           /tmp            tmpfs           size=4G,noatime        0 0

# tmpfs for portage compiling to prevent accelerated ssd wear
tmpfs /var/tmp/portage tmpfs rw,nosuid,noatime,nodev,size=12G,mode=775,uid=portage,gid=portage,x-mount.mkdir=775 0 0


On my uefi boot installs i always omit creating four disk partitions if only using uefi boot is desired. The gentoo handbook disk partitioning examples can be confusing for anyone that only wants to use uefi boot.

This uefi boot disk partitioning guide i wrote recently may also provide some beneficial perspective

https://forums.gentoo.org/viewtopic-t-1088630.html

It is also entirely unnecessary to have /boot and esa efi partitions automatically mounted
_________________
Compiling Gentoo since version 1.4
Thousands of Gentoo Installs Completed
Emerged on every continent but Antarctica
Compile long and Prosper!


Last edited by ali3nx on Wed Nov 14, 2018 5:44 pm; edited 1 time in total
Back to top
View user's profile Send private message
Fulgurance
Guru
Guru


Joined: 15 Feb 2017
Posts: 588

PostPosted: Wed Nov 14, 2018 5:25 pm    Post subject: Reply with quote

Yes, but when i update my kernel and grub, i need to mount this partition, and it's more simple if this partitions already mounted.

I have following your advice, but the same problem with automount option, /boot and /boot/efi isn't mounted at start...

Look:

Code:
# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed); notail increases performance of ReiserFS (at the expense of storage
# efficiency).  It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#

# <fs>         <mountpoint>         <type>      <opts>            <dump/pass>

/dev/nvme0n1p1      /boot/efi         vfat      defaults,discard,automount   0   3
/dev/nvme0n1p2      /boot            ext4      defaults,discard,automount   0   2
/dev/System/swap   none            swap      sw,discard         0   0
/dev/System/root   /            ext4      defaults,discard      0   1
tmpfs         /tmp            tmpfs      defaults,size=10G      0   0
tmpfs         /var/tmp         tmpfs      defaults,size=10G      0   0
Back to top
View user's profile Send private message
ali3nx
l33t
l33t


Joined: 21 Sep 2003
Posts: 612
Location: Winnipeg, Canada

PostPosted: Wed Nov 14, 2018 5:41 pm    Post subject: Reply with quote

Fulgurance wrote:
Yes, but when i update my kernel and grub, i need to mount this partition, and it's more simple if this partitions already mounted.

I have following your advice, but the same problem with automount option, /boot and /boot/efi isn't mounted at start...

Look:

Code:
# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed); notail increases performance of ReiserFS (at the expense of storage
# efficiency).  It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#

# <fs>         <mountpoint>         <type>      <opts>            <dump/pass>

/dev/nvme0n1p1      /boot/efi         vfat      defaults,discard,automount   0   3
/dev/nvme0n1p2      /boot            ext4      defaults,discard,automount   0   2
/dev/System/swap   none            swap      sw,discard         0   0
/dev/System/root   /            ext4      defaults,discard      0   1
tmpfs         /tmp            tmpfs      defaults,size=10G      0   0
tmpfs         /var/tmp         tmpfs      defaults,size=10G      0   0


Something that you might try is removing the discard mount options from efi and vfat partitions and attempting to only use "defaults" mount options. Considering you have an nvme ssd using periodic fstrim instead of discard should be adequate and perhaps the discard mount option is the culprit.

The efi and vfat partitions considering their purpose and size should never need to be trimmed in your natural lifetime. If automount did not work remove that and just try defaults for the sole remaining mount option.


If the most basic fstab config doesn't work properly the suspect root cause of the problem may be elsewhere. often diagnostic testing the "keep it simple stupid" approach can yield fruitful direction.

There is perhaps a possibility that discard is also causing unseen problems.
_________________
Compiling Gentoo since version 1.4
Thousands of Gentoo Installs Completed
Emerged on every continent but Antarctica
Compile long and Prosper!
Back to top
View user's profile Send private message
Fulgurance
Guru
Guru


Joined: 15 Feb 2017
Posts: 588

PostPosted: Wed Nov 14, 2018 11:19 pm    Post subject: Reply with quote

Now, with just defaults option, /boot partition is automounted at boot. But /boot/efi, no ... strange...
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13836

PostPosted: Thu Nov 15, 2018 1:23 am    Post subject: Reply with quote

Is there a directory /boot/efi on your root filesystem? The lines are processed in order, so if you want /boot/efi to be mounted and visible, you need to list it after /boot, not before.
Back to top
View user's profile Send private message
Fulgurance
Guru
Guru


Joined: 15 Feb 2017
Posts: 588

PostPosted: Thu Nov 15, 2018 2:11 am    Post subject: Reply with quote

In pass collown, i have writed 3, it's the last mounted partition, no ?
Back to top
View user's profile Send private message
ali3nx
l33t
l33t


Joined: 21 Sep 2003
Posts: 612
Location: Winnipeg, Canada

PostPosted: Thu Nov 15, 2018 3:24 am    Post subject: Reply with quote

Fulgurance wrote:
Now, with just defaults option, /boot partition is automounted at boot. But /boot/efi, no ... strange...


While this is curious the esa boot partition never needs to be mounted unless updating the efi firmware boot binary is necessary. grub-install being able to function is the only purpose for the esa efi partition and file system being mounted outside of using efistub kernel when an efistub kernel is updated.

If your unable to figure it out not having the esa partition automounted also provides an added security precaution because fat32 filesystems provide no user segregation permissions. any non root user could potentially "have some fun" with an easily exposed esa partition's contents.

At least /boot is an ext4 filesystem and that issue is resolved.

Hu wrote:
Is there a directory /boot/efi on your root filesystem? The lines are processed in order, so if you want /boot/efi to be mounted and visible, you need to list it after /boot, not before.


This is certainly worth testing but personally i wouldn't leave a critically important fat32 file system exposed to anyone. just something to consider if testing it does fix the issue :)
_________________
Compiling Gentoo since version 1.4
Thousands of Gentoo Installs Completed
Emerged on every continent but Antarctica
Compile long and Prosper!
Back to top
View user's profile Send private message
Fulgurance
Guru
Guru


Joined: 15 Feb 2017
Posts: 588

PostPosted: Thu Nov 15, 2018 12:16 pm    Post subject: Reply with quote

ali3nx wrote:
Fulgurance wrote:
Now, with just defaults option, /boot partition is automounted at boot. But /boot/efi, no ... strange...


While this is curious the esa boot partition never needs to be mounted unless updating the efi firmware boot binary is necessary. grub-install being able to function is the only purpose for the esa efi partition and file system being mounted outside of using efistub kernel when an efistub kernel is updated.

If your unable to figure it out not having the esa partition automounted also provides an added security precaution because fat32 filesystems provide no user segregation permissions. any non root user could potentially "have some fun" with an easily exposed esa partition's contents.

At least /boot is an ext4 filesystem and that issue is resolved.

Hu wrote:
Is there a directory /boot/efi on your root filesystem? The lines are processed in order, so if you want /boot/efi to be mounted and visible, you need to list it after /boot, not before.


This is certainly worth testing but personally i wouldn't leave a critically important fat32 file system exposed to anyone. just something to consider if testing it does fix the issue :)


Oh yes... i'm stupid, it's true, no reason to update efi partition :)

It's solved mdr
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum