On 27 Apr 2004 Daniel Lang wrote: > Hi Folks, > > Gavin Atkinson wrote on Tue, Apr 27, 2004 at 12:11:45AM +0100: > [..] > > > >> I get the error 'cannot find mount_ufs2 in /sbin:/usr/sbin'. > > > >> Is there something missing in UPDATING? > > > >> I'm reading -current and cvs-all, but can't remember anything about > > > >> this. Should I first do make install for this new tool? > > > > Sounds like you have ufs2 as filesystem type in your /etc/fstab instead > > > > of ufs ? > > > No, just ufs. But when I typed 'mount' it showed that '/' was of type > > > ufs22, read-only, etc. > > > So there is a 2 to much somewhere. And I'm updating to CURRENT quite often > > > and never had this before. > > > > I wonder if ths is connected with the following commit: > > > > http://docs.FreeBSD.org/cgi/mid.cgi?200404261513.i3QFDkb5026044 > [..] > > Most likely, I just stumbled across the same problem: > > # mount > /dev/ad0s3a on / (ufs22, local) > devfs on /dev (devfs, local) > /dev/ad0s3e on /usr (ufs22, local, soft-updates) > /dev/ad0s3f on /home (ufs22, local, soft-updates) > /dev/ad0s3d on /var (ufs22, local, soft-updates) > procfs on /proc (procfs, local) I suspect in this case the reason why you are seeing dual '2's is because userspace and kernelspace are not in sync. To make the distinction between ufs and ufs2 mount was modified to tag a '2' to the fs name. Those changes were removed, and the fix was moved into the kernel. Thus if user and kernel space are not in sync, then the kernel would return "ufs2" as the filesystem type, then mount(8) would tag an additional 2 on there. For the above problem, re-compiling mount(8) should make that problem go away which leads us to the next. > > and > > # mount -u / > mount: exec mount_ufs2 not found in /sbin:/usr/sbin: No such file or directory > > Please suggest workaround or fix :-/ I hacked up a patch which appears to fix this problem, basically mount is pulling the fs name and constructing a mount_XXX command to exec. I also fixed another potentially serious problem with -p I would appriciate if you tested it and gave me feed back so we can get this fix commited ASAP. Reference: PR # http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/66021 Regards Christian S.J. Peron <----- MOUNT PATCH --------------------------------------> --- sbin/mount/mount.c.bak Thu Apr 29 03:03:23 2004 +++ sbin/mount/mount.c Thu Apr 29 03:50:34 2004 _at__at_ -117,7 +117,7 _at__at_ */ static const char * remountable_fs_names[] = { - "ufs", "ffs", "ext2fs", + "ufs", "ufs2", "ffs", "ext2fs", 0 }; _at__at_ -459,7 +459,7 _at__at_ free(optbuf); return (1); case 0: /* Child. */ - if (strcmp(vfstype, "ufs") == 0) + if (strcmp(vfstype, "ufs") == 0 || strcmp(vfstype, "ufs2") == 0) exit(mount_ufs(argc, (char * const *) argv)); /* Go find an executable. */ _at__at_ -719,6 +719,8 _at__at_ char *opts; opts = flags2opts(ent->f_flags); + if (strcmp(ent->f_fstypename, "ufs2") == 0) + strlcpy((char *)ent->f_fstypename, "ufs", 4); printf("%s\t%s\t%s %s", ent->f_mntfromname, ent->f_mntonname, ent->f_fstypename, opts); free(opts); _at__at_ -727,7 +729,8 _at__at_ printf("\t%u %u\n", fst->fs_freq, fst->fs_passno); else if ((fst = getfsfile(ent->f_mntonname))) printf("\t%u %u\n", fst->fs_freq, fst->fs_passno); - else if (strcmp(ent->f_fstypename, "ufs") == 0) { + else if (strcmp(ent->f_fstypename, "ufs") == 0 + || strcmp(ent->f_fstypename, "ufs2") == 0) { if (strcmp(ent->f_mntonname, "/") == 0) printf("\t1 1\n"); elseReceived on Wed Apr 28 2004 - 18:58:43 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:52 UTC