Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Aug 2003 05:50:26 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        freebsd-current@freebsd.org
Subject:   Re: Troubles while mounting ext2 from 5.1-RELEASE
Message-ID:  <20030807052229.X3970@gamplex.bde.org>
In-Reply-To: <m3oez2n49o.fsf@borg.borderworlds.dk>
References:  <33618.62.4.19.30.1060183855.squirrel@zerodeux.net> <m3oez2n49o.fsf@borg.borderworlds.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 6 Aug 2003, Christian Laursen wrote:

> "Vincent Caron" <v.caron@zerodeux.net> writes:
>
> >   after digging the various mailing-lists, release notes, errata and Google, I thought
> > I might get some help here. I have just installed a FreeBSD 5.1-RELEASE on my x86
> > laptop. Everything works like a charm, including DRI, except mounting ext2 :
> >
> > # mount -t ext2fs /dev/ad0s2 /mnt/linux
> > ext2fs: /dev/ad0s2: No such file or directory
>
> Did you compile EXT2FS support into your kernel?

That's probably the main bug here.  Some others are:

(1) mount(8) obfuscates the name of the mount utility that does the mount,
    so it is not completely clear that the above message is printed by
    mount_ext2fs(8)

(2) nmount(2) returns the unhelpful errno ENOENT for many cases, including
    when the vfs is not in the kernel.  It is difficult to distinguish this
    error from ENOENT for the mount point not existing or the device file
    not existing, and mount_ext2fs doesn't try.  This results in the above
    unhelpful message.

(3) mount_ext2fs doesn't print the name of the mount point, which it should
    do if the error was or might be for the mount point.  This bug used to
    be in mount_ufs.c too.  It is mostly fixed there, but not completely
    (only the device name is printed for unknown errors).  It is mostly not
    fixed for other file systems.  mount_ufs.c only has special knowledge of
    the EMFILE and EINVAL errors, which are not the ones of interest here.

(4) mount(2) only documents the device file for ufs.

(5) nmount(2) is undocumented.

Fix for a small part of (3):

%%%
Index: mount_ufs.c
===================================================================
RCS file: /home/ncvs/src/sbin/mount/mount_ufs.c,v
retrieving revision 1.23
diff -u -2 -r1.23 mount_ufs.c
--- mount_ufs.c	3 Aug 2002 16:03:18 -0000	1.23
+++ mount_ufs.c	4 Aug 2002 08:18:46 -0000
@@ -124,5 +124,5 @@
 			break;
 		default:
-			warn("%s", args.fspec);
+			warn("%s on %s", args.fspec, fs_name);
 			break;
 		}
%%%

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030807052229.X3970>