Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: conf/116931: lack of fsck_cd9660 prevents mounting iso images with mdconfig_md%d (with workaround)

1 view
Skip to first unread message

bru...@freebsd.org

unread,
Apr 3, 2010, 6:51:26 AM4/3/10
to bru...@freebsd.org, freebs...@freebsd.org, freeb...@freebsd.org
Synopsis: lack of fsck_cd9660 prevents mounting iso images with mdconfig_md%d (with workaround)

Responsible-Changed-From-To: freebsd-bugs->freebsd-fs
Responsible-Changed-By: brucec
Responsible-Changed-When: Sat Apr 3 10:51:07 UTC 2010
Responsible-Changed-Why:
Over to maintainer(s).

http://www.freebsd.org/cgi/query-pr.cgi?pr=116931

Andriy Gapon

unread,
Apr 3, 2010, 12:19:41 PM4/3/10
to freeb...@freebsd.org
The following reply was made to PR conf/116931; it has been noted by GNATS.

From: Andriy Gapon <a...@icyb.net.ua>
To: bug-fo...@FreeBSD.org, p...@critter.freebsd.dk
Cc:
Subject: Re: conf/116931: lack of fsck_cd9660 prevents mounting iso images
with mdconfig_md%d (with workaround)

Date: Sat, 03 Apr 2010 14:08:16 +0300

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

Mikolaj Golub

unread,
Apr 3, 2010, 1:10:13 PM4/3/10
to freeb...@freebsd.org
The following reply was made to PR conf/116931; it has been noted by GNATS.

From: Mikolaj Golub <to.my....@gmail.com>
To: bug-fo...@FreeBSD.org
Cc: freeb...@FreeBSD.org, Poul-Henning Kamp <p...@critter.freebsd.dk>
Subject: Re: conf/116931: lack of fsck_cd9660 prevents mounting iso images with mdconfig_md%d (with workaround)

Date: Sat, 03 Apr 2010 20:05:25 +0300

--=-=-=

We could keep the list of fs types that should not be fsck'ed (like in the
first patch below) or could check the pass number in /etc/fstab (the second
patch).

--
Mikolaj Golub


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment; filename=mdconfig2.fsck_skip_fs.patch

--- etc/rc.d/mdconfig2.orig 2010-04-03 18:39:43.000000000 +0300
+++ etc/rc.d/mdconfig2 2010-04-03 19:38:07.000000000 +0300
@@ -39,6 +39,19 @@
start_precmd='[ -n "${_mdconfig2_list}" ]'
required_modules="geom_md:g_md"

+fsck_skip_fs="cd9660 udf"
+
+in_list()
+{
+ local _x _list _i
+ _x=$1
+ _list=$2
+ for _i in ${_list}; do
+ [ "${_x}" = "${_i}" ] && return 0
+ done
+ return 1
+}
+
is_readonly()
{
local _mp _ret
@@ -95,10 +108,13 @@
for _i in `df ${_file} 2>/dev/null`; do _fs=${_i}; done
fi

+ _fs_type=`awk -v d="${_dev}" '$1 == d {print $3; exit}' /etc/fstab`
+
# Debugging help.
debug "${_md} config: ${_config}"
debug "${_md} type: ${_type}"
debug "${_md} dev: ${_dev}"
+ debug "${_md} fs_type: ${_fs_type}"
debug "${_md} file: ${_file}"
debug "${_md} fs: ${_fs}"
debug "${_md} owner: ${_owner}"
@@ -109,7 +125,7 @@

mdconfig2_start()
{
- local _md _fs _mp _mounted _dev _config _type _file _owner _perms _files _populate _fsck_cmd _i
+ local _md _fs _mp _mounted _dev _config _type _file _owner _perms _files _populate _fsck_cmd _fs_type _i

for _md in ${_mdconfig2_list}; do
init_variables ${_md}
@@ -136,8 +152,9 @@
echo "Creating ${_md} device failed, moving on."
continue
fi
- # Skip fsck for uzip devices.
- if [ "${_file}" != "${_file%.uzip}" ]; then
+ # Skip fsck for uzip devices and for fs types listed in fsck_skip_fs
+ if [ "${_file}" != "${_file%.uzip}" ] ||
+ in_list "${_fs_type}" "${fsck_skip_fs}"; then
_fsck_cmd=":"
elif checkyesno background_fsck; then
_fsck_cmd="fsck -F"

--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=mdconfig2.check_pass.patch

--- etc/rc.d/mdconfig2.orig 2010-04-03 18:39:43.000000000 +0300
+++ etc/rc.d/mdconfig2 2010-04-03 19:59:15.000000000 +0300
@@ -136,8 +136,9 @@
echo "Creating ${_md} device failed, moving on."
continue
fi
- # Skip fsck for uzip devices.
- if [ "${_file}" != "${_file%.uzip}" ]; then
+ # Skip fsck for uzip devices or that have zero pass in fstab
+ if [ "${_file}" != "${_file%.uzip}" ] ||
+ `awk -v d="${_dev}" '$1 == d {exit $6}' /etc/fstab`; then
_fsck_cmd=":"
elif checkyesno background_fsck; then
_fsck_cmd="fsck -F"

--=-=-=--

Mikolaj Golub

unread,
Apr 3, 2010, 1:05:25 PM4/3/10
to bug-fo...@freebsd.org, freeb...@freebsd.org, Poul-Henning Kamp
mdconfig2.fsck_skip_fs.patch
mdconfig2.check_pass.patch
0 new messages