# [SOLVED] PRNG is not seeded

## sindarek

witam

na nowym systemie po poleceniu 

```
/etc/init.d/sshd start
```

dostaję komunikat 

```
/etc/init.d/sshd start

 * Generating Hostkey...

PRNG is not seeded
```

Znalazłem informację iż chodzi o :

/dev/random i /dev/urandom

tworzę te pliki :

```
mknod -m 644 /dev/random c 1 8

               mknod -m 644 /dev/urandom c 1 9

               chown root:root /dev/random /dev/urandom

```

wtedy da się uruchomić sshd

ale po restarcie serwera znowu nie działa

co należy z tym zrobić ?

czy np dodać to do /etc/conf.d/rc

```

rm /dev/random

rm /dev/random

mknod -m 644 /dev/random c 1 8

mknod -m 644 /dev/urandom c 1 9

chown root:root /dev/random /dev/urandom
```

Jak coś robię wg instrukcji to idzie ładnie ale z każdym problemem macam po ciemku ... a głupoty nie chcę zrobić

Proszę o rady.Last edited by sindarek on Mon Dec 14, 2009 11:08 pm; edited 1 time in total

----------

## SlashBeast

udev zainstaluj.

----------

## sindarek

 *SlashBeast wrote:*   

> udev zainstaluj.

 

```
>>> Installing (1 of 1) sys-fs/udev-146-r1

 * Not restarting udevd, as your kernel is too old!

 *

 * If after the udev update removable devices or CD/DVD drives

 * stop working, try re-emerging HAL before filling a bug report

 *

 * persistent-net does assigning fixed names to network devices.

 * If you have problems with the persistent-net rules,

 * just delete the rules file

 *      rm /etc/udev/rules.d/70-persistent-net.rules

 * and then reboot.

 *

 * This may however number your devices in a different way than they are now.

 *

 * If you build an initramfs including udev, then please

 * make sure that the /sbin/udevadm binary gets included,

 * and your scripts changed to use it,as it replaces the

 * old helper apps udevinfo, udevtrigger, ...

 *

 * mount options for directory /dev are no longer

 * set in /etc/udev/udev.conf, but in /etc/fstab

 * as for other directories.

 *

 * You have devfs-compat use flag enabled.

 * This enables devfs compatible device names.

 * If you use /dev/md/*, /dev/loop/* or /dev/rd/*,

 * then please migrate over to using the device names

 * /dev/md*, /dev/loop* and /dev/ram*.

 * The devfs-compat rules will be removed in the future.

 * For reference see Bug #269359.

 *

 * For more information on udev on Gentoo, writing udev rules, and

 *          fixing known issues visit:

 *          http://www.gentoo.org/doc/en/udev-guide.xml

 * Messages for package sys-fs/udev-146-r1:

 * Unable to check for the following kernel config options due

 * to absence of any configured kernel sources or compiled

 * config:

 *  - INOTIFY_USER

 *  - SIGNALFD

 *  - !SYSFS_DEPRECATED

 *  - !SYSFS_DEPRECATED_V2

 * You're on your own to make sure they are set if needed.

 *

 * udev-146 does not support Linux kernel before version 2.6.25!

 * For a reliable udev, use at least kernel 2.6.27

 *

 * udev cannot be restarted after emerging,

 * as your running kernel version (2.6.27.21) is too old.

 * You really need to use a newer kernel after a reboot!

 * Not restarting udevd, as your kernel is too old!

 *

 * If after the udev update removable devices or CD/DVD drives

 * stop working, try re-emerging HAL before filling a bug report

 *

 * persistent-net does assigning fixed names to network devices.

 * If you have problems with the persistent-net rules,

 * just delete the rules file

 *      rm /etc/udev/rules.d/70-persistent-net.rules

 * and then reboot.

 *

 * This may however number your devices in a different way than they are now.

 *

 * If you build an initramfs including udev, then please

 * make sure that the /sbin/udevadm binary gets included,

 * and your scripts changed to use it,as it replaces the

 * old helper apps udevinfo, udevtrigger, ...

 *

 * mount options for directory /dev are no longer

 * set in /etc/udev/udev.conf, but in /etc/fstab

 * as for other directories.

 *

 * You have devfs-compat use flag enabled.

 * This enables devfs compatible device names.

 * If you use /dev/md/*, /dev/loop/* or /dev/rd/*,

 * then please migrate over to using the device names

 * /dev/md*, /dev/loop* and /dev/ram*.

 * The devfs-compat rules will be removed in the future.

 * For reference see Bug #269359.

 *

 * For more information on udev on Gentoo, writing udev rules, and

 *          fixing known issues visit:

 *          http://www.gentoo.org/doc/en/udev-guide.xml

>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.

```

Czy to znaczy że na tym vps jądro nie obsługuje udev ?

Co wtedy ?

Jakakolwiek ingerencja poza vps wykluczona.

----------

## SlashBeast

pewnie maja 2.6.18-openvz a do tego potrzeba udeva starszego od 140, sprawdz 135 (o ile taki jest w gentoo portage, w funtoo portage jest na 100% gdyz Daniel Robbins wymaga, by funtoo dzialalo dobrze z 2.6.18 kernelami).

