NetBSD Problem Report #39607
From www@NetBSD.org Mon Sep 22 03:38:43 2008
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id 74CB763BC83
for <gnats-bugs@gnats.netbsd.org>; Mon, 22 Sep 2008 03:38:43 +0000 (UTC)
Message-Id: <20080922033843.155DA63BA98@narn.NetBSD.org>
Date: Mon, 22 Sep 2008 03:38:43 +0000 (UTC)
From: Ephaeton@gmx.net
Reply-To: Ephaeton@gmx.net
To: gnats-bugs@NetBSD.org
Subject: newfs(_msdos) falsly? reports about "read-only filesystem" w/ VND
X-Send-Pr-Version: www-1.0
>Number: 39607
>Category: bin
>Synopsis: newfs(_msdos) falsly? reports about "read-only filesystem" w/ VND
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Sep 22 03:40:00 +0000 2008
>Last-Modified: Mon Sep 22 04:25:01 +0000 2008
>Originator: Martin S. Weber
>Release: 4.99.72 / i386
>Organization:
me again inc.
>Environment:
NetBSD agamemnon.entropie.local 4.99.72 NetBSD 4.99.72 (AGAMEMNON) #4: Sat Sep 20 20:45:58 EDT 2008 root@agamemnon.entropie.local:/home/netbsd/obj/sys/arch/i386/compile/AGAMEMNON i386
>Description:
Maybe this is too obvious for you people... newfs_msdos complains on a vnconfig'd file that it's a read-only filesystem. It would then fail on the block device but work on the character device (you maybe expect that). It then in both cases complains about the r/o fs (huh?) and exits with status 1, although it worked in the latter case (as you are then able to mount). [[yes yes I'll use newfs -ZFs from now on]] See also below.
>How-To-Repeat:
cd /tmp
mkdir -p mnt
dd if=/dev/zero of=msdos.bin bs=1m count=10
vnconfig vnd0 /tmp/msdos.bin
newfs_msdos /dev/vnd0a
#newfs_msdos: warning: /dev/vnd0a is not a character device
# /dev/vnd0a: 20424 sectors in 2553 FAT12 clusters (4096 bytes/cluster)
# MBR type: 1
# bps=512 spc=8 res=1 nft=2 rde=512 sec=20480 mid=0xf0 spf=8 spt=32 hds=64 hid=0
# newfs_msdos: /dev/vnd0a: Read-only file system
echo $?
# 1
mount -t msdos /dev/vnd0a mnt
# mount_msdos: /dev/vnd0a on /tmp/mnt: Invalid argument
newfs_msdos /dev/rvnd0a
# /dev/rvnd0a: 20424 sectors in 2553 FAT12 clusters (4096 bytes/cluster)
# MBR type: 1
# bps=512 spc=8 res=1 nft=2 rde=512 sec=20480 mid=0xf0 spf=8 spt=32 hds=64 hid=0
# newfs_msdos: /dev/rvnd0a: Read-only file system
echo $?
# 1
mount -t msdos /dev/vnd0a mnt
# works.
>Fix:
dunno.
>Audit-Trail:
From: Quentin Garnier <cube@cubidou.net>
To: gnats-bugs@NetBSD.org
Cc: Ephaeton@gmx.net
Subject: Re: bin/39607: newfs(_msdos) falsly? reports about "read-only
filesystem" w/ VND
Date: Mon, 22 Sep 2008 06:07:34 +0200
--QHhm1I6mwQR20oIa
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Mon, Sep 22, 2008 at 03:40:01AM +0000, Ephaeton@gmx.net wrote:
> >Number: 39607
> >Category: bin
> >Synopsis: newfs(_msdos) falsly? reports about "read-only filesyste=
m" w/ VND
> >Confidential: no
> >Severity: non-critical
> >Priority: low
> >Responsible: bin-bug-people
> >State: open
> >Class: sw-bug
> >Submitter-Id: net
> >Arrival-Date: Mon Sep 22 03:40:00 +0000 2008
> >Originator: Martin S. Weber
> >Release: 4.99.72 / i386
> >Organization:
> me again inc.
> >Environment:
> NetBSD agamemnon.entropie.local 4.99.72 NetBSD 4.99.72 (AGAMEMNON) #4: Sa=
t Sep 20 20:45:58 EDT 2008 root@agamemnon.entropie.local:/home/netbsd/obj/=
sys/arch/i386/compile/AGAMEMNON i386
> >Description:
> Maybe this is too obvious for you people... newfs_msdos complains on a vn=
config'd file that it's a read-only filesystem. It would then fail on the b=
lock device but work on the character device (you maybe expect that). It th=
en in both cases complains about the r/o fs (huh?) and exits with status 1,=
although it worked in the latter case (as you are then able to mount). [[y=
es yes I'll use newfs -ZFs from now on]] See also below.
1. Yes you should use the character device.
2. The EROFS is not a false error. If you look at the disklabel of
vnd0 after you configure it, you'll see that having no MBR, it
defaults with a 4.2BSD partition in it. The EROFS comes from
newfs_msdos trying to write over the position where the disklabel
is normally stored.
--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"See the look on my face from staying too long in one place
[...] every time the morning breaks I know I'm closer to falling"
KT Tunstall, Saving My Face, Drastic Fantastic, 2007.
--QHhm1I6mwQR20oIa
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (NetBSD)
iQEcBAEBAgAGBQJI1xoGAAoJENgoQloHrPnodOUIALPDM42xieWd/AXKbeEuPk7a
1LLMxlUJ3ifNWahSndh88v+Bm5/3g3I9dIDCk3/rUb1pRjwMiCxKm0Q6o0J33FHZ
GYzRUqG12pCYz2cLrKrSf2+EUdY0Q4ryZwYiB1188HsZ4E3L2kenvaa14nxqSjxS
HxXBHAgHZXbOZGIChgJffaOJGu/HOjZyiiERBZoqB+JN3ZXy5MEs7O/tW722iOym
uvqRLBZkqWjK3ufwHKuNPF2hK5U0qaUo8Xeg1qfyjPYDdcdBC5Jp1qZBRyebeXGg
hzfbZ2N3FpqW8wxVCmK0201K3sXDVV3V+i42nyoEeXB8aQOARajiiC0YzoLw19E=
=ihdW
-----END PGP SIGNATURE-----
--QHhm1I6mwQR20oIa--
From: "Martin S. Weber" <Ephaeton@gmx.net>
To: Quentin Garnier <cube@cubidou.net>
Cc: gnats-bugs@NetBSD.org
Subject: Re: bin/39607: newfs(_msdos) falsly? reports about "read-only filesystem" w/ VND
Date: Mon, 22 Sep 2008 00:20:31 -0400
On Mon, Sep 22, 2008 at 06:07:34AM +0200, Quentin Garnier wrote:
> (.. myself cut ..)
> 1. Yes you should use the character device.
> 2. The EROFS is not a false error. (...)
Ok, so "wrong alarm" so to speak. To make something useful out of this PR,
may I suggest that it gets documented to use the character device? I see
newfs_msods' manpage's example is using the character devices but I don't
see it in NOTES of newfs (where of course yet another way is noted how I
should build my filesystem images) or newfs_msdos.
Sorry for the noise.
And while you maybe work on the newfs manpage, you could also fix this
parse error for me (in NOTES section):
The block size and fragment size will be written back to the
disklabel only if the last character of special references the same par-
tition as the minor device number. that provide disk like block and
character devices.
Aside of that, feel free to close this.
Thanks tho,
-Martin
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.