NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/59783: Can't mount the "special" SGI volume formatted cd9660
The following reply was made to PR kern/59783; it has been noted by GNATS.
From: mlelstv%serpens.de@localhost (Michael van Elst)
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: kern/59783: Can't mount the "special" SGI volume formatted cd9660
Date: Sat, 22 Nov 2025 22:13:32 -0000 (UTC)
gnats-admin%NetBSD.org@localhost ("Izumi Tsutsui via gnats") writes:
> Ah, I see, even on sgimips itself?
> (Other ports cannot mount sgimips install CD)
The install CD is not an ISO image, but a hacked SGI volume. Other
ports don't support the SGI volume label, but you can create a
wedge manually at offset 2MB and then mount it.
On sgimips, the SGI volume label is translated into a fictitious
BSD label, which reports the ISO9660 partition as "4.2BSD" with
non-zero fsize/bsize/cpg parameters.
If you try to mount this with cd9660, it ignores the partition type
and interprets 'fsize' as a bad session offset. It probably works
with something like:
Index: sys/fs/cd9660/cd9660_vfsops.c
===================================================================
RCS file: /cvsroot/src/sys/fs/cd9660/cd9660_vfsops.c,v
retrieving revision 1.105
diff -p -u -r1.105 cd9660_vfsops.c
--- sys/fs/cd9660/cd9660_vfsops.c 16 Feb 2025 18:38:58 -0000 1.105
+++ sys/fs/cd9660/cd9660_vfsops.c 22 Nov 2025 08:13:38 -0000
@@ -419,7 +419,8 @@ iso_mountfs(struct vnode *devvp, struct
error = VOP_IOCTL(devvp, DIOCGDINFO, &label, FREAD, FSCRED);
if (!error) {
/* XXX more sanity checks? */
- sess = label.d_partitions[DISKPART(dev)].p_cdsession;
+ if (label.d_partitions[DISKPART(dev)].p_fstype == FS_ISO9660)
+ sess = label.d_partitions[DISKPART(dev)].p_cdsession;
} else {
/* fallback to old method */
error = VOP_IOCTL(devvp, CDIOREADMSADDR, &sess, 0, FSCRED);
Home |
Main Index |
Thread Index |
Old Index