[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1033630: debian-installer: should fstab swap entries use "sw" as option?



On Wed, 29 Mar 2023 at 02:49, Christoph Anton Mitterer
<calestyo@scientia.org> wrote:
> On Wed, 2023-03-29 at 02:25 +0000, David wrote:

> > My thought process is as follows:
> > Field 4 is for mount options. This is just the same as providing
> > options to the 'mount' command issued at the command line.
> > And it is ok to use the 'mount' command without options.
>
> Well that's clear and it probably just works like that in the end.
>
> But still, if the manpage is considered the "formal specification" of
> the fstab format, than 4th field seems to be needed.
> That even says: "contains at least the type of mount (ro or rw)", which
> would be fulfilled by default (as that implies rw).
>
> That's what I've meant by strictly speaking before... parsers of fstab
> could in principle rely on that.

I think the formal specification of the fstab format would be
'man 3 getfsent' because that is the canonical method to
parse /etc/fstab.

I agree that reading the manpage like a lawyer probably
isn't helpful.

Perhaps 'sw' in field 4 became obsolete. What does it achieve?

It does seem redundant to have to specify both 'swap' and 'sw'
for every swap partition. And if we have to specify 'sw' in field 4,
how is it an "option"?

Perhaps it is a historic artifact that does nothing. Perhaps it
predates 'swap' being recognised in field 3, and then documentation
of 'sw' wasn't removed when 'swap' was introduced.
I don't know the history.

If codesearch doesn't show anything using FSTAB_SW then
perhaps it just does not matter.

Anyway, just to be clear, I'm not the person advocating change here.

I am simply sharing the fact that I have configured swap in /etc/fstab
with blank field 4,5 and 6, as I showed previously, for as long as I can
remember, without experiencing any problem. And I have explained
my reasoning about that, when requested.

I hope that helps :)


Reply to: