You are not logged in.

#1 2014-11-16 03:59:23

Konkorde
Member
Registered: 2014-03-17
Posts: 23

[SOLVED] filesystem package: list by label in /etc/crypttab

Reading about Persistent Device Naming, using labels in /etc/fstab rather than UUIDs has some advantages.  But /etc/crypttab seems to support only /dev/sdXY and UUID notation.  Since flesystem is listed as an Arch Linux package, is there any chance of adding support for naming devices with labels in /etc/crypttab?

Last edited by Konkorde (2014-12-15 01:28:42)

Offline

#2 2014-11-16 05:10:08

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] filesystem package: list by label in /etc/crypttab

Can you elaborate on the advantage of labels over UUIDs in /etc/crypttab?

In any event, there is no point asking here, you would need to file a feature request, probably upstream.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2014-11-16 15:20:49

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

Re: [SOLVED] filesystem package: list by label in /etc/crypttab

You cannot identify an encrypted filesystem by LABEL, because the label itself is a property of the unencrypted filesystem. You're asking to solve a chicken/egg problem.

You can identify an encrypted filesystem by its PARTLABEL (or PARTUUID), assuming you've partitioned your disks with GPT. I added support, implicitly, for this to /etc/crypttab 2 years ago.

Last edited by falconindy (2014-11-16 15:25:29)

Offline

#4 2014-11-16 16:18:06

Konkorde
Member
Registered: 2014-03-17
Posts: 23

Re: [SOLVED] filesystem package: list by label in /etc/crypttab

jasonwryan wrote:

Can you elaborate on the advantage of labels over UUIDs in /etc/crypttab?

From the Wiki:

"The disadvantage is that UUIDs make long code lines hard to read and break formatting in many configuration files (e.g. fstab or crypttab). Also every time a partition is resized or reformatted a new UUID is generated and configs have to get adjusted (manually).

I'm mostly thinking of restore scenarios: I want to be able to boot from the partition labeled BOOT and root should be the partition labeled ROOT.  If I make these UUIDs, then mkinitcpio and /etc/fstab will not work properly when I swap in a backup disk.

jasonwryan wrote:

In any event, there is no point asking here, you would need to file a feature request, probably upstream.

The "filesystem" package is maintained by the Arch core team.

Offline

#5 2014-11-16 16:24:37

Konkorde
Member
Registered: 2014-03-17
Posts: 23

Re: [SOLVED] filesystem package: list by label in /etc/crypttab

falconindy wrote:

You cannot identify an encrypted filesystem by LABEL, because the label itself is a property of the unencrypted filesystem. You're asking to solve a chicken/egg problem.

I apologize for misspeaking: I want to identify a partition containing an encrypted filesystem by label in /etc/crypttab.  While /dev/disk/sdXY works, /dev/disk/by-label/foo did not work.

falconindy wrote:

You can identify an encrypted filesystem by its PARTLABEL (or PARTUUID), assuming you've partitioned your disks with GPT. I added support, implicitly, for this to /etc/crypttab 2 years ago.

Thanks Dave: I am using GPT and although I'm new to PARTLABEL, I'll look into it.  Looking at the code you linked, though, I think I probably just want to use the

if (startswith(p, "LABEL="))

branch, rather than

/dev/disk/by-label

.

Last edited by Konkorde (2014-11-16 16:26:39)

Offline

#6 2014-11-16 16:32:39

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

Re: [SOLVED] filesystem package: list by label in /etc/crypttab

Konkorde wrote:

I apologize for misspeaking: I want to identify a partition containing an encrypted filesystem by label in /etc/crypttab.  While /dev/disk/sdXY works, /dev/disk/by-label/foo did not work.

It doesn't matter how you phrase it. What you're asking for simply isn't possible with LABEL. PARTLABEL is your solution.

Last edited by falconindy (2014-11-16 17:33:38)

Offline

#7 2014-11-16 20:31:33

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [SOLVED] filesystem package: list by label in /etc/crypttab

Konkorde wrote:
jasonwryan wrote:

In any event, there is no point asking here, you would need to file a feature request, probably upstream.

The "filesystem" package is maintained by the Arch core team.

For most files in that package, that just means they provide some default settings that are read by programs developed elsewhere (for example, systemd code that falconindy pointed out).

Offline

Board footer

Powered by FluxBB