Bug 116931

Summary: lack of fsck_cd9660 prevents mounting iso images with mdconfig_md%d (with workaround)
Product: Base System Reporter: Poul-Henning Kamp <phk>
Component: confAssignee: freebsd-bugs (Nobody) <bugs>
Status: Open ---    
Severity: Affects Only Me CC: ak
Priority: Normal    
Version: 7.0-CURRENT   
Hardware: Any   
OS: Any   
Description Flags
mdconfig2.check_pass.patch none

Description Poul-Henning Kamp 2007-10-04 20:10:01 UTC

	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
Comment 1 Bruce Cran freebsd_committer 2010-04-03 11:51:07 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-fs

Over to maintainer(s).
Comment 2 Andriy Gapon 2010-04-03 12:08:16 UTC
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.

Andriy Gapon
Comment 3 Mikolaj Golub 2010-04-03 18:05:25 UTC
Mikolaj Golub
Comment 4 Garrett Cooper 2012-01-03 09:41:28 UTC
    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.
Comment 5 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:01:20 UTC
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
Comment 6 Alex Kozlov freebsd_committer 2018-02-18 07:33:45 UTC
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