FS#60360 - [arch-install-scripts] genfstab: add support for PARTUUIDs

Attached to Project: Arch Linux
Opened by grmat (grmat) - Tuesday, 09 October 2018, 13:58 GMT
Last edited by Eli Schwartz (eschwartz) - Tuesday, 16 October 2018, 03:12 GMT
Task Type Feature Request
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

This patch adds support for PARTUUIDs to the genfstab script. As opposed to UUIDs, PARTUUIDs are persistent across file system reformatting. Some users prefer PARTUUIDs and have to modify the fstab manually after running genfstab.

I did not change the comments of the previous identifier variants. Therefore, the PARTUUID is not added as a comment anywhere currently. However, the value is prepared, so it could be used if desired.
I'm also not sure if the 'u' option does make sense. Of course, I've added the corresponding usage text as well.
This task depends upon

Closed by  Eli Schwartz (eschwartz)
Tuesday, 16 October 2018, 03:12 GMT
Reason for closing:  Implemented
Additional comments about closing:  documentation updated to reflect the possibility of passing this in via -t
Comment by Dave Reisner (falconindy) - Tuesday, 09 October 2018, 14:07 GMT
What's wrong with "-t PARTUUID" ?
Comment by Dave Reisner (falconindy) - Tuesday, 09 October 2018, 14:11 GMT
To be clear, I don't want to add more flags without good reason.

Perhaps genfstab can be smarter about detecting GPT disks and use PARTUUID/PARTLABEL by default. We'd likely want to try to fallback to LABEL (and then just the raw device node as we do now) in the case when a PARTLABEL isn't assigned.
Comment by grmat (grmat) - Tuesday, 09 October 2018, 14:13 GMT
Nothing wrong about it, I guess. But I wouldn't know it was possible without looking at the actual script. UUID has the shortcut as well.

I get your point, though. Maybe a documentation update would be sufficient. Elaborate what a TAG can be or at least add more info to the Wiki?
Comment by Dave Reisner (falconindy) - Tuesday, 09 October 2018, 14:21 GMT
> But I wouldn't know it was possible without looking at the actual script.
I don't follow. It's in the tool's help output. If you understand PARTUUID and PARTLABEL, then I think it's sufficient that the help also calls out -U and -L being shortcuts for "-t UUID/LABEL". Feel free to update the wiki if you think this needs clarification -- I don't maintain that page.
Comment by grmat (grmat) - Tuesday, 09 October 2018, 15:00 GMT
I'll update the wiki.

> It's in the tool's help output

The help output only tells the user that it is possible to use a TAG without specifying what a tag can be. Why can't --help either list all potential tags or provide shortcuts for them? Listing only a portion with shortcuts doesn't seem consistent to me.
Comment by Dave Reisner (falconindy) - Monday, 15 October 2018, 17:03 GMT
Sure, but options to -t are arbitrary values. In 2018, the common values are UUID, LABEL, and their PART-prefixed counterparts. That could easily change in the future (or perhaps it already has).

But ok, documented the common values for 2018 in https://git.archlinux.org/arch-install-scripts.git/commit/?id=c07baac985f57b8f4ced94691dab4ecd9eb3b174
Comment by grmat (grmat) - Monday, 15 October 2018, 19:52 GMT
Thanks!

> options to -t are arbitrary values

That's right, but not everything that can be accepted makes sense in this context though. e.g. `-t SCHED` would get accepted by genfstab but still make no sense as a identifier for a fstab. I have no idea why somebody would try that (especially now since the useful values are documented) but having genfstab output a fstab without a warning I'd expect it to work. Nevermind, I think my original concern is resolved, so you could close this.

Loading...