Bug 116931 - lack of fsck_cd9660 prevents mounting iso images with mdconfig_md%d (with workaround)
Summary: lack of fsck_cd9660 prevents mounting iso images with mdconfig_md%d (with wor...
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 7.0-CURRENT
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-04 20:10 UTC by Poul-Henning Kamp
Modified: 2018-02-18 07:33 UTC (History)
1 user (show)

See Also:


Attachments
mdconfig2.fsck_skip_fs.patch (1.54 KB, patch)
2010-04-03 18:05 UTC, Mikolaj Golub
no flags Details | Diff
mdconfig2.check_pass.patch (560 bytes, patch)
2010-04-03 18:05 UTC, Mikolaj Golub
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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
	program.

Fix: 

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
How-To-Repeat: 
	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 $?
/sbin/fsck_ufs
0
$ command -v fsck_cd9660; echo $?
1
$

    This would reduce the number of needed special cases in the mdconfig script.
Thanks!
-Garrett
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