Thread View: muc.lists.netbsd.port.alpha
3 messages
3 total messages
Started by John Goerzen
Wed, 28 Oct 2026 01:44
Y2038 problem and FFSv1 on Alpha
Author: John Goerzen
Date: Wed, 28 Oct 2026 01:44
Date: Wed, 28 Oct 2026 01:44
25 lines
2637 bytes
2637 bytes
Hello everyone, While doing some testing on Alpha (I am the maintainer of C-Kermit and am taking advantage of this platform to do some testing with it), I noticed that my filesystem isn't preserving post-2038 dates on NetBSD 11.0/alpha. That was surprising to me. I noticed that "dumpfs -s /dev/rwd0a" shows the format is FFSv1, and I suspect that may be the reason. That leads to the question: Why did the installer create the root filesystem using FFSv1? Is this a general policy in 11.0, or is there an Alpha-specific reason for it? If the latter, would I have any harm by switching to FFSv2? Is that as simple as a tar/untar and installboot, or are there other tricks I need to know about? Thanks! - John -- Posted automagically by a mail2news gateway at muc.de e.V. Please direct questions, flames, donations, etc. to news-admin@muc.de
Re: Y2038 problem and FFSv1 on Alpha
Author: Robert Elz
Date: Wed, 28 Oct 2026 03:49
Date: Wed, 28 Oct 2026 03:49
90 lines
5636 bytes
5636 bytes
Date: Tue, 27 Oct 2026 20:44:41 -0500
From: John Goerzen <jgoerzen@complete.org>
Message-ID: <871p9aoaye.fsf@complete.org>
| I noticed that "dumpfs -s /dev/rwd0a" shows the format is FFSv1, and I
| suspect that may be the reason.
That would definitely be the reason, but might not necessarily remain
so beyond 2038 - there have been discussions with the FFS developer (now
in FreeBSD land) about minor changes that can be made to FFSv1 (compatible
changes) to allow dates to continue working beyond 2038.
Clearly, as it is using 32 bit timestamps, the range of years can't get
beyond about 136 years, but there's no reason that range needs to start
in 1902 (or whenever it is) and end in early 2038 - no genuine unix file
should have any dates before 1970, so the date range can easily be
shifted to be 1970 -> 2106 (or something), easily long enough for any
of us, and the same trick can be repeated later, just shifting things
forward again, should it be needed. Note that on modern kernels, FFSv1
timestamps are already being mapped into 64 bit time_t's for application
use - all that would be changing is the mapping function (in both directions).
Other fouler variations, perhaps even stealing some of the microseconds bits
- systems that need ffsv1 tend to not be all that fast, by modern standards,
and don't really need microsecond file time accuracy - alphas for example
just tick about once a millisecond, so anything pretending to be more accurate
than that is an illusion - that could yield another 8-10 bits that could be
merged into the seconds field, multiplying the range of years by between 256
and 1024. This is very unlikely to happen - just no real need for it - and
would be a "must do a complete filesystem update" (a one time one way change
using fsck probably) to make happen, as the relevant bits in every timestamp
would need to be cleared, after which the filesystem could no longer safely
be used on an old kernel).
| Why did the installer create the root filesystem using FFSv1?
This one I cannot speak to, I haven't had an alpha to use for decades,
and no longer remember any of the details.
| Is this a general policy in 11.0,
Policy, no, but the default for makefs(8) is UFS1 as that's generally
intended to be used for generating populated filesystems for uses where
FFSv1 might be required - perhaps it is being used there that way, without
any real reason, and could easily be switched to FFSv2 (it is just a makefs
option), but probably more likely that is not it.
| or is there an Alpha-specific reason for it?
There might be. A lot of systems from that vintage had firmware that
would directly boot from FFSv1 filesystems (along with disklabels).
Nb: no MBRs, those things didn't appear until 386bsd type systems
started appearing, much later. If that includes alpha, and that I
cannot answer, then the boot filesystem needs to be FFSv1, so:
| If the latter, would I have any harm by switching to FFSv2?
Yes, it wouldn't work at all. You would need at least a small boot
filesystem to contain either /boot or /netbsd which would need to be
FFSv1. Having loaded a modern kernel, the root could be on a FFSv2
however. That is, if alphas have that restriction - some systems
from that general timeframe certainly do, but alpha might not be one.
| Is that as simple as a tar/untar and installboot, or are there other
| tricks I need to know about?
If it can be done, safely, that would be about all that is needed (FFSv2
has more overheads, all those additional time bytes need to be stored
somewhere, plus more, so you need free space on the filesystem, or to
enlarge it). I'd use dump/restore rather than tar for this, it is better
suited for the task, but that's just a preference.
You do need to ensure that all devices are correctly made in /dev, and
all setuid bits set where they should be, in addition to the more normal
file system layout issues.
But if you just need to play with files with dates beyond 2038, much easier
would be to make another filesystem, make that FFSv2, and play there - even
a tmpfs would do if you don't need long term storage, just enough to
see how things work while doing testing. No current real legitimate
requirement (beyond future testing) can require dates > 2038 -- we still
have > 11 years to get that into a workable state for real uses.
kre
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Re: Y2038 problem and FFSv1 on Alpha
Author: Martin Husemann
Date: Wed, 28 Oct 2026 09:42
Date: Wed, 28 Oct 2026 09:42
32 lines
1937 bytes
1937 bytes
On Wed, Oct 28, 2026 at 10:49:40AM +0700, Robert Elz wrote: > | Why did the installer create the root filesystem using FFSv1? > > This one I cannot speak to, I haven't had an alpha to use for decades, > and no longer remember any of the details. > > | Is this a general policy in 11.0, The default file system type is FFSv2ea. I am not sure why it picked FFSv1 in this case, as Alpha is (known to sysinst) able to boot from FFSv2 disks. This is set in src/usr.sbin/sysinst/arch/alpha/md.h by: /* have support for booting from UFS2 */ #define HAVE_UFS2_BOOT and #define BOOTXX_FFSV2 "bootxx_ffsv2" I currently don't have a working alpha machine for debugging, unfortunately. Martin -- Posted automagically by a mail2news gateway at muc.de e.V. Please direct questions, flames, donations, etc. to news-admin@muc.de
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads