You are not logged in.

#1 2014-09-17 17:17:39

reflectionalist
Member
Registered: 2014-08-27
Posts: 15

LABEL does not work for vfat in fstab?

The Wiki page for fstab shows recognizing file system using labels in fstab.  The line for the EFI partition of file-system type vfat uses LABEL=EFI.  But it does not seem to work.  When I tried it, the system boots into emergency mode, with dependency failure for the EFI partition.  But UUID works.  So labels for vfat in fstab is not supported?

Last edited by reflectionalist (2014-09-17 17:18:07)

Offline

#2 2014-09-17 17:30:10

stevenhoneyman
Member
From: England
Registered: 2014-05-25
Posts: 241

Re: LABEL does not work for vfat in fstab?

Offline

#3 2014-09-17 18:46:00

reflectionalist
Member
Registered: 2014-08-27
Posts: 15

Re: LABEL does not work for vfat in fstab?

Thanks for the info.  I am indeed not aware of the second.  But I believe the LABEL line in question is for the first since for the second it is called PARTLABEL.

Offline

#4 2014-09-18 20:21:46

stevenhoneyman
Member
From: England
Registered: 2014-05-25
Posts: 241

Re: LABEL does not work for vfat in fstab?

PARTLABEL should fix your problem though. I'm not sure (still learning about EFI here too!) whether LABEL is supported on gpt/fstab.

Can you test:

# gdisk -l /dev/sdX
# fatlabel /dev/sdX1

(replace X as appropriate)

that will tell you the values for PARTLABEL, and LABEL; which might help narrow it down

Offline

#5 2014-09-19 12:36:22

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: LABEL does not work for vfat in fstab?

stevenhoneyman wrote:

I'm not sure (still learning about EFI here too!) whether LABEL is supported on gpt/fstab.

LABEL is a specific feature of the filesystem format and is independent the partition table. PARTLABEL is a specific feature of GPT and is independent of the filesystem format. Similar rules apply to UUID and PARTUUID. All of the above are supported in /etc/fstab by mount, findmnt, systemd, etc.

I generally use lsblk if I care about block device attributes, regardless of where they're actually stored:

$ lsblk -oNAME,FSTYPE,LABEL,UUID,PARTLABEL,PARTUUID
NAME   FSTYPE LABEL            UUID                                 PARTLABEL PARTUUID
sda                                                                           
├─sda1 ext3   CorsairF80-boot  ea1c4959-406c-45d0-a144-912f4e86b207 boot      09d74055-8e84-4fb6-b48e-42db29ddc0ee
└─sda2 ext4   CorsairF80-root  46c78135-8ac0-4928-8b26-5d23a77b1ff1 root      50422a11-88b9-4642-b4fe-32cc39088c2a
sdb                                                                           
├─sdb1 ext4   CaviarBlack-home 7d836725-e6db-4723-9ba6-86b2b532b031 home      def24684-347b-4931-9069-32329f8371a4
└─sdb2 ext4   Gluttony         824362df-753b-4711-9d30-b154e7855f3e gluttony  0192f032-819b-4bad-8fb3-078985e69d0d
sdc                                                                           
└─sdc1 btrfs  Haven            b8ad5c18-f445-495d-9095-c9ec4f9d2f37           0008b5fb-01

The important point here is not to confuse LABEL and PARTLABEL. They're entirely separate entities.

Last edited by falconindy (2014-09-19 12:37:33)

Offline

#6 2014-09-19 13:01:23

reflectionalist
Member
Registered: 2014-08-27
Posts: 15

Re: LABEL does not work for vfat in fstab?

stevenhoneyman wrote:

PARTLABEL should fix your problem though. I'm not sure (still learning about EFI here too!) whether LABEL is supported on gpt/fstab.

Can you test:

# gdisk -l /dev/sdX
# fatlabel /dev/sdX1

(replace X as appropriate)

that will tell you the values for PARTLABEL, and LABEL; which might help narrow it down

What `fatlabel` gave me was equal to the value of LABEL, namely EFI, not that of PARTLABEL.  I believe PARTLABEL for my EFI partition is not set since `ls /dev/disk/by-partlabel/` does not have an entry for that partition.  But I tried your suggestion anyway, the result was the same failure.

Offline

#7 2014-09-19 13:08:28

reflectionalist
Member
Registered: 2014-08-27
Posts: 15

Re: LABEL does not work for vfat in fstab?

Can someone try on his own system to see if using LABEL for the EFI partition in fstab also causes failure?  If it does, I should put a warning in the Wiki article.

Offline

#8 2014-09-19 13:12:40

stevenhoneyman
Member
From: England
Registered: 2014-05-25
Posts: 241

Re: LABEL does not work for vfat in fstab?

falconindy wrote:

I generally use lsblk

Oooh, nice! Customizable output, single command, I like it. Definitely can replace a few aliases I have set up.

@reflectionalist - could you copy/paste the output of lsblk (with the output format that Dave gives in his post above)? I still get the feeling there's a mixup somewhere, and that will show it (or prove my assumption wrong)
I can test out LABEL+fstab in about half an hour. Curiosity - what's wrong with UUID?

Offline

#9 2014-09-19 13:25:27

reflectionalist
Member
Registered: 2014-08-27
Posts: 15

Re: LABEL does not work for vfat in fstab?

stevenhoneyman wrote:

@reflectionalist - could you copy/paste the output of lsblk (with the output format that Dave gives in his post above)? I still get the feeling there's a mixup somewhere, and that will show it (or prove my assumption wrong)

Trust me.  Nothing is mixed up, really.  Replacing LABEL with UUID, everything works fine.

I can test out LABEL+fstab in about half an hour.

I just tested LABEL with fstab for another vfat partition.  The same failure.

Curiosity - what's wrong with UUID?

Not readable.

Offline

#10 2014-09-19 13:38:49

stevenhoneyman
Member
From: England
Registered: 2014-05-25
Posts: 241

Re: LABEL does not work for vfat in fstab?

NAME        FSTYPE      LABEL      UUID                                 PARTLABEL  PARTUUID        
sdc                                                                                
└─sdc1      vfat        EXAMPLE    94EC-5479                            BANANA     ff9b48e4-549d-4d2d-b856-920bd466a629
$ sudo mount LABEL=EXAMPLE /media/temp/
$ sudo umount /media/temp
$ sudo mount PARTLABEL=BANANA /media/temp/
$ sudo umount /media/temp

^ those commands all work perfectly for me; any other combination does not (obviously tongue)
I realised I can't provide useful tests with fstab as almost everything related to it is my own compiled version rather than the Arch binaries. My util-linux 'mount' happens to be the Arch version though.

Offline

#11 2014-09-19 14:21:34

reflectionalist
Member
Registered: 2014-08-27
Posts: 15

Re: LABEL does not work for vfat in fstab?

I just noticed that in GParted, when I set a label in lowercase for a vfat partition, it gets automatically turned to uppercase.  So the failure of my earlier test on another vfat partition was due to my neglect of this.  When switching to the label in uppercase, the test passed.  Then I reset the label of my EFI partition in lowercase 'esp' and let GParted turn it to uppercase 'ESP'.  Afterwards, it worked.  This is strange.  I remember I had set the label of my EFI partition in uppercase 'EFI' from the very beginning in GParted before I installed arch.  But I can not reproduce the problem on my test partition, setting the label in uppercase works the same as setting the label in lowercase.

Offline

Board footer

Powered by FluxBB