On Sat, Jun 07, 2014 at 01:30:01PM -0400, sven falempin wrote: > On Sat, Jun 7, 2014 at 12:38 PM, Otto Moerbeek <[email protected]> wrote: > > On Sat, Jun 07, 2014 at 12:28:28PM -0400, sven falempin wrote: > > > >> On Sat, Jun 7, 2014 at 12:14 PM, sven falempin <[email protected]> > >> wrote: > >> > On Sat, Jun 7, 2014 at 11:30 AM, Otto Moerbeek <[email protected]> wrote: > >> >> On Sat, Jun 07, 2014 at 08:20:00AM -0400, sven falempin wrote: > >> >> > >> >>> On Sat, Jun 7, 2014 at 6:58 AM, Stuart Henderson > >> >>> <[email protected]> wrote: > >> >>> > On 2014-06-06, sven falempin <[email protected]> wrote: > >> >>> >> Dear misc readers, > >> >>> >> > >> >>> >> I try to understand why MAKEDEV is failing inside my chroot, while i > >> >>> >> can manually create some dev with mknod . > >> >>> >> > >> >>> >> Like: > >> >>> >> SCRIPT ${DESTDIR}/dev/MAKEDEV dev/MAKEDEV > >> >>> >> SPECIAL cd dev; sh MAKEDEV ramdisk > >> >>> >> sh: <stdin>[1]: mknod: console: Invalid argument > >> >>> >> sh: <stdin>[1]: mknod: tty: Invalid argument > >> >>> >> > >> >>> >> AFAIK everything else is ok inside the CHROOT. > >> >>> >> > >> >>> >> Help is welcome. > >> >>> >> > >> >>> >> > >> >>> > > >> >>> > Your chroot is probably on a filesystem mounted with "nodev". > >> >>> > > >> >>> > >> >>> nop , this mistake i did and already corrected. I can call a pipe | > >> >>> or read /dev/(u)random etc... (i called MAKEDEV outside the chroot and > >> >>> then enter it), but when inside...i have those Invalid argument. > >> >>> i suspect a config file somewhere but i am in the dark. > >> >> > >> >> Use set -x in the MAKEDV script to see what command fails. > >> >> > >> > > >> > i try right away , thanks > >> > > >> >> Or just create the device nodes from a non-chrooted environment in the > >> >> right dir. > >> > > >> > it breaks the purpose > >> > > >> >> > >> > >> # ksh -x MAKEDEV all > >> + PATH=/sbin:/usr/sbin:/bin:/usr/bin > >> + T=MAKEDEV > >> [ ... ] > >> + echo && chgrp operator vnd0a [ ... ] enrst1 > >> sh: <stdin>[1]: mknod: drm0: Invalid argument > >> > >> even darker, why calling chgrp and then having a mknod error, set +x > >> inside the script ? > > > > you can put set -x inside functions the trace them > oh!, there is some echo | sh at the end.. > > > > -Otto > > well, even manually i have trouble: > > # cd /root > # mknod stdin c 22 0 > # rm stdin > # chroot /mirror/altroot/ > # mount | cat > /dev/sd0a on / type ffs (local) > /dev/sd0k on /mirror type ffs (local) > [...] > # cd /lol > # mknod stdin c 22 0 > /bin/ksh: mknod: stdin: Invalid argument > # uname -a > OpenBSD sources.citypassenger.com 5.5 GENERIC#271 amd64 > > > Is this some kind of security protection ?
of course... see mknod(2).

