tech-kern archive

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

Re: Ultrix and SunOS FFS compatibility?



On Mon, Nov 24, 2025 at 10:13:38AM -0500, Thor Lancelot Simon wrote:
> Our code was definitely able to mount Ultrix filesystems on little
> endian 32-bit hosts.  I don't know if it was ever tested on a little
> endian 64-bit host.  Finding the filesystem could be a bit of pain
> because we never to my knowledge had a kernel option to enable Ultrix
> disklabel support on any platform other than pmax.
> 
> So if this doesn't work now, it's a regression.

There are previously undefined fields in the superblock that other
systems wrote as "all 1's" because for them it was a don't care
and we interpret them.


In this case, it's a plain bug. Our code interprets the new fs_flags
field while the fs_old_flags field doesn't have the UPDATED flag
set. And so WAPBL tries to start and fails.

However, even when corrected, there are more issues:

% ls -l /mnt
total 11770
ls: /mnt/RISC: Operation not supported
drwxr-xr-x  8 root  wheel      512 Dec 11  1991 RISC
ls: /mnt/lost+found: Operation not supported
drwxr-xr-x  2 root  wheel     8192 Dec 10  1991 lost+found
ls: /mnt/ultrixboot: Operation not supported
-rw-r--r--  1 root  wheel    11520 Nov 15  1991 ultrixboot
ls: /mnt/vmunix: Operation not supported
-rwxr-xr-x  1 root  wheel  5993784 Nov 15  1991 vmunix

NetBSD-current assumes that posix acls are enabled.

It also tries to access snapshot files because that
part of the superblock isn't validated.

[    49.548272] ffs_snapshot_mount: vget failed 22
...

But you can access files:

% file -s /mnt/vmunix 
/mnt/vmunix: MIPSEL ECOFF executable (impure) - version 2.10
% file /mnt/RISC/BASE/ROOT
/mnt/RISC/BASE/ROOT: new-fs dump file (little endian), This dump Fri Nov 15 13:59:56 1991, Previous dump Thu Jan  1 00:00:00 1970, Volume 1, Level zero, type: tape header,
% restore rf /mnt/RISC/BASE/ROOT | head
Level 0 dump of  on [unknown]:
Label: 
Dump   date: Thu Jan  1 00:00:00 1970
Dumped from: the epoch
         2      .
         3      ./bin
        79      ./bin/sh
        80      ./bin/sh5
        81      ./bin/ls
        82      ./bin/mv
        83      ./bin/sync
        84      ./bin/cat




Greetings,
-- 
                                Michael van Elst
Internet: mlelstv%serpens.de@localhost
                                "A potential Snark may lurk in every tree."


Home | Main Index | Thread Index | Old Index