----------

## sindarek

 *SlashBeast wrote:*   

> pewnie maja 2.6.18-openvz a do tego potrzeba udeva starszego od 140, sprawdz 135 (o ile taki jest w gentoo portage, w funtoo portage jest na 100% gdyz Daniel Robbins wymaga, by funtoo dzialalo dobrze z 2.6.18 kernelami).

 

czy 

```
emerge --info[quote] na vps'ie pokazuje prawdziwe informacje o kernelu ?

```

```

emerge --info

Portage 2.1.6.13 (default/linux/x86/10.0, gcc-4.3.4, glibc-2.9_p20081201-r2, 2.6.27.21 i686)

=================================================================

System uname: Linux-2.6.27.21-i686-Intel-R-_Core-TM-_i7_CPU_920_@_2.67GHz-with-gentoo-1.12.13

Timestamp of tree: Sun, 13 Dec 2009 19:00:01 +0000

app-shells/bash:     4.0_p35

dev-lang/python:     2.6.4

sys-apps/baselayout: 1.12.13

sys-apps/sandbox:    1.6-r2

sys-devel/autoconf:  2.63-r1

sys-devel/automake:  1.10.2

sys-devel/binutils:  2.18-r3

sys-devel/gcc-config: 1.4.1

sys-devel/libtool:   2.2.6b

virtual/os-headers:  2.6.27-r2

ACCEPT_KEYWORDS="x86"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -march=i686 -pipe"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /sbin/rc"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"

CXXFLAGS="-O2 -march=i686 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"

GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"

LDFLAGS="-Wl,-O1"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="acl berkdb bzip2 cli cracklib crypt cups cxx dri fortran gdbm gpm iconv ipv6 modules mudflap ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection session spl ssl sysfs tcpd unicode x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

```

----------

## SlashBeast

sprawdz starszego udeva, widac 2.6.27 rowniez jest za stary.

----------

## sindarek

 *SlashBeast wrote:*   

> sprawdz starszego udeva, widac 2.6.27 rowniez jest za stary.

 

podpowiesz jak to zrobić ?

```
emerge udev -s

Searching...

[ Results for search key : udev ]

[ Applications found : 3 ]

*  app-text/uudeview

      Latest version available: 0.5.20-r1

      Latest version installed: [ Not Installed ]

      Size of files: 255 kB

      Homepage:      http://www.fpx.de/fp/Software/UUDeview/

      Description:   uu, xx, base64, binhex decoder

      License:       GPL-2

*  app-vim/udev-syntax [ Masked ]

      Latest version available: 20051016-r1

      Latest version installed: [ Not Installed ]

      Size of files: 1 kB

      Homepage:      http://www.vim.org/scripts/script.php?script_id=1381

      Description:   vim plugin: syntax highlighting for udev rules files

      License:       vim

*  sys-fs/udev

      Latest version available: 146-r1

      Latest version installed: 146-r1

      Size of files: 527 kB

      Homepage:      http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html

      Description:   Linux dynamic and persistent device naming support (aka userspace devfs)

      License:       GPL-2

```

----------

## SlashBeast

emerge "=udev-wersja" sprawdz w /usr/portage/sys-fs/udev jaka masz wersje, 138 albo 135  mergnij, o ile masz.

----------

## sindarek

Budując VPS natrafiłem na dziwny wpis w manualu budowy template. Dotyczy on własnie udev

Możesz spojrzeć ?

```

Set up udev

Using udev you will have problems since some devices nodes are not created. For example sshd will fail to start since /dev/random and /dev/urandom are missing. So it's recommended to disable udev. Edit /vz/private/777/etc/conf.d/rc and change the RC_DEVICES line to:

RC_DEVICES="static"

If you want to enable udev read on.

Create some device nodes needed to enter a container:

cd /vz/private/777/lib

mknod udev/devices/ttyp0 c 3 0

mknod udev/devices/ptyp0 c 2 0

mknod udev/devices/ptmx c 5 2

Edit /vz/private/777/etc/conf.d/rc and change the RC_DEVICES and RC_DEVICE_TARBALL lines to:

RC_DEVICES="udev"

RC_DEVICE_TARBALL="no"

```

najpierw jest 

```
RC_DEVICES="static"
```

a potem

```
RC_DEVICES="udev"

RC_DEVICE_TARBALL="no"

```

Jedno drugie wyklucza jak powinno być ?

```
RC_DEVICES="static"
```

znaczy udev wyłączony ?

wyłączyć ? 

zahaszować 

```

RC_DEVICES="static"

```

----------

## SlashBeast

Nie mam pojecia, dziwne to conajmniej, moze ten poradnik do templatow jest bardzo stary?

----------

## sindarek

 *SlashBeast wrote:*   

> Nie mam pojecia, dziwne to conajmniej, moze ten poradnik do templatow jest bardzo stary?

 

już zrobiłem , trzeba było tak zrobić

etc/conf.d/rc

Kod:

RC_DEVICES="static"

#RC_DEVICE_TARBALL="no"

----------

