NFS-mounted, read-only /dev unusable in 2.6

From: Frank Steiner
Date: Tue Aug 03 2004 - 03:11:02 EST


Hi,

we boot diskless clients using nfsroot. The server exports
its own / with "ro,no_root_squash" and the clients mount it via
the nfsroot parameter. Then I run my own init script to mount
client specific /dev, /var, /etc all rw.

In this scenario, the 2.6.7 kernel fails to open an initial
console, since /dev is ro.

The 2.4 kernel was able to open an initial console, and
I could also echo sth. explicitely to /dev/console, even
when it was still the ro-mounted fs from the server.

With the 2.6.7 kernel, this will fail with "permission denied",
and that's why the kernel cannot open an initial console.
It will go on silently until I mount the client-specific
/dev in my init script and redirect all output.

Similar, using /dev/ram0 for creating an initial ramdisk
will fail when / is mounted ro from the server, and server
and client use both kernel 2.6.7. If the client runs
2.4, it is possible...

Is that change between 2.4 and 2.6 desired or a bug? It sounds
correct that one cannot use a node "/dev/console" for writing
if it is mounted read-only from a NFS server, but it was very
useful in 2.4.

Or is there any other way to get an initial console or
output any messages from an init script if one boots via nfsroot
and / (and thus, /dev) is only exported read-only from the
server?

I need that to get possible error messages from my own init
script to see what fails before I mount the client /dev.

cu,
Frank
--
Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/
Lehrstuhl f. Bioinformatik Mail: http://www.bio.ifi.lmu.de/~steiner/m/
LMU, Amalienstr. 17 Phone: +49 89 2180-4049
80333 Muenchen, Germany Fax: +49 89 2180-99-4049

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/