OpenVZ Forum


Home » Mailing lists » Users » Ubuntu Template /dev Problems
Ubuntu Template /dev Problems [message #683] Fri, 06 January 2006 18:12 Go to next message
devnu11 is currently offline  devnu11
Messages: 64
Registered: September 2005
Location: USA
Member

I am creating an Ubuntu 5.04 template for OpenVZ and have run into a problem.
There are no /dev/pty, /dev/random, and /dev/urandom devices in /dev. I have
created these devices by the following:

cd /vz/root/111/dev; /vz/root/111/sbin/MAKEDEV pty

This creates the devices just fine. When I reboot Ubuntu the devices are not
there and need to be created all over again. When I created templates for
other linux distros I have had to create /dev/pty but they are there on reboot.

drwxr-xr-x 4 root root 4096 Jan 1 14:18 dev

How do I solve this problem on Ubuntu? Thanks

*Also posted to ubuntu.com support forum
Re: Ubuntu Template /dev Problems [message #684 is a reply to message #683] Fri, 06 January 2006 18:17 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

this is probably due to your initscripts use /dev mounted over tmpfs.
You can check this in `mount` output.
I would recommend you to disable mounting it on tmpfs since it's a real
wastage of memory (~0.5-1MB of RAM per VPS). And this will solve your
problem also - device entries in /dev won't disappear after reboot.

Kirill Kolyshkin will be able to recommend you more concrete actions
tomorrow if you don't succeed.

Kirill

> I am creating an Ubuntu 5.04 template for OpenVZ and have run into a problem.
> There are no /dev/pty, /dev/random, and /dev/urandom devices in /dev. I have
> created these devices by the following:
>
> cd /vz/root/111/dev; /vz/root/111/sbin/MAKEDEV pty
>
> This creates the devices just fine. When I reboot Ubuntu the devices are not
> there and need to be created all over again. When I created templates for
> other linux distros I have had to create /dev/pty but they are there on reboot.
>
> drwxr-xr-x 4 root root 4096 Jan 1 14:18 dev
>
> How do I solve this problem on Ubuntu? Thanks
>
> *Also posted to ubuntu.com support forum
>
Re: Ubuntu Template /dev Problems [message #686 is a reply to message #683] Fri, 06 January 2006 18:18 Go to previous messageGo to next message
wimalopaan is currently offline  wimalopaan
Messages: 15
Registered: January 2006
Junior Member
Am Freitag, 6. Januar 2006 19:23 schrieb Greg Felter:
> I am creating an Ubuntu 5.04 template for OpenVZ and have run into a
> problem. There are no /dev/pty, /dev/random, and /dev/urandom devices in
> /dev. I have created these devices by the following:
>
> cd /vz/root/111/dev; /vz/root/111/sbin/MAKEDEV pty

I think you should create them in /vz/private/111/...

>
> This creates the devices just fine. When I reboot Ubuntu the devices are
> not there and need to be created all over again. When I created templates
> for other linux distros I have had to create /dev/pty but they are there on
> reboot.
>
> drwxr-xr-x 4 root root 4096 Jan 1 14:18 dev
>
> How do I solve this problem on Ubuntu? Thanks
>
> *Also posted to ubuntu.com support forum
>
--
--
Wilhelm Meier
email: meier@informatik.fh-kl.de
Re: Ubuntu Template /dev Problems [message #687 is a reply to message #686] Fri, 06 January 2006 18:26 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

> Am Freitag, 6. Januar 2006 19:23 schrieb Greg Felter:
>
>>I am creating an Ubuntu 5.04 template for OpenVZ and have run into a
>>problem. There are no /dev/pty, /dev/random, and /dev/urandom devices in
>>/dev. I have created these devices by the following:
>>
>>cd /vz/root/111/dev; /vz/root/111/sbin/MAKEDEV pty
>
>
> I think you should create them in /vz/private/111/...
actually, it's better to do
vzctl exec 111 /sbin/MAKEDEV pty
since /sbin/MAKEDEV can be untrusted executable :)
it also guarantees you that device entries will be created in VPS /dev
directory, not in host system...

>>This creates the devices just fine. When I reboot Ubuntu the devices are
>>not there and need to be created all over again. When I created templates
>>for other linux distros I have had to create /dev/pty but they are there on
>>reboot.
>>
>>drwxr-xr-x 4 root root 4096 Jan 1 14:18 dev
>>
>>How do I solve this problem on Ubuntu? Thanks
>>
>>*Also posted to ubuntu.com support forum
>>
Re: Ubuntu Template /dev Problems [message #688 is a reply to message #684] Fri, 06 January 2006 18:28 Go to previous messageGo to next message
devnu11 is currently offline  devnu11
Messages: 64
Registered: September 2005
Location: USA
Member

>From within the VPS:

# mount
simfs on / type simfs (rw)
proc on /proc type proc (rw,nodiratime)
simfs on /.dev type simfs (rw)
tmpfs on /dev type tmpfs (rw)

>From the Host:

# mount
/dev/sda2 on / type ext3 (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
none on /dev/shm type tmpfs (rw)
/dev/sda5 on /vz type ext3 (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)

I'm confuses where I would make the changes you recommended and how. Thanks

On Fri, 06 Jan 2006 21:17:52 +0300, Kirill Korotaev wrote
> this is probably due to your initscripts use /dev mounted over tmpfs.
> You can check this in `mount` output.
> I would recommend you to disable mounting it on tmpfs since it's a
> real wastage of memory (~0.5-1MB of RAM per VPS). And this will
> solve your problem also - device entries in /dev won't disappear
> after reboot.
>
> Kirill Kolyshkin will be able to recommend you more concrete actions
> tomorrow if you don't succeed.
>
> Kirill
>
> > I am creating an Ubuntu 5.04 template for OpenVZ and have run into a problem.
> > There are no /dev/pty, /dev/random, and /dev/urandom devices in /dev. I have
> > created these devices by the following:
> >
> > cd /vz/root/111/dev; /vz/root/111/sbin/MAKEDEV pty
> >
> > This creates the devices just fine. When I reboot Ubuntu the devices are not
> > there and need to be created all over again. When I created templates for
> > other linux distros I have had to create /dev/pty but they are there on
reboot.
> >
> > drwxr-xr-x 4 root root 4096 Jan 1 14:18 dev
> >
> > How do I solve this problem on Ubuntu? Thanks
> >
> > *Also posted to ubuntu.com support forum
> >
Re: Ubuntu Template /dev Problems [message #689 is a reply to message #688] Fri, 06 January 2006 18:34 Go to previous message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

Yes, the output of `mount` inside VPS shows that you have /dev mounted
on tmpfs. This is why you loose your entries on VPS stop (tmpfs is
similar to RAM disk).

You need to tune initscripts in your Gentoo template or directly in VPS
you created.
you can run:
grep -r tmpfs /etc
to find out where /dev is mounted.

If you wish I can help you directly if you send me host system
credentials in private(!) email.

Kirill

>>From within the VPS:
>
> # mount
> simfs on / type simfs (rw)
> proc on /proc type proc (rw,nodiratime)
> simfs on /.dev type simfs (rw)
> tmpfs on /dev type tmpfs (rw)
>
>>From the Host:
>
> # mount
> /dev/sda2 on / type ext3 (rw)
> none on /proc type proc (rw)
> none on /sys type sysfs (rw)
> none on /dev/pts type devpts (rw,gid=5,mode=620)
> /dev/sda1 on /boot type ext3 (rw)
> none on /dev/shm type tmpfs (rw)
> /dev/sda5 on /vz type ext3 (rw)
> sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
>
> I'm confuses where I would make the changes you recommended and how. Thanks
>
> On Fri, 06 Jan 2006 21:17:52 +0300, Kirill Korotaev wrote
>
>>this is probably due to your initscripts use /dev mounted over tmpfs.
>>You can check this in `mount` output.
>>I would recommend you to disable mounting it on tmpfs since it's a
>>real wastage of memory (~0.5-1MB of RAM per VPS). And this will
>>solve your problem also - device entries in /dev won't disappear
>>after reboot.
>>
>>Kirill Kolyshkin will be able to recommend you more concrete actions
>>tomorrow if you don't succeed.
>>
>>Kirill
>>
>>
>>>I am creating an Ubuntu 5.04 template for OpenVZ and have run into a problem.
>>>There are no /dev/pty, /dev/random, and /dev/urandom devices in /dev. I have
>>>created these devices by the following:
>>>
>>>cd /vz/root/111/dev; /vz/root/111/sbin/MAKEDEV pty
>>>
>>>This creates the devices just fine. When I reboot Ubuntu the devices are not
>>>there and need to be created all over again. When I created templates for
>>>other linux distros I have had to create /dev/pty but they are there on
>
> reboot.
>
>>>drwxr-xr-x 4 root root 4096 Jan 1 14:18 dev
>>>
>>>How do I solve this problem on Ubuntu? Thanks
>>>
>>>*Also posted to ubuntu.com support forum
>>>
Previous Topic: OpenVZ and Gentoo
Next Topic: Gentoo VPS Template Problems
Goto Forum:
  


Current Time: Tue Jul 30 04:28:44 GMT 2024

Total time taken to generate the page: 0.03719 seconds