Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Oct 1996 23:17:45 +0100
From:      Poul-Henning Kamp <phk@critter.tfs.com>
To:        julian@whistle.com
Cc:        hackers@freebsd.org
Subject:   DEVFS problem
Message-ID:  <166.846454665@critter.tfs.com>

next in thread | raw e-mail | index | archive | help

I'm running a diskless machine with DEVFS and DEVFS_ROOT, it has an
IDE disk.

I mount DEVFS early in /sbin/init:

(Warning cut&pasted, \t's are lost)

Index: init.c
===================================================================
RCS file: /home/ncvs/src/sbin/init/init.c,v
retrieving revision 1.11
diff -u -r1.11 init.c
--- init.c      1995/11/10 07:06:59     1.11
+++ init.c      1996/10/27 22:08:28
@@ -45,6 +45,7 @@
 #endif /* not lint */
 
 #include <sys/param.h>
+#include <sys/mount.h>
 #include <sys/sysctl.h>
 #include <sys/wait.h>
 
@@ -192,6 +193,9 @@
                (void)fprintf(stderr, "init: already running\n");
                exit (1);
        }
+
+       /* Try to mount devfs */
+       mount(MOUNT_DEVFS, "/dev", MNT_NOEXEC|MNT_RDONLY, 0);
 
        /*
         * Note that this does NOT open a file...


The following script hangs if devfs is mounted on /dev, but not if
it is mounted on /devfs:
	:
	fsck -y /dev/rwd0s*[ae]
	mount /dev/wd0s4e /mnt
	cd /usr
	find X* -print | cpio -dumpV /mnt

The machine as such is OK, but cpio is hung:

    0   169     1  16  -5  0   212  496 getblk D     p0-   0:00.55 cpio -dumpV 

And gradually other processes take permanent leave in getblk too.

There are a couple of other patches needed, but they are not important
I think, anyway, I will commit them now, so people can try this out.

--
Poul-Henning Kamp           | phk@FreeBSD.ORG       FreeBSD Core-team.
http://www.freebsd.org/~phk | phk@login.dknet.dk    Private mailbox.
whois: [PHK]                | phk@ref.tfs.com       TRW Financial Systems, Inc.
Future will arrive by its own means, progress not so.



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