public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Unwritable device nodes on ro nfs
@ 2004-09-13 12:51 Denis Vlasenko
  2004-09-13 13:13 ` Frank Steiner
  0 siblings, 1 reply; 4+ messages in thread
From: Denis Vlasenko @ 2004-09-13 12:51 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg KH, Trond Myklebust

Hi,

I am moving away from devfs. I have a problem
booting with ro nfs root fs.

I initialize network and mount nfs using an
initrd, then pivot_root into nfs mountpoint:

...
mount -n -t devfs none /new_root/dev
cd /new_root
# making sure we dont keep /dev busy
exec <dev/console >dev/console 2>&1
pivot_root . old_root
...
exec \
chroot . \
sh -c \
'umount -n /old_root; exec /bin/env - $INIT'

I removed "mount -n -t devfs" line and
now "exec >dev/console" fails because
/new_root is ro-mounted nfs. ro-mounted
local fs (reiser3) works fine.

Shall I jump thru the hoops, mount a ramfs
on top of new_root/dev, populate it with
device nodes, etc?

I don't want to do this, I want to hand a
'clean' state to secondary $INIT.

I can close all descriptors (exec <&- >&- 2>&-)
before I exec $INIT, and have $INIT deal with
that. This avoid the problem of >/dev/console.

But I lose the ability to boot with INIT=/bin/sh then.
sh doesn't expect to have stdio closed at startup.
Not good.

What is a 'right thing' to do in this situation?
--
vda


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-09-13 14:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-13 12:51 Unwritable device nodes on ro nfs Denis Vlasenko
2004-09-13 13:13 ` Frank Steiner
2004-09-13 13:56   ` Denis Vlasenko
2004-09-13 14:02     ` Denis Vlasenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox