You are not logged in.

#1 2020-06-14 15:37:41

DuckerMan
Member
Registered: 2018-09-21
Posts: 35

[Solved] My fstab seems weird

Hi there! Usual fstab shoud look like this:

# <device>                                <dir> <type> <options> <dump> <fsck>
UUID=0a3407de-014b-458b-b5c1-848e92a327a3 /     ext4   noatime   0      1
UUID=f9fe0b69-a280-415d-a03a-a32752370dee none  swap   defaults  0      0
UUID=b411dc99-f0a0-4c87-9e05-184977be8539 /home ext4   noatime   0      2

But my looks:

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

# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sda5 UUID=3cb99f83-871e-48cb-a604-26fc4551e058
/dev/sda5               /               ext4            rw,relatime,noatime     0 1

# /dev/sda6 UUID=b0679b9a-37f1-481c-a778-bd9963434618
/dev/sda6               /home           ext4            rw,relatime,noatime     0 2

# /dev/sda7 UUID=2a9d8a43-0654-4d1a-9c86-ea686e96db70
/dev/sda7               none            swap            defaults        0 0

There's "#". What does it stand for?

Last edited by DuckerMan (2020-06-14 16:58:21)

Offline

#2 2020-06-14 15:40:12

loqs
Member
Registered: 2014-03-06
Posts: 19,062

Re: [Solved] My fstab seems weird

man 5 fstab wrote:

       Each filesystem is described on a separate line.  Fields on  each  line
       are separated by tabs or spaces.  Lines starting with '#' are comments.
       Blank lines are ignored.

Edit:
Using both relatime and noatime makes no sense as they are mutually exclusive.
You can check which one is actually applied from the output of `mount`

Last edited by loqs (2020-06-14 15:45:02)

Offline

#3 2020-06-14 15:49:28

DuckerMan
Member
Registered: 2018-09-21
Posts: 35

Re: [Solved] My fstab seems weird

loqs wrote:
man 5 fstab wrote:

       Each filesystem is described on a separate line.  Fields on  each  line
       are separated by tabs or spaces.  Lines starting with '#' are comments.
       Blank lines are ignored.

Edit:
Using both relatime and noatime makes no sense as they are mutually exclusive.
You can check which one is actually applied from the output of `mount`

So, why is there no UUID (only in comments) ?

Offline

#4 2020-06-14 15:54:30

loqs
Member
Registered: 2014-03-06
Posts: 19,062

Re: [Solved] My fstab seems weird

The fstab was generated by genfstab without -U?

Offline

#5 2020-06-14 16:05:27

DuckerMan
Member
Registered: 2018-09-21
Posts: 35

Re: [Solved] My fstab seems weird

loqs wrote:

The fstab was generated by genfstab without -U?

Yes, it was.

Offline

#6 2020-06-14 16:15:30

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,701

Re: [Solved] My fstab seems weird

Yes, it was generated without the -U ?   In that case, you did not tell it to use UUIDs.

Try it both ways  ( genfstab /  and genfstab -U / ) -- you can do it now --  just don't redirect the output.  It will just display what the table would look like. 
Then, if you like, you can redirect the output to update your table.   But, you have to do it as root.   I suggest:
sudo bash -c "genfstab -U / > /etc/fstab"

Last edited by ewaller (2020-06-14 16:15:49)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#7 2020-06-14 16:16:55

DuckerMan
Member
Registered: 2018-09-21
Posts: 35

Re: [Solved] My fstab seems weird

i'll try, thanks!

Offline

#8 2020-06-14 16:35:55

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,518
Website

Re: [Solved] My fstab seems weird

Or just `genfstab -U / | sudo tee /etc/fstab`.

Although that requres arch-install-scripts to be installed.  It seems easier to me to just edit the file in place as all the information is already there.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#9 2020-06-14 16:58:07

DuckerMan
Member
Registered: 2018-09-21
Posts: 35

Re: [Solved] My fstab seems weird

It's solved! Thanks guys

Offline

#10 2020-06-14 17:05:51

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,701

Re: [Solved] My fstab seems weird

I always forget about tee.    Note to self:  Add that to my mental toolbox


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB