2004-09-13 12:52:08

by Denis Vlasenko

[permalink] [raw]
Subject: Unwritable device nodes on ro nfs

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


2004-09-13 13:13:59

by Frank Steiner

[permalink] [raw]
Subject: Re: Unwritable device nodes on ro nfs

Denis Vlasenko wrote:
> Hi,
>
> I am moving away from devfs. I have a problem
> booting with ro nfs root fs.

Known problem and the patch is here:
http://linux.bkbits.net:8080/linux-2.6/[email protected]

--
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

2004-09-13 13:57:27

by Denis Vlasenko

[permalink] [raw]
Subject: Re: Unwritable device nodes on ro nfs

On Monday 13 September 2004 16:13, Frank Steiner wrote:
> Denis Vlasenko wrote:
> > Hi,
> >
> > I am moving away from devfs. I have a problem
> > booting with ro nfs root fs.
>
> Known problem and the patch is here:
> http://linux.bkbits.net:8080/linux-2.6/[email protected]

404 Not Found
--
vda

2004-09-13 14:02:48

by Denis Vlasenko

[permalink] [raw]
Subject: Re: Unwritable device nodes on ro nfs

On Monday 13 September 2004 16:56, Denis Vlasenko wrote:
> On Monday 13 September 2004 16:13, Frank Steiner wrote:
> > Denis Vlasenko wrote:
> > > Hi,
> > >
> > > I am moving away from devfs. I have a problem
> > > booting with ro nfs root fs.
> >
> > Known problem and the patch is here:
> > http://linux.bkbits.net:8080/linux-2.6/[email protected]
>
> 404 Not Found

I type too fast. It exists, but either my Mozilla or squid
does not like it. Wget works.
--
vda