# mkdir doesnt do anything

## nobody13

Im installing gentoo on an old computer for a dvr and suddenly i cant create new directories.  I can create files though. The hard mounted rw.

mtab :

/dev/sdb2 / ext4 rw,noatime,data=ordered 0 0

fstab : 

UUID=f6d0e5ee-73e9-4611-a7c9-1101e9a75e9a               /boot           ext2            noatime                    1   2

UUID=0cf488fb-9ff5-4548-97da-7595e7aa2310               /               ext4            noatime                    0   1

and emerge fails for the same reason : (and sadly i don't have revdep-rebuild installed yet)

```
>>> Verifying ebuild manifests

>>> Emerging (1 of 1) app-portage/gentoolkit-0.3.3::gentoo

 * gentoolkit-0.3.3.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                                      [ ok ]

/usr/lib/portage/python3.4/phase-functions.sh: line 242: cd: /var/tmp/portage/app-portage/gentoolkit-0.3.3/work: No such file or directory

 * ERROR: app-portage/gentoolkit-0.3.3::gentoo failed (unpack phase):

 *   Directory change failed: `cd '/var/tmp/portage/app-portage/gentoolkit-0.3.3/work'`

 * 

 * Call stack:

 *            ebuild.sh, line  767:  Called __ebuild_main 'unpack'

 *   phase-functions.sh, line 1007:  Called __dyn_unpack

 *   phase-functions.sh, line  242:  Called die

 * The specific snippet of code:

 *      cd "${WORKDIR}" || die "Directory change failed: \`cd '${WORKDIR}'\`"

 * 

 * If you need support, post the output of `emerge --info '=app-portage/gentoolkit-0.3.3::gentoo'`,

 * the complete build log and the output of `emerge -pqv '=app-portage/gentoolkit-0.3.3::gentoo'`.

 * The complete build log is located at '/var/tmp/portage/app-portage/gentoolkit-0.3.3/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/app-portage/gentoolkit-0.3.3/temp/environment'.

 * Working directory: '/var/tmp/portage/app-portage/gentoolkit-0.3.3/homedir'

 * S: '/var/tmp/portage/app-portage/gentoolkit-0.3.3/work/gentoolkit-0.3.3'

>>> Failed to emerge app-portage/gentoolkit-0.3.3, Log file:

```

----------

## nobody13

update : 

TO see if it is the drive or not i rebooted with the gentoo disk. I can mkdir /mnt/gentoo/home/dave/aaa  - and it works. Once i chroot in - it fails (doesnt give an error ,just doesnt write anything)

----------

## khayyam

nobody13 ...

please provide the output of 'emerge --info', 'env', and (if you have strace) 'strace mkdir /tmp/test'.

best ... khay

----------

## nobody13

spB610 dave # strace mkdir /tmp/test

bash: strace: command not found

```
spB610 dave # emerge --info 

Portage 2.3.3 (python 3.4.5-final-0, default/linux/amd64/13.0/desktop, gcc-4.9.4, glibc-2.23-r3, 4.9.6-gentoo-r1 x86_64)

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

System uname: Linux-4.9.6-gentoo-r1-x86_64-Intel-R-_Pentium-R-_D_CPU_3.00GHz-with-gentoo-2.3

KiB Mem:     3325116 total,   2993412 free

KiB Swap:    2097148 total,   2097148 free

Timestamp of repository gentoo: Tue, 21 Mar 2017 20:00:01 +0000

sh bash 4.3_p48-r1

ld GNU ld (Gentoo 2.26.1 p1.0) 2.26.1

app-shells/bash:          4.3_p48-r1::gentoo

dev-lang/perl:            5.22.3_rc4::gentoo

dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo

dev-util/cmake:           3.7.2::gentoo

dev-util/pkgconfig:       0.28-r2::gentoo

sys-apps/baselayout:      2.3::gentoo

sys-apps/openrc:          0.23.2::gentoo

sys-apps/sandbox:         2.10-r3::gentoo

sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo

sys-devel/automake:       1.15::gentoo

sys-devel/binutils:       2.26.1::gentoo

sys-devel/gcc:            4.9.4::gentoo

sys-devel/gcc-config:     1.7.3::gentoo

sys-devel/libtool:        2.4.6-r3::gentoo

sys-devel/make:           4.2.1::gentoo

sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)

sys-libs/glibc:           2.23-r3::gentoo

Repositories:

gentoo

    location: /usr/portage

    sync-type: rsync

    sync-uri: rsync://rsync.gentoo.org/gentoo-portage

    priority: -1000

ACCEPT_KEYWORDS="amd64"

ACCEPT_LICENSE="*"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-march=native -O2 -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/share/config"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo"

CXXFLAGS="-march=native -O2 -pipe"

DISTDIR="/usr/portage/distfiles"

FCFLAGS="-O2 -pipe"

FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"

FFLAGS="-O2 -pipe"

GENTOO_MIRRORS="http://gentoo.mirrors.tds.net/gentoo/"

LANG="en_US.utf8"

LDFLAGS="-Wl,-O1 -Wl,--as-needed"

MAKEOPTS="-j2"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"

PORTAGE_TMPDIR="/var/tmp"

USE="7zip X a52 aac aalib acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam ffmpeg firefox flac fortran ftp gdbm gif glamor gpm gtk iconv inotify ipv6 jpeg lame lcms ldap libnotify mad mng modules mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds qt3support qt4 readline sdl seccomp session smp spell ssl startup-notification svg taglib tcpd tiff truetype udev udisks unicode upower usb v4l v4l2 vcd vorbis wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="evdev" KERNEL="linux" L10N="en en-US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en-US" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21" USERLAND="GNU" VIDEO_CARDS="intel i915" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"

Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

```

```

spB610 dave # env

MANPATH=/usr/local/share/man:/usr/share/man:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.9.4/man:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.26.1/man

SHELL=/bin/bash

TERM=xterm

SSH_CLIENT=192.168.1.158 53746 22

SSH_TTY=/dev/ttyp0

USER=root

LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:

bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:

sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:

*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:

*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:

*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:

*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:

*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:

*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:

*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:

*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:

*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:

*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:

*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:

*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:

*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:

*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:

*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:

*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:

*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:

*.ogx=01;35:*.cfg=00;32:*.conf=00;32:*.diff=00;32:*.doc=00;32:

*.ini=00;32:*.log=00;32:*.patch=00;32:*.pdf=00;32:*.ps=00;32:

*.tex=00;32:*.txt=00;32:*.aac=00;36:*.au=00;36:*.flac=00;36:

*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:

*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:

*.opus=00;36:*.spx=00;36:*.xspf=00;36:

GUILE_LOAD_PATH=/usr/share/guile/1.8

MULTIOSDIRS=../lib64:../lib32

CONFIG_PROTECT_MASK=/etc/gentoo-release /etc/sandbox.d /etc/fonts/fonts.conf /etc/terminfo /etc/dconf /etc/ca-certificates.conf

PAGER=/usr/bin/less

XDG_CONFIG_DIRS=/etc/xdg

PATH=/sbin:/bin:/usr/sbin:/usr/bin

MAIL=/var/mail/dave

LC_COLLATE=C

PWD=/home/dave

EDITOR=/bin/nano

LANG=en_US.utf8

GSETTINGS_BACKEND=dconf

QT_GRAPHICSSYSTEM=raster

HOME=/root

SHLVL=2

MANPAGER=manpager

LOGNAME=root

LESS=-R -M --shift 5

GCC_SPECS=

SSH_CONNECTION=192.168.1.158 53746 192.168.1.107 22

XDG_DATA_DIRS=/usr/local/share:/usr/share

LESSOPEN=|lesspipe %s

INFOPATH=/usr/share/info:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.9.4/info:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.26.1/info

OPENGL_PROFILE=xorg-x11

CONFIG_PROTECT=/usr/share/config

_=/bin/env

```

Broke some (LS_COLORS) lines to make the forum layout behave. —ChiitooLast edited by nobody13 on Wed Mar 22, 2017 1:08 pm; edited 3 times in total

----------

## cboldt

emerge will throw that error if /var/tmp doesn't exist, too.  It makes /var/tmp/portage (or $PORTAGE_TMPDIR/portage), but depends on $PORTAGE_TMPDIR existing in the first place.

----------

## nobody13

var/tmp does exist 

drwxrwxrwt  3 root     root 4096 Mar 21 16:08 tmp

----------

## cboldt

var/tmp and /var/tmp aren't necessarily the same thing.  I'll take your word for it that /var/tmp exists in whatever environment your "mkdir doesn't work" occurs.  I'd be looking at free space there, and any mount details that apply to /var/tmp, before I'd check the mkdir program.  Especially on a report that the program works when applied to different locations.

----------

## nobody13

I manually downloaded the revdep-rebuild script and ran it. It doesn't show anything broken

----------

## nobody13

 *cboldt wrote:*   

> var/tmp and /var/tmp aren't necessarily the same thing.  I'll take your word for it that /var/tmp exists in whatever environment your "mkdir doesn't work" occurs.  I'd be looking at free space there, and any mount details that apply to /var/tmp, before I'd check the mkdir program.  Especially on a report that the program works when applied to different locations.

 

sorry that was a typo. i was referring to ls -1l /var:

```

drwxr-xr-x  7 root     root 4096 Mar 15 20:11 cache

drwxr-xr-x  4 root     root 4096 Mar 22 07:45 db

drwxr-xr-x  2 root     root 4096 Mar 21 16:08 empty

drwxr-xr-x 16 root     root 4096 Mar 21 23:14 lib

lrwxrwxrwx  1 root     root    9 Mar  8 20:26 lock -> /run/lock

drwxr-xr-x  7 root     root 4096 Mar 22 03:11 log

lrwxrwxrwx  1 root     root   15 Mar 15 05:29 mail -> /var/spool/mail

drwxr-xr-x  5 nullmail root 4096 Mar 15 05:43 nullmailer

lrwxrwxrwx  1 root     root    4 Mar  8 20:26 run -> /run

drwxr-xr-x  5 root     root 4096 Mar 15 19:36 spool

drwxrwxrwt  3 root     root 4096 Mar 21 16:08 tmp
```

when you say freespace do you mean df: ?

```
Filesystem     1K-blocks    Used Available Use% Mounted on

/dev/sdb2       20511356 8400140  11046256  44% /

tmpfs             332512     432    332080   1% /run

dev                10240       0     10240   0% /dev

cgroup_root        10240       0     10240   0% /sys/fs/cgroup

/dev/sdb1         253871   10710    230054   5% /boot

```

Last edited by nobody13 on Wed Mar 22, 2017 12:48 pm; edited 1 time in total

----------

## cboldt

Are those the values you get from your chroot environment?

And what does `df` show?

----------

## nobody13

no i rebooted back to normal env when chroot didnt help. i posted df above

----------

## cboldt

You don't have to reboot to get out of chroot, just `exit`.

My impression is that mkdir works fine when you are not in chroot.  You made /mnt/gentoo/home/dave/aaa

Further, my impression is that mkdir doesn't work "sometimes," and I'm trying to get a handle on what those "sometimes" are.

You seem to have plenty of room on /dev/sdb2; but I do not assume that /mnt/gentoo exists on that device.  /mnt/gentoo is a creation (usually) of sysrescuecd.

----------

## nobody13

It seems to not work at all unless i boot from external media. i used the gentoo minimal disk to start up (and from there mkdir functioned normally) then chrooted into my normal enviroment hoping that i could run revdep -rebuild from there and install missing files. It didnt work so rebooted

----------

## limn

```
ls -l `which mkdir`
```

in chroot.

----------

## John R. Graham

 *khayyam wrote:*   

> ... please provide the output of 'emerge --info', 'env', and (if you have strace) 'strace mkdir /tmp/test'. ...

 Even without strace, the output of

```
mkdir /tmp/test
```

run from a properly established chroot would perhaps help us. Also show us the steps you use to establish the chroot.

- John

----------

## nobody13

I don't have strace. 

here's the other :

spB610 dave # mkdir /tmp/test

spB610 dave # ls /tmp

spB610 dave # ls /tmp/test

ls: cannot access '/tmp/test': No such file or directory

spB610 dave # 

it was the same when I chrooted into this env. It doesn't give an error. It acts like it's working. It just doesn't do anything. I can copy and create files, just not directories.

----------

## nobody13

heres my last activity before things went south. I installed sddm and started x. my keyboard and mouse didnt work in x so i installed a couple of usb packages then it quit working.

```
1490151026: Started emerge on: Mar 21, 2017 22:50:25

1490151026:  *** emerge --ask --verbose sddm

1490151063:  >>> emerge (1 of 19) dev-python/docutils-0.12 to /

1490151063:  === (1 of 19) Cleaning (dev-python/docutils-0.12::/usr/portage/dev-python/docutils/docutils-0.12.ebuild)

1490151063:  === (1 of 19) Compiling/Merging (dev-python/docutils-0.12::/usr/portage/dev-python/docutils/docutils-0.12.ebuild)

1490151273:  === (1 of 19) Merging (dev-python/docutils-0.12::/usr/portage/dev-python/docutils/docutils-0.12.ebuild)

1490151282:  >>> AUTOCLEAN: dev-python/docutils:0

1490151285:  === (1 of 19) Post-Build Cleaning (dev-python/docutils-0.12::/usr/portage/dev-python/docutils/docutils-0.12.ebuild)

1490151285:  ::: completed emerge (1 of 19) dev-python/docutils-0.12 to /

1490151285:  >>> emerge (2 of 19) x11-proto/fontsproto-2.1.3 to /

1490151285:  === (2 of 19) Cleaning (x11-proto/fontsproto-2.1.3::/usr/portage/x11-proto/fontsproto/fontsproto-2.1.3.ebuild)

1490151285:  === (2 of 19) Compiling/Merging (x11-proto/fontsproto-2.1.3::/usr/portage/x11-proto/fontsproto/fontsproto-2.1.3.ebuild)

1490151304:  === (2 of 19) Merging (x11-proto/fontsproto-2.1.3::/usr/portage/x11-proto/fontsproto/fontsproto-2.1.3.ebuild)

1490151307:  >>> AUTOCLEAN: x11-proto/fontsproto:0

1490151310:  === (2 of 19) Post-Build Cleaning (x11-proto/fontsproto-2.1.3::/usr/portage/x11-proto/fontsproto/fontsproto-2.1.3.ebuild)

1490151310:  ::: completed emerge (2 of 19) x11-proto/fontsproto-2.1.3 to /

1490151310:  >>> emerge (3 of 19) x11-misc/xbitmaps-1.1.1-r1 to /

1490151310:  === (3 of 19) Cleaning (x11-misc/xbitmaps-1.1.1-r1::/usr/portage/x11-misc/xbitmaps/xbitmaps-1.1.1-r1.ebuild)

1490151310:  === (3 of 19) Compiling/Merging (x11-misc/xbitmaps-1.1.1-r1::/usr/portage/x11-misc/xbitmaps/xbitmaps-1.1.1-r1.ebuild)

1490151325:  === (3 of 19) Merging (x11-misc/xbitmaps-1.1.1-r1::/usr/portage/x11-misc/xbitmaps/xbitmaps-1.1.1-r1.ebuild)

1490151327:  >>> AUTOCLEAN: x11-misc/xbitmaps:0

1490151330:  === (3 of 19) Post-Build Cleaning (x11-misc/xbitmaps-1.1.1-r1::/usr/portage/x11-misc/xbitmaps/xbitmaps-1.1.1-r1.ebuild)

1490151330:  ::: completed emerge (3 of 19) x11-misc/xbitmaps-1.1.1-r1 to /

1490151330:  >>> emerge (4 of 19) x11-proto/bigreqsproto-1.1.2 to /

1490151330:  === (4 of 19) Cleaning (x11-proto/bigreqsproto-1.1.2::/usr/portage/x11-proto/bigreqsproto/bigreqsproto-1.1.2.ebuild)

1490151330:  === (4 of 19) Compiling/Merging (x11-proto/bigreqsproto-1.1.2::/usr/portage/x11-proto/bigreqsproto/bigreqsproto-1.1.2.ebuild)

1490151349:  === (4 of 19) Merging (x11-proto/bigreqsproto-1.1.2::/usr/portage/x11-proto/bigreqsproto/bigreqsproto-1.1.2.ebuild)

1490151352:  >>> AUTOCLEAN: x11-proto/bigreqsproto:0

1490151355:  === (4 of 19) Post-Build Cleaning (x11-proto/bigreqsproto-1.1.2::/usr/portage/x11-proto/bigreqsproto/bigreqsproto-1.1.2.ebuild)

1490151355:  ::: completed emerge (4 of 19) x11-proto/bigreqsproto-1.1.2 to /

1490151355:  >>> emerge (5 of 19) x11-proto/xcmiscproto-1.2.2 to /

1490151355:  === (5 of 19) Cleaning (x11-proto/xcmiscproto-1.2.2::/usr/portage/x11-proto/xcmiscproto/xcmiscproto-1.2.2.ebuild)

1490151355:  === (5 of 19) Compiling/Merging (x11-proto/xcmiscproto-1.2.2::/usr/portage/x11-proto/xcmiscproto/xcmiscproto-1.2.2.ebuild)

1490151374:  === (5 of 19) Merging (x11-proto/xcmiscproto-1.2.2::/usr/portage/x11-proto/xcmiscproto/xcmiscproto-1.2.2.ebuild)

1490151377:  >>> AUTOCLEAN: x11-proto/xcmiscproto:0

1490151380:  === (5 of 19) Post-Build Cleaning (x11-proto/xcmiscproto-1.2.2::/usr/portage/x11-proto/xcmiscproto/xcmiscproto-1.2.2.ebuild)

1490151380:  ::: completed emerge (5 of 19) x11-proto/xcmiscproto-1.2.2 to /

1490151380:  >>> emerge (6 of 19) x11-proto/xf86dgaproto-2.1-r2 to /

1490151380:  === (6 of 19) Cleaning (x11-proto/xf86dgaproto-2.1-r2::/usr/portage/x11-proto/xf86dgaproto/xf86dgaproto-2.1-r2.ebuild)

1490151380:  === (6 of 19) Compiling/Merging (x11-proto/xf86dgaproto-2.1-r2::/usr/portage/x11-proto/xf86dgaproto/xf86dgaproto-2.1-r2.ebuild)

1490151396:  === (6 of 19) Merging (x11-proto/xf86dgaproto-2.1-r2::/usr/portage/x11-proto/xf86dgaproto/xf86dgaproto-2.1-r2.ebuild)

1490151399:  >>> AUTOCLEAN: x11-proto/xf86dgaproto:0

1490151402:  === (6 of 19) Post-Build Cleaning (x11-proto/xf86dgaproto-2.1-r2::/usr/portage/x11-proto/xf86dgaproto/xf86dgaproto-2.1-r2.ebuild)

1490151402:  ::: completed emerge (6 of 19) x11-proto/xf86dgaproto-2.1-r2 to /

1490151402:  >>> emerge (7 of 19) x11-proto/xf86rushproto-1.1.2-r1 to /

1490151402:  === (7 of 19) Cleaning (x11-proto/xf86rushproto-1.1.2-r1::/usr/portage/x11-proto/xf86rushproto/xf86rushproto-1.1.2-r1.ebuild)

1490151402:  === (7 of 19) Compiling/Merging (x11-proto/xf86rushproto-1.1.2-r1::/usr/portage/x11-proto/xf86rushproto/xf86rushproto-1.1.2-r1.ebuild)

1490151413:  === (7 of 19) Merging (x11-proto/xf86rushproto-1.1.2-r1::/usr/portage/x11-proto/xf86rushproto/xf86rushproto-1.1.2-r1.ebuild)

1490151416:  >>> AUTOCLEAN: x11-proto/xf86rushproto:0

1490151419:  === (7 of 19) Post-Build Cleaning (x11-proto/xf86rushproto-1.1.2-r1::/usr/portage/x11-proto/xf86rushproto/xf86rushproto-1.1.2-r1.ebuild)

1490151419:  ::: completed emerge (7 of 19) x11-proto/xf86rushproto-1.1.2-r1 to /

1490151419:  >>> emerge (8 of 19) x11-proto/trapproto-3.4.3 to /

1490151419:  === (8 of 19) Cleaning (x11-proto/trapproto-3.4.3::/usr/portage/x11-proto/trapproto/trapproto-3.4.3.ebuild)

1490151419:  === (8 of 19) Compiling/Merging (x11-proto/trapproto-3.4.3::/usr/portage/x11-proto/trapproto/trapproto-3.4.3.ebuild)

1490151431:  === (8 of 19) Merging (x11-proto/trapproto-3.4.3::/usr/portage/x11-proto/trapproto/trapproto-3.4.3.ebuild)

1490151434:  >>> AUTOCLEAN: x11-proto/trapproto:0

1490151436:  === (8 of 19) Post-Build Cleaning (x11-proto/trapproto-3.4.3::/usr/portage/x11-proto/trapproto/trapproto-3.4.3.ebuild)

1490151436:  ::: completed emerge (8 of 19) x11-proto/trapproto-3.4.3 to /

1490151436:  >>> emerge (9 of 19) x11-apps/rgb-1.0.6 to /

1490151436:  === (9 of 19) Cleaning (x11-apps/rgb-1.0.6::/usr/portage/x11-apps/rgb/rgb-1.0.6.ebuild)

1490151437:  === (9 of 19) Compiling/Merging (x11-apps/rgb-1.0.6::/usr/portage/x11-apps/rgb/rgb-1.0.6.ebuild)

1490151456:  === (9 of 19) Merging (x11-apps/rgb-1.0.6::/usr/portage/x11-apps/rgb/rgb-1.0.6.ebuild)

1490151459:  >>> AUTOCLEAN: x11-apps/rgb:0

1490151461:  === (9 of 19) Post-Build Cleaning (x11-apps/rgb-1.0.6::/usr/portage/x11-apps/rgb/rgb-1.0.6.ebuild)

1490151461:  ::: completed emerge (9 of 19) x11-apps/rgb-1.0.6 to /

1490151461:  >>> emerge (10 of 19) x11-libs/libpciaccess-0.13.4 to /

1490151461:  === (10 of 19) Cleaning (x11-libs/libpciaccess-0.13.4::/usr/portage/x11-libs/libpciaccess/libpciaccess-0.13.4.ebuild)

1490151462:  === (10 of 19) Compiling/Merging (x11-libs/libpciaccess-0.13.4::/usr/portage/x11-libs/libpciaccess/libpciaccess-0.13.4.ebuild)

1490151491:  === (10 of 19) Merging (x11-libs/libpciaccess-0.13.4::/usr/portage/x11-libs/libpciaccess/libpciaccess-0.13.4.ebuild)

1490151494:  >>> AUTOCLEAN: x11-libs/libpciaccess:0

1490151497:  === (10 of 19) Post-Build Cleaning (x11-libs/libpciaccess-0.13.4::/usr/portage/x11-libs/libpciaccess/libpciaccess-0.13.4.ebuild)

1490151497:  ::: completed emerge (10 of 19) x11-libs/libpciaccess-0.13.4 to /

1490151497:  >>> emerge (11 of 19) x11-proto/resourceproto-1.2.0 to /

1490151497:  === (11 of 19) Cleaning (x11-proto/resourceproto-1.2.0::/usr/portage/x11-proto/resourceproto/resourceproto-1.2.0.ebuild)

1490151497:  === (11 of 19) Compiling/Merging (x11-proto/resourceproto-1.2.0::/usr/portage/x11-proto/resourceproto/resourceproto-1.2.0.ebuild)

1490151512:  === (11 of 19) Merging (x11-proto/resourceproto-1.2.0::/usr/portage/x11-proto/resourceproto/resourceproto-1.2.0.ebuild)

1490151514:  >>> AUTOCLEAN: x11-proto/resourceproto:0

1490151517:  === (11 of 19) Post-Build Cleaning (x11-proto/resourceproto-1.2.0::/usr/portage/x11-proto/resourceproto/resourceproto-1.2.0.ebuild)

1490151517:  ::: completed emerge (11 of 19) x11-proto/resourceproto-1.2.0 to /

1490151517:  >>> emerge (12 of 19) x11-apps/xkbcomp-1.3.1 to /

1490151517:  === (12 of 19) Cleaning (x11-apps/xkbcomp-1.3.1::/usr/portage/x11-apps/xkbcomp/xkbcomp-1.3.1.ebuild)

1490151518:  === (12 of 19) Compiling/Merging (x11-apps/xkbcomp-1.3.1::/usr/portage/x11-apps/xkbcomp/xkbcomp-1.3.1.ebuild)

1490151543:  === (12 of 19) Merging (x11-apps/xkbcomp-1.3.1::/usr/portage/x11-apps/xkbcomp/xkbcomp-1.3.1.ebuild)

1490151545:  >>> AUTOCLEAN: x11-apps/xkbcomp:0

1490151548:  === (12 of 19) Post-Build Cleaning (x11-apps/xkbcomp-1.3.1::/usr/portage/x11-apps/xkbcomp/xkbcomp-1.3.1.ebuild)

1490151548:  ::: completed emerge (12 of 19) x11-apps/xkbcomp-1.3.1 to /

1490151548:  >>> emerge (13 of 19) x11-apps/iceauth-1.0.7 to /

1490151548:  === (13 of 19) Cleaning (x11-apps/iceauth-1.0.7::/usr/portage/x11-apps/iceauth/iceauth-1.0.7.ebuild)

1490151548:  === (13 of 19) Compiling/Merging (x11-apps/iceauth-1.0.7::/usr/portage/x11-apps/iceauth/iceauth-1.0.7.ebuild)

1490151568:  === (13 of 19) Merging (x11-apps/iceauth-1.0.7::/usr/portage/x11-apps/iceauth/iceauth-1.0.7.ebuild)

1490151570:  >>> AUTOCLEAN: x11-apps/iceauth:0

1490151573:  === (13 of 19) Post-Build Cleaning (x11-apps/iceauth-1.0.7::/usr/portage/x11-apps/iceauth/iceauth-1.0.7.ebuild)

1490151573:  ::: completed emerge (13 of 19) x11-apps/iceauth-1.0.7 to /

1490151573:  >>> emerge (14 of 19) x11-apps/xrdb-1.1.0 to /

1490151573:  === (14 of 19) Cleaning (x11-apps/xrdb-1.1.0::/usr/portage/x11-apps/xrdb/xrdb-1.1.0.ebuild)

1490151573:  === (14 of 19) Compiling/Merging (x11-apps/xrdb-1.1.0::/usr/portage/x11-apps/xrdb/xrdb-1.1.0.ebuild)

1490151594:  === (14 of 19) Merging (x11-apps/xrdb-1.1.0::/usr/portage/x11-apps/xrdb/xrdb-1.1.0.ebuild)

1490151597:  >>> AUTOCLEAN: x11-apps/xrdb:0

1490151600:  === (14 of 19) Post-Build Cleaning (x11-apps/xrdb-1.1.0::/usr/portage/x11-apps/xrdb/xrdb-1.1.0.ebuild)

1490151600:  ::: completed emerge (14 of 19) x11-apps/xrdb-1.1.0 to /

1490151600:  >>> emerge (15 of 19) sys-power/upower-0.99.4 to /

1490151600:  === (15 of 19) Cleaning (sys-power/upower-0.99.4::/usr/portage/sys-power/upower/upower-0.99.4.ebuild)

1490151600:  === (15 of 19) Compiling/Merging (sys-power/upower-0.99.4::/usr/portage/sys-power/upower/upower-0.99.4.ebuild)

1490151639:  === (15 of 19) Merging (sys-power/upower-0.99.4::/usr/portage/sys-power/upower/upower-0.99.4.ebuild)

1490151642:  >>> AUTOCLEAN: sys-power/upower:0

1490151645:  === (15 of 19) Post-Build Cleaning (sys-power/upower-0.99.4::/usr/portage/sys-power/upower/upower-0.99.4.ebuild)

1490151645:  ::: completed emerge (15 of 19) sys-power/upower-0.99.4 to /

1490151645:  >>> emerge (16 of 19) x11-libs/libXfont2-2.0.1 to /

1490151645:  === (16 of 19) Cleaning (x11-libs/libXfont2-2.0.1::/usr/portage/x11-libs/libXfont2/libXfont2-2.0.1.ebuild)

1490151645:  === (16 of 19) Compiling/Merging (x11-libs/libXfont2-2.0.1::/usr/portage/x11-libs/libXfont2/libXfont2-2.0.1.ebuild)

1490151689:  === (16 of 19) Merging (x11-libs/libXfont2-2.0.1::/usr/portage/x11-libs/libXfont2/libXfont2-2.0.1.ebuild)

1490151691:  >>> AUTOCLEAN: x11-libs/libXfont2:0

1490151694:  === (16 of 19) Post-Build Cleaning (x11-libs/libXfont2-2.0.1::/usr/portage/x11-libs/libXfont2/libXfont2-2.0.1.ebuild)

1490151694:  ::: completed emerge (16 of 19) x11-libs/libXfont2-2.0.1 to /

1490151694:  >>> emerge (17 of 19) x11-apps/xinit-1.3.4-r1 to /

1490151694:  === (17 of 19) Cleaning (x11-apps/xinit-1.3.4-r1::/usr/portage/x11-apps/xinit/xinit-1.3.4-r1.ebuild)

1490151694:  === (17 of 19) Compiling/Merging (x11-apps/xinit-1.3.4-r1::/usr/portage/x11-apps/xinit/xinit-1.3.4-r1.ebuild)

1490151714:  === (17 of 19) Merging (x11-apps/xinit-1.3.4-r1::/usr/portage/x11-apps/xinit/xinit-1.3.4-r1.ebuild)

1490151717:  >>> AUTOCLEAN: x11-apps/xinit:0

1490151720:  === (17 of 19) Post-Build Cleaning (x11-apps/xinit-1.3.4-r1::/usr/portage/x11-apps/xinit/xinit-1.3.4-r1.ebuild)

1490151720:  ::: completed emerge (17 of 19) x11-apps/xinit-1.3.4-r1 to /

1490151720:  >>> emerge (18 of 19) x11-base/xorg-server-1.19.2 to /

1490151720:  === (18 of 19) Cleaning (x11-base/xorg-server-1.19.2::/usr/portage/x11-base/xorg-server/xorg-server-1.19.2.ebuild)

1490151720:  === (18 of 19) Compiling/Merging (x11-base/xorg-server-1.19.2::/usr/portage/x11-base/xorg-server/xorg-server-1.19.2.ebuild)

1490152301:  === (18 of 19) Merging (x11-base/xorg-server-1.19.2::/usr/portage/x11-base/xorg-server/xorg-server-1.19.2.ebuild)

1490152304:  >>> AUTOCLEAN: x11-base/xorg-server:0

1490152308:  === (18 of 19) Post-Build Cleaning (x11-base/xorg-server-1.19.2::/usr/portage/x11-base/xorg-server/xorg-server-1.19.2.ebuild)

1490152308:  ::: completed emerge (18 of 19) x11-base/xorg-server-1.19.2 to /

1490152308:  >>> emerge (19 of 19) x11-misc/sddm-0.14.0-r2 to /

1490152308:  === (19 of 19) Cleaning (x11-misc/sddm-0.14.0-r2::/usr/portage/x11-misc/sddm/sddm-0.14.0-r2.ebuild)

1490152309:  === (19 of 19) Compiling/Merging (x11-misc/sddm-0.14.0-r2::/usr/portage/x11-misc/sddm/sddm-0.14.0-r2.ebuild)

1490152453:  === (19 of 19) Merging (x11-misc/sddm-0.14.0-r2::/usr/portage/x11-misc/sddm/sddm-0.14.0-r2.ebuild)

1490152455:  >>> AUTOCLEAN: x11-misc/sddm:0

1490152459:  === (19 of 19) Updating world file (x11-misc/sddm-0.14.0-r2)

1490152459:  === (19 of 19) Post-Build Cleaning (x11-misc/sddm-0.14.0-r2::/usr/portage/x11-misc/sddm/sddm-0.14.0-r2.ebuild)

1490152459:  ::: completed emerge (19 of 19) x11-misc/sddm-0.14.0-r2 to /

1490152459:  *** Finished. Cleaning up...

1490152460:  *** exiting successfully.

1490152461:  *** terminating.

1490153626: Started emerge on: Mar 21, 2017 23:33:46

1490153626:  *** emerge --ask --oneshot --verbose virtual/libusb dev-libs/libusb

1490153661:  >>> emerge (1 of 2) dev-libs/libusb-1.0.19-r1 to /

1490153661:  === (1 of 2) Cleaning (dev-libs/libusb-1.0.19-r1::/usr/portage/dev-libs/libusb/libusb-1.0.19-r1.ebuild)

1490153661:  === (1 of 2) Compiling/Merging (dev-libs/libusb-1.0.19-r1::/usr/portage/dev-libs/libusb/libusb-1.0.19-r1.ebuild)

1490153688:  === (1 of 2) Merging (dev-libs/libusb-1.0.19-r1::/usr/portage/dev-libs/libusb/libusb-1.0.19-r1.ebuild)

1490153695:  >>> AUTOCLEAN: dev-libs/libusb:1

1490153695:  === Unmerging... (dev-libs/libusb-1.0.19-r1)

1490153699:  >>> unmerge success: dev-libs/libusb-1.0.19-r1

1490153702:  === (1 of 2) Post-Build Cleaning (dev-libs/libusb-1.0.19-r1::/usr/portage/dev-libs/libusb/libusb-1.0.19-r1.ebuild)

1490153702:  ::: completed emerge (1 of 2) dev-libs/libusb-1.0.19-r1 to /

1490153702:  >>> emerge (2 of 2) virtual/libusb-1-r2 to /

1490153702:  === (2 of 2) Cleaning (virtual/libusb-1-r2::/usr/portage/virtual/libusb/libusb-1-r2.ebuild)

1490153702:  === (2 of 2) Compiling/Merging (virtual/libusb-1-r2::/usr/portage/virtual/libusb/libusb-1-r2.ebuild)

1490153709:  === (2 of 2) Merging (virtual/libusb-1-r2::/usr/portage/virtual/libusb/libusb-1-r2.ebuild)

1490153712:  >>> AUTOCLEAN: virtual/libusb:1

1490153712:  === Unmerging... (virtual/libusb-1-r2)

1490153715:  >>> unmerge success: virtual/libusb-1-r2

1490153718:  === (2 of 2) Post-Build Cleaning (virtual/libusb-1-r2::/usr/portage/virtual/libusb/libusb-1-r2.ebuild)

1490153718:  ::: completed emerge (2 of 2) virtual/libusb-1-r2 to /

1490153718:  *** Finished. Cleaning up...

1490153719:  *** exiting successfully.

1490153719:  *** terminating.
```

----------

## cboldt

When you "reboot," what do you "reboot" from?  /dev/sdb1, mounted at /boot off off (root filesystem) /dev/sdb2?

Just want to clarify the environment that has the trouble.  There may be some setting (permissions) on /tmp that preclude creation of directories.  And you say you can create a file in /tmp, but I don't recall reading an experiment that proved this.

Also, the UID of the user doing this "failed mkdir" may be pertinent.  Are you running the mkdir command as root, or as some other user?

For us to see what is going on, either `ls -a -l /tmp`, or `stat /tmp` is much better than plain `ls`

I do agree, absence of failure report from mkdir is weird at best.  mkdir here reports a variety of errors.

```
mkdir: cannot create directory ‘/tmp/goober/stuff’: No such file or directory

mkdir: cannot create directory ‘/root/goober’: Permission denied
```

----------

## cboldt

I think your emerge activity is unrelated.  You may be having a hardware failure, and your /bin/mkdir is a casualty.  Or somebody has intruded and substituted a mkdir.

My system has the following details ...

```
> ls -l /bin/mkdir

-rwxr-xr-x 1 root root 46732 Dec  3 04:50 /bin/mkdir

> grep /bin/mkdir /var/db/pkg/*/*/CONTENTS

/var/db/pkg/sys-apps/coreutils-8.25/CONTENTS:obj /bin/mkdir 5b4a1737fdd7c65245113127b1f90d56 1480758635

> md5sum /bin/mkdir

5b4a1737fdd7c65245113127b1f90d56  /bin/mkdir
```

----------

## nobody13

Grub is installed on sda.

fdisk -l :

```

Disk /dev/sda: 111.8 GiB, 120034123776 bytes, 234441648 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disklabel type: gpt

Disk identifier: FAEACC2F-E919-4B1E-8AA6-8646ACB2C680

Device        Start       End   Sectors  Size Type

/dev/sda1     16384    540671    524288  256M BIOS boot

/dev/sda2    540672   2113535   1572864  768M EFI System

/dev/sda3   2113536   6307839   4194304    2G Linux swap

/dev/sda4   6307840  39075839  32768000 15.6G Linux filesystem

/dev/sda5  39075840  71843839  32768000 15.6G Linux filesystem

/dev/sda6  71843840 234440703 162596864 77.5G Linux filesystem

Disk /dev/sdb: 298.1 GiB, 320072933376 bytes, 625142448 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disklabel type: gpt

Disk identifier: FCA7715C-DBB5-485D-93DA-1093FD827B4D

Device        Start       End   Sectors   Size Type

/dev/sdb1     16384    540671    524288   256M Linux filesystem

/dev/sdb2    540672  42483711  41943040    20G Linux filesystem

/dev/sdb3  42483712 625141759 582658048 277.9G Linux filesystem

```

Fstab:

```

# <fs>                                                  <mountpoint>    <type>              <opts>              <dump/pass>

#boot=sdb1

UUID=f6d0e5ee-73e9-4611-a7c9-1101e9a75e9a               /boot           ext2            noatime                    1   2

#root=/sdb2

UUID=0cf488fb-9ff5-4548-97da-7595e7aa2310               /               ext4            noatime                    0   1

#swap=sda3

UUID=25308293-410e-48fe-9ef0-7970c533f21d               none            swap            sw                         0   0

#DvD

/dev/cdrom                                              /mnt/cdrom      auto            noauto                     0   0

#mythubuntu boot=sda2

UUID=0d9c8e59-23a1-483f-a3ef-a73bc891a7cb               /mnt/boot       ext2            noauto,noatime             1   2

```

mtab:

```

/dev/sdb2 / ext4 rw,noatime,data=ordered 0 0

proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0

tmpfs /run tmpfs rw,nodev,relatime,size=332512k,mode=755 0 0

dev /dev devtmpfs rw,nosuid,relatime,size=10240k,nr_inodes=415257,mode=755 0 0

sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0

debugfs /sys/kernel/debug debugfs rw,nosuid,nodev,noexec,relatime 0 0

cgroup_root /sys/fs/cgroup tmpfs rw,nosuid,nodev,noexec,relatime,size=10240k,mode=755 0 0

/dev/sdb1 /boot ext2 rw,noatime,errors=continue 0 0

binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,nosuid,nodev,noexec,relatime 0 0

```

----------

## nobody13

 *cboldt wrote:*   

> I think your emerge activity is unrelated.  You may be having a hardware failure, and your /bin/mkdir is a casualty.  Or somebody has intruded and substituted a mkdir.
> 
> My system has the following details ...
> 
> ```
> ...

 

You might have something there :

spB610 log # ls -l /bin/mkdir

-rwxr-xr-x 1 root root 0 Mar 21 23:44 /bin/mkdir

spB610 log #  grep /bin/mkdir /var/db/pkg/*/*/CONTENTS

/var/db/pkg/sys-apps/coreutils-8.25/CONTENTS:obj /bin/mkdir c8f03ee95baaecb99f0af135f4264abd 1489032341

spB610 log # md5sum /bin/mkdir

d41d8cd98f00b204e9800998ecf8427e  /bin/mkdir

0 kb And they dont match

----------

## cboldt

From your mtab (the command `mount` would give similar but more info), /dev/sdb2 is what one would expect.  It holds /tmp, /bin (and other directories, including a mount point /boot to attach /dev/sdb1).

Further, /dev/sdb2 is mounted read-write (rw), so that setting isn't the cause of trouble.

In addition to my previous (examining /bin/mkdir), the thread includes a suggestion to show what is actually running when you command `mkdir` ... what does `which mkdir` show? (or bash built-in equivalents, `command -v mkdir` and `hash -l`)

----------

## cboldt

Yeah, well, a zero byte file there explains something.  It doesn't  though, explain how that file came to be zero bytes, and you need to be be concerned that there is another file by that name that is running.  Not saying there is, just prove it one way or the other.

----------

## John R. Graham

Interesting experimental results here:

```
~ $ touch mkdir

~ $ chmod +x mkdir

~ $ ls -l mkdir

-rwxr-xr-x 1 johngrah johngrah 0 Mar 22 09:58 mkdir

~ $ ./mkdir

~ $ 
```

I wouldn't've expected that. Still leaves the mystery: how did it get that way?

- John

----------

## nobody13

I hope its not some hacker's dirty trick but i'm leaning more to some kind of corruption from failing hardware. It was running unstable do to overheating a couple days ago but i thought i had that worked out. Now i have to figure out a way to reinstall mkdir with out re-emerging because emerge cant make temporary work directories.

----------

## cboldt

I'd like to figure out if the zeroing of /bin/mkdir coincided, timing wise, with your emerge activity.  I don't know your time zone, but your emerge is time coded.  These are the start and end times ...

```
> date -d @1490151026

Tue Mar 21 22:50:26 EDT 2017

>date -d @1490153719

Tue Mar 21 23:35:19 EDT 2017
```

Meanwhile, the timestamp on /bin/mkdir is Mar 21 23:44

----------

## cboldt

If you suspect hardware failure, get a copy ofsmartmontools and check the drive.  I believe sysrescuecd has this.  If the drive is failing, DO NOT WRITE TO IT!  You want to preserve as much of it as you can.

If the drive is okay, and you want to just restore coreutils, you can get that in binary form - might be so on the minimal install, if not, just grab a copy from https://packages.gentoo.org/packages/sys-apps/coreutils

----------

## nobody13

look at the time stamp on the file and then look at my emerge log could one of these packages be the cause of it ?

rwxr-xr-x 1 root root       0 Mar 21 23:44 mkdir

```
1490153626: Started emerge on: Mar 21, 2017 23:33:46

1490153626:  *** emerge --ask --oneshot --verbose virtual/libusb dev-libs/libusb

1490153661:  >>> emerge (1 of 2) dev-libs/libusb-1.0.19-r1 to /

1490153661:  === (1 of 2) Cleaning (dev-libs/libusb-1.0.19-r1::/usr/portage/dev-libs/libusb/libusb-1.0.19-r1.ebuild)

1490153661:  === (1 of 2) Compiling/Merging (dev-libs/libusb-1.0.19-r1::/usr/portage/dev-libs/libusb/libusb-1.0.19-r1.ebuild)

1490153688:  === (1 of 2) Merging (dev-libs/libusb-1.0.19-r1::/usr/portage/dev-libs/libusb/libusb-1.0.19-r1.ebuild)

1490153695:  >>> AUTOCLEAN: dev-libs/libusb:1

1490153695:  === Unmerging... (dev-libs/libusb-1.0.19-r1)

1490153699:  >>> unmerge success: dev-libs/libusb-1.0.19-r1

1490153702:  === (1 of 2) Post-Build Cleaning (dev-libs/libusb-1.0.19-r1::/usr/portage/dev-libs/libusb/libusb-1.0.19-r1.ebuild)

1490153702:  ::: completed emerge (1 of 2) dev-libs/libusb-1.0.19-r1 to /

1490153702:  >>> emerge (2 of 2) virtual/libusb-1-r2 to /

1490153702:  === (2 of 2) Cleaning (virtual/libusb-1-r2::/usr/portage/virtual/libusb/libusb-1-r2.ebuild)

1490153702:  === (2 of 2) Compiling/Merging (virtual/libusb-1-r2::/usr/portage/virtual/libusb/libusb-1-r2.ebuild)

1490153709:  === (2 of 2) Merging (virtual/libusb-1-r2::/usr/portage/virtual/libusb/libusb-1-r2.ebuild)

1490153712:  >>> AUTOCLEAN: virtual/libusb:1

1490153712:  === Unmerging... (virtual/libusb-1-r2)

1490153715:  >>> unmerge success: virtual/libusb-1-r2

1490153718:  === (2 of 2) Post-Build Cleaning (virtual/libusb-1-r2::/usr/portage/virtual/libusb/libusb-1-r2.ebuild)

1490153718:  ::: completed emerge (2 of 2) virtual/libusb-1-r2 to /

1490153718:  *** Finished. Cleaning up...

1490153719:  *** exiting successfully.

1490153719:  *** terminating.
```

----------

## cboldt

I'm not surprised at all at being able to create a zero byte "executable" file of any name, using "touch" and "chmod."  But only root should be able to do so in /bin, /sbin, and assorted other OS directories.

----------

## nobody13

just noticed you a step ahead of me

----------

## John R. Graham

No. mkdir is part of coreutils. Also, the emerge log snippet you listed starts after the modify date of mkdir.

- John

----------

## John R. Graham

 *cboldt wrote:*   

> I'm not surprised at all at being able to create a zero byte "executable" file of any name, using "touch" and "chmod."  But only root should be able to do so in /bin, /sbin, and assorted other OS directories.

 Yeah, agreed, but what I'm surprised about is that the shell passes it without comment.

- John

----------

## nobody13

there's this too, I misread the time on the other part.

```

1490154244: Started emerge on: Mar 21, 2017 23:44:03

1490154244:  *** emerge  x11-drivers/xf86-input-mouse

1490154249:  >>> emerge (1 of 1) x11-drivers/xf86-input-mouse-1.9.2 to /

1490154249:  === (1 of 1) Cleaning (x11-drivers/xf86-input-mouse-1.9.2::/usr/portage/x11-drivers/xf86-input-mouse/xf86-input-mouse-1.9.2.ebuild)

1490154249:  === (1 of 1) Compiling/Merging (x11-drivers/xf86-input-mouse-1.9.2::/usr/portage/x11-drivers/xf86-input-mouse/xf86-input-mouse-1.9.2.ebuild)

1490154278:  === (1 of 1) Merging (x11-drivers/xf86-input-mouse-1.9.2::/usr/portage/x11-drivers/xf86-input-mouse/xf86-input-mouse-1.9.2.ebuild)

1490154281:  >>> AUTOCLEAN: x11-drivers/xf86-input-mouse:0

1490154284:  === (1 of 1) Updating world file (x11-drivers/xf86-input-mouse-1.9.2)

1490154284:  === (1 of 1) Post-Build Cleaning (x11-drivers/xf86-input-mouse-1.9.2::/usr/portage/x11-drivers/xf86-input-mouse/xf86-input-mouse-1.9.2.ebuild)

1490154284:  ::: completed emerge (1 of 1) x11-drivers/xf86-input-mouse-1.9.2 to /

1490154284:  *** Finished. Cleaning up...

1490154286:  *** exiting successfully.

1490154286:  *** terminating.
```

----------

## cboldt

I just realized that the time on /bin/mkdir CAN'T be within that emerge window, no matter what.  The emerge window runs from 50 minutes in one hour to 33 minutes in the next hour.  The emerge activity did not run at all across any "44 minutes after the hour" line.

Edit to modify, "that emerge window" was the one you presented earlier, not the one just above.  The one just above squarely fits the timestamp on /bin/mkdir.

----------

## limn

 *Quote:*   

> some kind of corruption from failing hardware.

  zeroing a file is extremely unlikely.

You might check your command line history.

----------

## nobody13

That was also the last successful emerge.

the next entry

```
Started emerge on: Mar 21, 2017 23:59:13

1490155154:  *** emerge --verbose --ask dev-libs/libevdev

1490155155:  *** terminating.
```

----------

## cboldt

Very good point that zeroing a file is not going to happen on account of failing hardware.  In my defense, I made the "failing hardware" remark before I was told that /bin/mkdir was a zero byte file.

As for xf86-input-mouse being the culprit, I last emerged that a week ago, and checking the emerge logs for reference to "mkdir" I see nothing out of the ordinary.

```
> grep mkdir /var/log/portage/*xf86-input-mouse*

/var/log/portage/x11-drivers:xf86-input-mouse-1.9.2:20170315-215112.log:checking for a thread-safe mkdir -p... /bin/mkdir -p

 [followed by four invocations of /bin/mkdir]
```

For the OP, checking command line history is easy, `history | grep mkdir` will probably have plenty of recent stuff showing your investigation.  But a check of command line history is very limited.

----------

## nobody13

i know what could have happened. I was using putty and went to copy/paste something and it pasted a whole bunch of stuff im going to have to go back and figure out what it did

----------

## nobody13

So what i found out was in putty if you use the right mouse button its like the middle button in linux for pasting selected stuff.

If you hit the middle button out of habit it gos haywire.

so  im betting something happened here

```
209  emerge -av x11-drivers/xf86-input-keyboard

  210  libtool --finish /usr/lib64/xorg/modules/input'

  211  make[2]: Leaving directory '/var/tmp/portage/x11-drivers/xf86-input-keyboard-1.9.0/work/xf86-input-keyboard-1.9.0_build/src'

  212  make[1]: Leaving directory '/var/tmp/portage/x11-drivers/xf86-input-keyboard-1.9.0/work/xf86-input-keyboard-1.9.0_build/src'

  213  Making install in man

  214  make[1]: Entering directory '/var/tmp/portage/x11-drivers/xf86-input-keyboard-1.9.0/work/xf86-input-keyboard-1.9.0_build/man'

  215  make[2]: Entering directory '/var/tmp/portage/x11-drivers/xf86-input-keyboard-1.9.0/work/xf86-input-keyboard-1.9.0_build/man'

  216  make[2]: Nothing to be done for 'install-exec-am'.

  217   /bin/mkdir -p '/var/tmp/portage/x11-drivers/xf86-input-keyboard-1.9.0/image//usr/share/man/man4'

  218   /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644 kbd.4 '/var/tmp/portage/x11-drivers/xf86-input-keyboard-1.9.0/image//usr/share/man/man4'

  219  make[2]: Leaving directory '/var/tmp/portage/x11-drivers/xf86-input-keyboard-1.9.0/work/xf86-input-keyboard-1.9.0_build/man'

  220  make[1]: Leaving directory '/var/tmp/portage/x11-drivers/xf86-input-keyboard-1.9.0/work/xf86-input-keyboard-1.9.0_build/man'

  221  make[1]: Entering directory '/var/tmp/portage/x11-drivers/xf86-input-keyboard-1.9.0/work/xf86-input-keyboard-1.9.0_build'

  222  make[2]: Entering directory '/var/tmp/portage/x11-drivers/xf86-input-keyboard-1.9.0/work/xf86-input-keyboard-1.9.0_build'

  223  make[2]: Nothing to be done for 'install-exec-am'.

  224  make[2]: Nothing to be done for 'install-data-am'.

  225  make[2]: Leaving directory '/var/tmp/portage/x11-drivers/xf86-input-keyboard-1.9.0/work/xf86-input-keyboard-1.9.0_build'

  226  make[1]: Leaving directory '/var/tmp/portage/x11-drivers/xf86-input-keyboard-1.9.0/work/xf86-input-keyboard-1.9.0_build'

  227   * Removing unnecessary /usr/lib64/xorg/modules/input/kbd_drv.la (module)

  228  >>> Completed installing xf86-input-keyboard-1.9.0 into /var/tmp/portage/x11-drivers/xf86-input-keyboard-1.9.0/image/

  229   * Final size of build directory: 2564 KiB

  230   * Final size of installed tree: 164 KiB

  231  strip: x86_64-pc-linux-gnu-strip --strip-unneeded -R .comment -R .GCC.command.line -R .note.gnu.gold-version

  232     usr/lib64/xorg/modules/input/kbd_drv.so

  233  ecompressdir: bzip2 -9 /usr/share/doc

  234  ecompressdir: bzip2 -9 /usr/share/man

  235  >>> Installing (1 of 1) x11-drivers/xf86-input-keyboard-1.9.0::gentoo

  236   * checking 4 files for package collisions

  237  >>> Merging x11-drivers/xf86-input-keyboard-1.9.0 to /

  238  --- /usr/

  239  --- /usr/lib64/

  240  --- /usr/lib64/xorg/

  241  --- /usr/lib64/xorg/modules/

  242  >>> /usr/lib64/xorg/modules/input/

  243  >>> /usr/lib64/xorg/modules/input/kbd_drv.so

  244  /etc/init.d/xdm restart

  245  dmesg

  246  eix mouse

  247  libtool --finish /usr/lib64/xorg/modules/input'

  248  make[2]: Leaving directory '/var/tmp/portage/x11-drivers/xf86-input-keyboard-1.9.0/work/xf86-input-keyboard-1.9.0_build/src'

  249  make[1]: Leaving directory '/var/tmp/portage/x11-drivers/xf86-input-keyboard-1.9.0/work/xf86-input-keyboard-1.9.0_build/src'

  250  Making install in man

  251  make[1]: Entering directory '/var/tmp/portage/x11-drivers/xf86-input-keyboard-1.9.0/work/xf86-input-keyboard-1.9.0_build/man'

  252  make[2]: Entering directory '/var/tmp/portage/x11-drivers/xf86-input-keyboard-1.9.0/work/xf86-input-keyboard-1.9.0_build/man'

  253  make[2]: Nothing to be done for 'install-exec-am'.

  254   /bin/mkdir -p '/var/tmp/portage/x11-drivers/xf86-input-keyboard-1.9.0/image//usr/share/man/man4'

  255   /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644 kbd.4 '/var/tmp/portage/x11-drivers/xf86-input-keyboard-1.9.0/image//usr/share/man/man4'

  256  make[2]: Leaving directory '/var/tmp/portage/x11-drivers/xf86-input-keyboard-1.9.0/work/xf86-input-keyboard-1.9.0_build/man'

  257  make[1]: Leaving directory '/var/tmp/portage/x11-drivers/xf86-input-keyboard-1.9.0/work/xf86-input-keyboard-1.9.0_build/man'

  258  make[1]: Entering directory '/var/tmp/portage/x11-drivers/xf86-input-keyboard-1.9.0/work/xf86-input-keyboard-1.9.0_build'

  259  make[2]: Entering directory '/var/tmp/portage/x11-drivers/xf86-input-keyboard-1.9.0/work/xf86-input-keyboard-1.9.0_build'

  260  make[2]: Nothing to be done for 'install-exec-am'.

  261  make[2]: Nothing to be done for 'install-data-am'.

  262  make[2]: Leaving directory '/var/tmp/portage/x11-drivers/xf86-input-keyboard-1.9.0/work/xf86-input-keyboard-1.9.0_build'

  263  make[1]: Leaving directory '/var/tmp/portage/x11-drivers/xf86-input-keyboard-1.9.0/work/xf86-input-keyboard-1.9.0_build'

  264   * Removing unnecessary /usr/lib64/xorg/modules/input/kbd_drv.la (module)

  265  >>> Completed installing xf86-input-keyboard-1.9.0 into /var/tmp/portage/x11-drivers/xf86-input-keyboard-1.9.0/image/

  266   * Final size of build directory: 2564 KiB

  267   * Final size of installed tree: 164 KiB

  268  strip: x86_64-pc-linux-gnu-strip --strip-unneeded -R .comment -R .GCC.command.line -R .note.gnu.gold-version

  269     usr/lib64/xorg/modules/input/kbd_drv.so

  270  ecompressdir: bzip2 -9 /usr/share/doc

  271  ecompressdir: bzip2 -9 /usr/share/man

  272  >>> Installing (1 of 1) x11-drivers/xf86-input-keyboard-1.9.0::gentoo

  273   * checking 4 files for package collisions

  274  >>> Merging x11-drivers/xf86-input-keyboard-1.9.0 to /

  275  --- /usr/

  276  --- /usr/lib64/

  277  --- /usr/lib64/xorg/

  278  --- /usr/lib64/xorg/modules/

  279  >>> /usr/lib64/xorg/modules/input/

  280  >>> /usr/lib64/xorg/modules/input/kbd_drv.so

  281  emerge x11-drivers/xf86-input-mouse

  282       Available versions:  1.9.2

  283       Homepage:            https://www.x.org/wiki/

  284       Description:         X.Org driver for mouse input devices

  285  * x11-drivers/xf86-input-vmmouse

  286       Available versions:  13.1.0-r1 **9999

  287       Homepage:            https://www.x.org/wiki/

  288       Description:         VMWare mouse input driver

  289  Found 11 matches

  290  spB610 dave # libtool --finish /usr/lib64/xorg/modules/input'

  291  > make[2]: Leaving directory '/var/tmp/portage/x11-drivers/xf86-input-keyboard-1.9.0/work/xf86-input-keyboard-1.9.0_build/src'

  292  > make[1]: Leaving directory '/var/tmp/portage/x11-drivers/xf86-input-keyboard-1.9.0/work/xf86-input-keyboard-1.9.0_build/src'

  293  > Making install in man

  294  > make[1]: Entering directory '/var/tmp/portage/x11-drivers/xf86-input-keyboard-1.9.0/work/xf86-input-keyboard-1.9.0_build/man'

  295  > make[2]: Entering directory '/var/tmp/portage/x11-drivers/xf86-input-keyboard-1.9.0/work/xf86-input-keyboard-1.9.0_build/man'

  296  > make[2]: Nothing to be done for 'install-exec-am'.

  297  >  /bin/mkdir -p '/var/tmp/portage/x11-drivers/xf86-input-keyboard-1.9.0/image//usr/share/man/man4'

  298  >  /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644 kbd.4 '/var/tmp/portage/x11-drivers/xf86-input-keyboard-1.9.0/image//usr/share/man/man4'

  299  > make[2]: Leaving directory '/var/tmp/portage/x11-drivers/xf86-input-keyboard-1.9.0/work/xf86-input-keyboard-1.9.0_build/man'

  300  > make[1]: Leaving directory '/var/tmp/portage/x11-drivers/xf86-input-keyboard-1.9.0/work/xf86-input-keyboard-1.9.0_build/man'

  301  > make[1]: Entering directory '/var/tmp/portage/x11-drivers/xf86-input-keyboard-1.9.0/work/xf86-input-keyboard-1.9.0_build'

  302  /etc/init.d/xdm restart

  303  cd /etc/init.d

  304  ls

  305  /etc/init.d/udev status

  306  /etc/init.d/udev restart

  307  /etc/init.d/dbus status

  308  /etc/init.d/dbus start

  309                                                                                [ ok ]

  310   * Setting up sddm ...                                                                                                                                                                                                                  [ ok ]

  311  spB610 dave # cd /etc/init.d

  312  spB610 init.d # ls

  313  binfmt            consolefont   cupsd   dmesg       functions.sh  ip6tables  kmod-static-nodes  loopback      mtab        nullmailer          osclock  pydoc-2.7  runsvdir   sshd     sysfs         udev          xdm

  314  bootmisc          consolekit    dbus    enp4s8      gpm           iptables   lm_sensors         modules       net-online  numlock             pciparm  pydoc-3.4  s6-svscan  swap     sysklogd      udev-settle   xdm-setup

  315  busybox-ntpd      cronie        devfs   fancontrol  hostname      keymaps    local              modules-load  net.lo      opentmpfiles-dev    procfs   root       saslauthd  swclock  termencoding  udev-trigger

  316  busybox-watchdog  cups-browsed  dhcpcd  fsck        hwclock       killprocs  localmount         mount-ro      netmount    opentmpfiles-setup  pwcheck  rsyncd     savecache  sysctl   thinkfan      urandom

  317  spB610 init.d # /etc/init.d/udev status

  
```

----------

## cboldt

I don't see anything in lines 209-344 that I would suspect of making a zero-byte /bin/mkdir

Do you have any other zero-byte files in /bin or in /sbin?

```
find /bin -size 0
```

Edit to add, lines 290-301 are a multi-line command invoking the program "libtool" with many of the parameters passed to libtool being nonsense, unintended.  I can't imagine libtool would zero out any file though.[/code]

----------

## nobody13

just that one was 0 bytes. i copied mkdir from this pc to it. I can make directories now but emerge cant

----------

## cboldt

That sounds like a permissions issue with /bin/mkdir.

```
chown root:root /bin/mkdir

chmod 755 /bin/mkdir
```

I assume that you aren't changing working environments between booting from /dev/sdb, booting from separate media, and chroot, and that the difference you report occurs in the "native environment" after booting from /dev/sdb.

----------

## nobody13

i end up with this :

```
>>> Emerging (1 of 1) sys-apps/coreutils-8.25::gentoo

 * coreutils-8.25.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                                        [ ok ]

 * coreutils-8.25-patches-1.1.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                            [ ok ]

 * coreutils-8.25-man.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                                    [ ok ]

/usr/lib/portage/python3.4/phase-functions.sh: line 242: cd: /var/tmp/portage/sys-apps/coreutils-8.25/work: No such file or directory

 * ERROR: sys-apps/coreutils-8.25::gentoo failed (unpack phase):

 *   Directory change failed: `cd '/var/tmp/portage/sys-apps/coreutils-8.25/work'`

 * 

 * Call stack:

 *            ebuild.sh, line  767:  Called __ebuild_main 'unpack'

 *   phase-functions.sh, line 1007:  Called __dyn_unpack

 *   phase-functions.sh, line  242:  Called die

 * The specific snippet of code:

 *      cd "${WORKDIR}" || die "Directory change failed: \`cd '${WORKDIR}'\`"

 * 

 * If you need support, post the output of `emerge --info '=sys-apps/coreutils-8.25::gentoo'`,

 * the complete build log and the output of `emerge -pqv '=sys-apps/coreutils-8.25::gentoo'`.

 * The complete build log is located at '/var/tmp/portage/sys-apps/coreutils-8.25/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/sys-apps/coreutils-8.25/temp/environment'.

 * Working directory: '/var/tmp/portage/sys-apps/coreutils-8.25/homedir'

 * S: '/var/tmp/portage/sys-apps/coreutils-8.25/work/coreutils-8.25'

```

logfile 

```
^[[32;01m * ^[[39;49;00mPackage:    sys-apps/coreutils-8.25

^[[32;01m * ^[[39;49;00mRepository: gentoo

^[[32;01m * ^[[39;49;00mMaintainer: base-system@gentoo.org

^[[32;01m * ^[[39;49;00mUSE:        abi_x86_64 acl amd64 elibc_glibc kernel_linux nls userland_GNU xattr

^[[32;01m * ^[[39;49;00mFEATURES:   preserve-libs sandbox userpriv usersandbox

/usr/lib/portage/python3.4/phase-functions.sh: line 242: cd: /var/tmp/portage/sys-apps/coreutils-8.25/work: No such file or directory

 ^[[31;01m*^[[0m ERROR: sys-apps/coreutils-8.25::gentoo failed (unpack phase):

 ^[[31;01m*^[[0m   Directory change failed: `cd '/var/tmp/portage/sys-apps/coreutils-8.25/work'`

 ^[[31;01m*^[[0m

 ^[[31;01m*^[[0m Call stack:

 ^[[31;01m*^[[0m            ebuild.sh, line  767:  Called __ebuild_main 'unpack'

 ^[[31;01m*^[[0m   phase-functions.sh, line 1007:  Called __dyn_unpack

 ^[[31;01m*^[[0m   phase-functions.sh, line  242:  Called die

 ^[[31;01m*^[[0m The specific snippet of code:

 ^[[31;01m*^[[0m        cd "${WORKDIR}" || die "Directory change failed: \`cd '${WORKDIR}'\`"

 ^[[31;01m*^[[0m

 ^[[31;01m*^[[0m If you need support, post the output of `emerge --info '=sys-apps/coreutils-8.25::gentoo'`,

 ^[[31;01m*^[[0m the complete build log and the output of `emerge -pqv '=sys-apps/coreutils-8.25::gentoo'`.

 ^[[31;01m*^[[0m The complete build log is located at '/var/tmp/portage/sys-apps/coreutils-8.25/temp/build.log'.

 ^[[31;01m*^[[0m The ebuild environment file is located at '/var/tmp/portage/sys-apps/coreutils-8.25/temp/environment'.

 ^[[31;01m*^[[0m Working directory: '/var/tmp/portage/sys-apps/coreutils-8.25/homedir'

 ^[[31;01m*^[[0m S: '/var/tmp/portage/sys-apps/coreutils-8.25/work/coreutils-8.25'

```

----------

## cboldt

Could be a mess of blind alleys, but you might try changing PORTAGE_TMPDIR to another location (make sure that directory exists), and you might try "FEATURES=-sandbox emerge coreutils"

Assuming of course that /bin/mkdir is root:root 0755

----------

## nobody13

 *cboldt wrote:*   

> That sounds like a permissions issue with /bin/mkdir.
> 
> ```
> chown root:root /bin/mkdir
> 
> ...

 

and yes all from the native environment /dev/sdb2

----------

## cboldt

Are you running the emerge command as root?  or as "user" of some other identity?

----------

## nobody13

no luck with that. I have to do to work. will try again when i get home -  Thanks for all your help

----------

## Goverp

I wonder if there was a typo in a command entered at root, along the lines of

```
# For testing, a copy of mkdir

paul@acer ~ $ cp /bin/mkdir .

# Spot a typo below

paul@acer ~ $ > mkdir --help

bash: --help: command not found

paul@acer ~ $ ls -l mkdir

-rwxr-x--x 1 paul paul 0 Mar 22 19:48 mkdir
```

which is enough to replace mkdir with an empty file.

----------

## cboldt

I didn't try as root, but as a user, both "./mkdir --help" and "mkdir --help" produced the help message, and neither one of those commands resulted in zero-byting ~/mkdir or /bin/mkdir

----------

## nobody13

I'm thinking I might just cut my losses and reinstall from scratch instead of fighting with it.

----------

## khayyam

 *nobody13 wrote:*   

> I'm thinking I might just cut my losses and reinstall from scratch instead of fighting with it.

 

nobody13 ... really? I would at least try copying mkdir from a backup, or stage3, and give that a go (as you can see it only requires glibc)

```
# ldd /bin/mkdir

  linux-gate.so.1 (0xb7757000)

  libc.so.6 => /lib/libc.so.6 (0xb759e000)

  /lib/ld-linux.so.2 (0xb7758000)
```

So, you might try finding a working 'mkdir', test, replace the broken one, and merge coreutils.

best ... khay

----------

## Ant P.

For a temporary fix:

```
install --mode 0755 /bin/busybox /bin/mkdir
```

----------

## khayyam

 *Ant P. wrote:*   

> For a temporary fix:
> 
> ```
> install --mode 0755 /bin/busybox /bin/mkdir
> ```
> ...

 

... what he said ;) ... only then 'emerge --oneshot coreutils'. 

best ... khay

----------

## Goverp

 *cboldt wrote:*   

> I didn't try as root, but as a user, both "./mkdir --help" and "mkdir --help" produced the help message, and neither one of those commands resulted in zero-byting ~/mkdir or /bin/mkdir

 

You missed the (significant) ">"

----------

## cboldt

 *Goverp wrote:*   

> You missed the (significant) ">"

 

That's significant?  Who knew? !!  Well, yeah, that would tend to wipe things out, for sure!  Looked right past it, took it as a prompt character, but on review, obviously it isn't.

----------

## nobody13

I did copy mkdir from another computer and it worked when i used mkdir aaa but had other issues.  Add to that this computer is dreadfull slow. I had enough - went and put ubuntu on it. I have Gentoo running nicely on two other computers that i use regularly. This thing is just a dvr experiment. Thank you all for helping

----------

## Goverp

 *cboldt wrote:*   

>  *Goverp wrote:*   You missed the (significant) ">" 
> 
> That's significant?  Who knew? !!  Well, yeah, that would tend to wipe things out, for sure!  Looked right past it, took it as a prompt character, but on review, obviously it isn't.

 

That was a made up example to show how easy it is to inadvertently wipe a file as root.  As a real example of my own incompetence, spot the typo below:

```
cd /usr/src/linux-4.6.8

cp ../linux/.config ,

make oldconfig
```

How not to upgrade a kernel config   :Embarassed: 

----------

## cboldt

Hahahah.  I've probably done that.  At least the file "comma" existed, I presume  :Wink: 

When I do that operation, I cite the original or existing .conf similarly, except using the full directory name, e.g., "../linux-4.4.10-gentoo"  So far, I haven't managed to copy the existing (old) config to comma, but give me time ...

----------

