Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mkdir doesnt do anything
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
cboldt
Veteran
Veteran


Joined: 24 Aug 2005
Posts: 1046

PostPosted: Wed Mar 22, 2017 2:04 pm    Post subject: Reply with quote

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 ...

Code:
> 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
Back to top
View user's profile Send private message
cboldt
Veteran
Veteran


Joined: 24 Aug 2005
Posts: 1046

PostPosted: Wed Mar 22, 2017 2:10 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
nobody13
Apprentice
Apprentice


Joined: 21 Jan 2006
Posts: 190

PostPosted: Wed Mar 22, 2017 2:10 pm    Post subject: Reply with quote

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

Code:
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.
Back to top
View user's profile Send private message
cboldt
Veteran
Veteran


Joined: 24 Aug 2005
Posts: 1046

PostPosted: Wed Mar 22, 2017 2:12 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
nobody13
Apprentice
Apprentice


Joined: 21 Jan 2006
Posts: 190

PostPosted: Wed Mar 22, 2017 2:12 pm    Post subject: Reply with quote

just noticed you a step ahead of me
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10733
Location: Somewhere over Atlanta, Georgia

PostPosted: Wed Mar 22, 2017 2:13 pm    Post subject: Reply with quote

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

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10733
Location: Somewhere over Atlanta, Georgia

PostPosted: Wed Mar 22, 2017 2:15 pm    Post subject: Reply with quote

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
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
nobody13
Apprentice
Apprentice


Joined: 21 Jan 2006
Posts: 190

PostPosted: Wed Mar 22, 2017 2:18 pm    Post subject: Reply with quote

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

Code:

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.
Back to top
View user's profile Send private message
cboldt
Veteran
Veteran


Joined: 24 Aug 2005
Posts: 1046

PostPosted: Wed Mar 22, 2017 2:19 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
limn
l33t
l33t


Joined: 13 May 2005
Posts: 997

PostPosted: Wed Mar 22, 2017 2:26 pm    Post subject: Reply with quote

Quote:
some kind of corruption from failing hardware.
zeroing a file is extremely unlikely.
You might check your command line history.
Back to top
View user's profile Send private message
nobody13
Apprentice
Apprentice


Joined: 21 Jan 2006
Posts: 190

PostPosted: Wed Mar 22, 2017 2:28 pm    Post subject: Reply with quote

That was also the last successful emerge.
the next entry

Code:
Started emerge on: Mar 21, 2017 23:59:13
1490155154:  *** emerge --verbose --ask dev-libs/libevdev
1490155155:  *** terminating.
Back to top
View user's profile Send private message
cboldt
Veteran
Veteran


Joined: 24 Aug 2005
Posts: 1046

PostPosted: Wed Mar 22, 2017 2:36 pm    Post subject: Reply with quote

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.

Code:
> 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.
Back to top
View user's profile Send private message
nobody13
Apprentice
Apprentice


Joined: 21 Jan 2006
Posts: 190

PostPosted: Wed Mar 22, 2017 3:03 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
nobody13
Apprentice
Apprentice


Joined: 21 Jan 2006
Posts: 190

PostPosted: Wed Mar 22, 2017 3:06 pm    Post subject: Reply with quote

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

Code:
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
 
Back to top
View user's profile Send private message
cboldt
Veteran
Veteran


Joined: 24 Aug 2005
Posts: 1046

PostPosted: Wed Mar 22, 2017 3:17 pm    Post subject: Reply with quote

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?

Code:
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]
Back to top
View user's profile Send private message
nobody13
Apprentice
Apprentice


Joined: 21 Jan 2006
Posts: 190

PostPosted: Wed Mar 22, 2017 3:51 pm    Post subject: Reply with quote

just that one was 0 bytes. i copied mkdir from this pc to it. I can make directories now but emerge cant
Back to top
View user's profile Send private message
cboldt
Veteran
Veteran


Joined: 24 Aug 2005
Posts: 1046

PostPosted: Wed Mar 22, 2017 4:00 pm    Post subject: Reply with quote

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

Code:
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.
Back to top
View user's profile Send private message
nobody13
Apprentice
Apprentice


Joined: 21 Jan 2006
Posts: 190

PostPosted: Wed Mar 22, 2017 4:11 pm    Post subject: Reply with quote

i end up with this :

Code:
>>> 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
Code:
^[[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'

Back to top
View user's profile Send private message
cboldt
Veteran
Veteran


Joined: 24 Aug 2005
Posts: 1046

PostPosted: Wed Mar 22, 2017 4:24 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
nobody13
Apprentice
Apprentice


Joined: 21 Jan 2006
Posts: 190

PostPosted: Wed Mar 22, 2017 4:24 pm    Post subject: Reply with quote

cboldt wrote:
That sounds like a permissions issue with /bin/mkdir.

Code:
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.




and yes all from the native environment /dev/sdb2
Back to top
View user's profile Send private message
cboldt
Veteran
Veteran


Joined: 24 Aug 2005
Posts: 1046

PostPosted: Wed Mar 22, 2017 4:26 pm    Post subject: Reply with quote

Are you running the emerge command as root? or as "user" of some other identity?
Back to top
View user's profile Send private message
nobody13
Apprentice
Apprentice


Joined: 21 Jan 2006
Posts: 190

PostPosted: Wed Mar 22, 2017 4:34 pm    Post subject: Reply with quote

no luck with that. I have to do to work. will try again when i get home - Thanks for all your help
Back to top
View user's profile Send private message
Goverp
Advocate
Advocate


Joined: 07 Mar 2007
Posts: 2204

PostPosted: Wed Mar 22, 2017 7:50 pm    Post subject: Reply with quote

I wonder if there was a typo in a command entered at root, along the lines of
Code:
# 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.
_________________
Greybeard
Back to top
View user's profile Send private message
cboldt
Veteran
Veteran


Joined: 24 Aug 2005
Posts: 1046

PostPosted: Wed Mar 22, 2017 8:29 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
nobody13
Apprentice
Apprentice


Joined: 21 Jan 2006
Posts: 190

PostPosted: Wed Mar 22, 2017 11:12 pm    Post subject: Reply with quote

I'm thinking I might just cut my losses and reinstall from scratch instead of fighting with it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum