Re: [vserver] Strange guest message: "Device and target are missing"

From: Corey Wright <undefined_at_pobox.com>
Date: Mon 21 Mar 2011 - 00:08:25 GMT
Message-ID: <51975.corey.1300666105.squirrel@squirrelmail>

On Tue, March 15, 2011 2:50 pm, Jarry wrote:
> On 15. 3. 2011 20:06, Herbert Poetzl wrote:
>
>> google, OTOH, links me to vdevmap.c in util-vserver, which
>> features exactly this error message, so it might not be
>> a problem _inside_ the guest, but more a problem with the
>> guest config or an util-vserver bug ...
>
> I think problem is outside of guest itself. I get this message
> just when I create /etc/vservers/<guest>/apps/vdevmap/null
> subdirectory. I mean, before I even changed anything inside
> of the guest (that device-file has not been created yet).
>
> Actually, what is the proper configuration if I want to give
> a guest ability to create and use i.e. "null" device-file
> in /chroot/dev/null?
>
> Is it enough to issue (in host):
>
> # mkdir -p /etc/vservers/<guest>/apps/vdevmap/null
> # touch /etc/vservers/<guest>/apps/vdevmap/null/create
> # touch /etc/vservers/<guest>/apps/vdevmap/null/open
>
> Or do I have to do something more?

echo /dev/null >/etc/vservers/<guest>/apps/vdevmap/null/device

that would appear to explain the vdevmap error message: you never
specified the "device".

and of course i am assuming that you've already:

echo MKNOD >>/etc/vservers/<guest>/bcapabilities

and compiled your kernel with CONFIG_VSERVER_DEVICE (otherwise you don't
need vdevmap, but worse things may ensue).

and for mounting /proc (& /dev/pts, if only to appease pbuilder) inside
the chroot:

echo secure_mount >>/etc/vservers/<guest>/ccapabilities

and to build a chroot using pbuilder, last i checked (etch?) it required
mounting /sys in the chroot which requires:

echo binary_mount >>/etc/vservers/<guest>/ccapabilities

but i "build" pbuilder chroots (ie run debootstrap and tarball results) so
infrequently that i toggle that flag (and restart the guest) only when
needed.

if you can't tell, i'm somewhat familiar with the
mounting-a-chroot-in-a-guest setup (what i either haven't forgotten or can
reverse engineer from my commented guest config files) because i use
pbuilder in a guest for building debian/ubuntu packages. maybe the
additional commentary will be helpful for whatever your chroot use-case
is.

> Jarry

corey

-- 
undefined@pobox.com
Received on Mon Mar 21 00:08:40 2011
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Mon 21 Mar 2011 - 00:08:40 GMT by hypermail 2.1.8