You are not logged in.

#1 2019-05-26 21:13:42

Luliic02
Member
Registered: 2019-05-26
Posts: 5

[Solved]Each partition on /etc/fstab file is listed twice.

Hello all, after starting again and again I finally managed to get Arch Linux with KDE working. However, the boot was way too long (userspace took +3 minutes long). After looking the fstab file, I noticed that 1) Each partition is listed twice. 2) The /dev/sda2's UUIDs are different (should've checked during installation as advised by the wiki, my bad).

After commenting out the one which is wrong, the boot time went down to ~10 seconds. My questions are: Is it normal that each partition is listed twice? Should I comment out the double'd partiotions? Is it better to leave the partition with the wrong UUID commented out or to change it?

Thanks in advance.

# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sda4
UUID=3bab9e8b-3b42-4d57-b702-199c5982ee6c       /               ext4            rw,relatime,stripe=256  0 1

# /dev/sda3
UUID=23A7-E694          /boot           vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro       0 2

# /dev/sda2
#UUID=8ea46b80-bbab-4aa1-ac6a-0edc4cec1549      none            swap            defaults        0 0

# /dev/sda4
UUID=3bab9e8b-3b42-4d57-b702-199c5982ee6c       /               ext4            rw,relatime,stripe=256  0 1

# /dev/sda3
UUID=23A7-E694          /boot           vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro       0 2

# /dev/sda2
UUID=ddd1e8ed-f13e-4bf2-9b44-e45b0097b457       none            swap            defaults        0 0

Last edited by Luliic02 (2019-05-27 08:34:21)

Offline

#2 2019-05-26 21:14:38

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [Solved]Each partition on /etc/fstab file is listed twice.

It means you most likely generated fstab twice.

Offline

#3 2019-05-26 21:31:36

Luliic02
Member
Registered: 2019-05-26
Posts: 5

Re: [Solved]Each partition on /etc/fstab file is listed twice.

@Scimmia should I comment them out/remove them?

Offline

#4 2019-05-27 00:36:24

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [Solved]Each partition on /etc/fstab file is listed twice.

Yes

Offline

#5 2019-05-27 08:34:03

Luliic02
Member
Registered: 2019-05-26
Posts: 5

Re: [Solved]Each partition on /etc/fstab file is listed twice.

Alright, thank you!

Offline

#6 2019-05-27 09:26:11

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [Solved]Each partition on /etc/fstab file is listed twice.

Fun fact: you don't need an fstab at all for that configuration.

And without an fstab file systemd will keep the ESP unmounted except for when it is needed.


Jin, Jîyan, Azadî

Offline

#7 2019-05-27 09:33:54

Luliic02
Member
Registered: 2019-05-26
Posts: 5

Re: [Solved]Each partition on /etc/fstab file is listed twice.

@Head_on_a_Stick Why isn't it needed? What do you recommend me to do? When is it necessary? Also, I have installed Arch Linux on an external SSD, does that change anything? If you could point what to look for it would be awesome. Thanks in advance.

Offline

#8 2019-05-27 09:45:52

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [Solved]Each partition on /etc/fstab file is listed twice.

Luliic02 wrote:

Why isn't it needed?

Because systemd can mount both the ESP & swap partitions automagically with GPT drives.

See systemd-gpt-auto-generator(8) for more on this.

Luliic02 wrote:

What do you recommend me to do?

# mv /etc/fstab{,.bak}
# reboot

More of a suggestion than a recommendation though smile

Luliic02 wrote:

I have installed Arch Linux on an external SSD, does that change anything?

The only thing that would make a difference is your applied stripe=256 mount option for /dev/sda4, are you using that for any specific reason?


Jin, Jîyan, Azadî

Offline

#9 2019-05-27 11:41:21

Luliic02
Member
Registered: 2019-05-26
Posts: 5

Re: [Solved]Each partition on /etc/fstab file is listed twice.

Head_on_a_Stick wrote:

The only thing that would make a difference is your applied stripe=256 mount option for /dev/sda4, are you using that for any specific reason?

It was generated automatically by:

# genfstab -U /mnt >> /mnt/etc/fstab

It did not seem to be harmful, so I didn't remove/change it. Should I do it?

Offline

#10 2019-05-27 11:55:55

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [Solved]Each partition on /etc/fstab file is listed twice.

Luliic02 wrote:

Should I do it?

It's up to you but I can claim no specific advantage for running fstab-less.

Check the mount options after rebooting with

grep sda /proc/self/mounts

If anything goes wrong then you can always just restore /etc/fstab.bak to it's original location.


Jin, Jîyan, Azadî

Offline

#11 2019-05-27 14:23:27

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [Solved]Each partition on /etc/fstab file is listed twice.

And yet we have a whole lot of people who update the kernel and the ESP never gets mounted. Don't do that.

Offline

#12 2019-05-27 14:29:35

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [Solved]Each partition on /etc/fstab file is listed twice.

Scimmia wrote:

And yet we have a whole lot of people who update the kernel and the ESP never gets mounted

I have always found that systemd mounts the ESP automatically during kernel upgrades.


Jin, Jîyan, Azadî

Offline

Board footer

Powered by FluxBB