Trying to mount an ISO image using the mdconfig_md%d= facility in
/etc/rc.conf does not work because we do not have a fsck_cd9660
The correct fix is to know if the filesystem can be fsck'ed or not
but a workaround is to symlink fsck_cd9660 to /usr/bin/true
Add to /etc/rc.conf
mdconfig_md0="-t vnode -o readonly -f /some/image.iso"
Add to /etc/fstab
/dev/md0 /cdrom cd9660 ro,noauto 0 0
mkdir -p /cdrom
sh /etc/rc.d/mdconfig2 start
Over to maintainer(s).
Somewhat tangential: etc/rc.d/root shouldn't attempt to re-mount root filesystem
read-write if it's known to be strictly read-only, e.g. cd9660.
The attached patch looks ok. The only suggestion that I have is
that since you're grabbing the fs field from /etc/fstab, instead of
keeping a blacklist, I would just use command -v; example:
$ command -v fsck_ufs; echo $?
$ command -v fsck_cd9660; echo $?
This would reduce the number of needed special cases in the mdconfig script.
For bugs matching the following criteria:
Status: In Progress Changed: (is less than) 2014-06-01
Reset to default assignee and clear in-progress tags.
Mail being skipped
On FreeBSD 12 you can mount any supported fs from fstab:
echo 'md /mnt mfs ro,-P,-F/path/file.iso,-Tcd9660 0 0' >> /etc/fstab