Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

[SOLVED]Busybox vs Coreutils on desktop workstation

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
7 posts • Page 1 of 1
Author
Message
dewhite
Tux's lil' helper
Tux's lil' helper
Posts: 107
Joined: Sun Mar 16, 2003 8:18 am
Location: Houston, Texas, USA
Contact:
Contact dewhite
Website

[SOLVED]Busybox vs Coreutils on desktop workstation

  • Quote

Post by dewhite » Sat Mar 12, 2016 5:55 am

As you can see, I'm an occasional poster but long-time user of Gentoo (continuously since 2003).

I feel like a complete dunce asking, but I can't seem to find good information about a simple topic via search, either here or on Google.

I understand, conceptually, what BusyBox is and what it's intended purpose on small or embeded systems or environments is. I use a statically linked binary of it in a custom script for my initramfs to support a FDE setup with LUKS.

-HOWEVER-

In my regular daily life on my regular workstation setup though, I'm little confused by the fact that often when I use simple utilities from the command line they are provided by Busybox instead of the genuine Coreutils counterpart. Is this typical, correct, normal, sensible, logical, etc?

Sometimes when I'm writing shell scripts or doing somewhat complicated operations in the shell I get an error that a particular switch or option isn't supported or I see output or behavior that I don't expect. After a few minutes of scratching my head I'll call the simple program (eg. diff, wget, nslookup, etc) with the --help switch and find that I'm working with a stripped down Busybox shortcut instead of the full Coreutils binary.

Code: Select all

rack dan # wget --help
BusyBox v1.24.1 (2016-03-09 17:23:54 CST) multi-call binary.

Usage: wget [-c|--continue] [-s|--spider] [-q|--quiet] [-O|--output-document FILE]
        [--header 'header: value'] [-Y|--proxy on/off] [-P DIR]
        [-U|--user-agent AGENT] [-T SEC] URL...

Retrieve files via HTTP or FTP

        -s      Spider mode - only check file existence
        -c      Continue retrieval of aborted transfer
        -q      Quiet
        -P DIR  Save to DIR (default .)
        -T SEC  Network read timeout is SEC seconds
        -O FILE Save to FILE ('-' for stdout)
        -U STR  Use STR for User-Agent header
        -Y      Use proxy ('on' or 'off')

Code: Select all

dan@rack ~ $ wget --help
GNU Wget 1.16.3, a non-interactive network retriever.
Usage: wget [OPTION]... [URL]...

Mandatory arguments to long options are mandatory for short options too.

Startup:
  -V,  --version                   display the version of Wget and exit
  -h,  --help                      print this help
  -b,  --background                go to background after startup
  -e,  --execute=COMMAND           execute a `.wgetrc'-style command

Logging and input file:
  -o,  --output-file=FILE          log messages to FILE
  -a,  --append-output=FILE        append messages to FILE
  -q,  --quiet                     quiet (no output)
  -v,  --verbose                   be verbose (this is the default)
  -nv, --no-verbose                turn off verboseness, without being quiet
       --report-speed=TYPE         output bandwidth as TYPE.  TYPE can be bits
  -i,  --input-file=FILE           download URLs found in local or external FILE
  -F,  --force-html                treat input file as HTML
  -B,  --base=URL                  resolves HTML input-file links (-i -F)
                                     relative to URL
       --config=FILE               specify config file to use
       --no-config                 do not read any config file

Download:
  -t,  --tries=NUMBER              set number of retries to NUMBER (0 unlimits)
       --retry-connrefused         retry even if connection is refused
  -O,  --output-document=FILE      write documents to FILE
  -nc, --no-clobber                skip downloads that would download to
                                     existing files (overwriting them)
  -c,  --continue                  resume getting a partially-downloaded file
       --start-pos=OFFSET          start downloading from zero-based position OFFSET
       --progress=TYPE             select progress gauge type
       --show-progress             display the progress bar in any verbosity mode
  -N,  --timestamping              don't re-retrieve files unless newer than
                                     local
  --no-use-server-timestamps       don't set the local file's timestamp by
                                     the one on the server
  -S,  --server-response           print server response
       --spider                    don't download anything
  -T,  --timeout=SECONDS           set all timeout values to SECONDS
       --dns-timeout=SECS          set the DNS lookup timeout to SECS
       --connect-timeout=SECS      set the connect timeout to SECS
       --read-timeout=SECS         set the read timeout to SECS
  -w,  --wait=SECONDS              wait SECONDS between retrievals
       --waitretry=SECONDS         wait 1..SECONDS between retries of a retrieval
       --random-wait               wait from 0.5*WAIT...1.5*WAIT secs between retrievals
       --no-proxy                  explicitly turn off proxy
  -Q,  --quota=NUMBER              set retrieval quota to NUMBER
       --bind-address=ADDRESS      bind to ADDRESS (hostname or IP) on local host
       --limit-rate=RATE           limit download rate to RATE
       --no-dns-cache              disable caching DNS lookups
       --restrict-file-names=OS    restrict chars in file names to ones OS allows
       --ignore-case               ignore case when matching files/directories
  -4,  --inet4-only                connect only to IPv4 addresses
  -6,  --inet6-only                connect only to IPv6 addresses
       --prefer-family=FAMILY      connect first to addresses of specified family,
                                     one of IPv6, IPv4, or none
       --user=USER                 set both ftp and http user to USER
       --password=PASS             set both ftp and http password to PASS
       --ask-password              prompt for passwords
       --no-iri                    turn off IRI support
       --local-encoding=ENC        use ENC as the local encoding for IRIs
       --remote-encoding=ENC       use ENC as the default remote encoding
       --unlink                    remove file before clobber

Directories:
  -nd, --no-directories            don't create directories
  -x,  --force-directories         force creation of directories
  -nH, --no-host-directories       don't create host directories
       --protocol-directories      use protocol name in directories
  -P,  --directory-prefix=PREFIX   save files to PREFIX/..
       --cut-dirs=NUMBER           ignore NUMBER remote directory components

HTTP options:
       --http-user=USER            set http user to USER
       --http-password=PASS        set http password to PASS
       --no-cache                  disallow server-cached data
       --default-page=NAME         change the default page name (normally
                                     this is 'index.html'.)
  -E,  --adjust-extension          save HTML/CSS documents with proper extensions
       --ignore-length             ignore 'Content-Length' header field
       --header=STRING             insert STRING among the headers
       --max-redirect              maximum redirections allowed per page
       --proxy-user=USER           set USER as proxy username
       --proxy-password=PASS       set PASS as proxy password
       --referer=URL               include 'Referer: URL' header in HTTP request
       --save-headers              save the HTTP headers to file
  -U,  --user-agent=AGENT          identify as AGENT instead of Wget/VERSION
       --no-http-keep-alive        disable HTTP keep-alive (persistent connections)
       --no-cookies                don't use cookies
       --load-cookies=FILE         load cookies from FILE before session
       --save-cookies=FILE         save cookies to FILE after session
       --keep-session-cookies      load and save session (non-permanent) cookies
       --post-data=STRING          use the POST method; send STRING as the data
       --post-file=FILE            use the POST method; send contents of FILE
       --method=HTTPMethod         use method "HTTPMethod" in the request
       --body-data=STRING          send STRING as data. --method MUST be set
       --body-file=FILE            send contents of FILE. --method MUST be set
       --content-disposition       honor the Content-Disposition header when
                                     choosing local file names (EXPERIMENTAL)
       --content-on-error          output the received content on server errors
       --auth-no-challenge         send Basic HTTP authentication information
                                     without first waiting for the server's
                                     challenge

HTTPS (SSL/TLS) options:
       --secure-protocol=PR        choose secure protocol, one of auto, SSLv2,
                                     SSLv3, TLSv1 and PFS
       --https-only                only follow secure HTTPS links
       --no-check-certificate      don't validate the server's certificate
       --certificate=FILE          client certificate file
       --certificate-type=TYPE     client certificate type, PEM or DER
       --private-key=FILE          private key file
       --private-key-type=TYPE     private key type, PEM or DER
       --ca-certificate=FILE       file with the bundle of CAs
       --ca-directory=DIR          directory where hash list of CAs is stored
       --crl-file=FILE             file with bundle of CRLs
       --random-file=FILE          file with random data for seeding the SSL PRNG
       --egd-file=FILE             file naming the EGD socket with random data

FTP options:
       --ftp-user=USER             set ftp user to USER
       --ftp-password=PASS         set ftp password to PASS
       --no-remove-listing         don't remove '.listing' files
       --no-glob                   turn off FTP file name globbing
       --no-passive-ftp            disable the "passive" transfer mode
       --preserve-permissions      preserve remote file permissions
       --retr-symlinks             when recursing, get linked-to files (not dir)

WARC options:
       --warc-file=FILENAME        save request/response data to a .warc.gz file
       --warc-header=STRING        insert STRING into the warcinfo record
       --warc-max-size=NUMBER      set maximum size of WARC files to NUMBER
       --warc-cdx                  write CDX index files
       --warc-dedup=FILENAME       do not store records listed in this CDX file
       --no-warc-compression       do not compress WARC files with GZIP
       --no-warc-digests           do not calculate SHA1 digests
       --no-warc-keep-log          do not store the log file in a WARC record
       --warc-tempdir=DIRECTORY    location for temporary files created by the
                                     WARC writer

Recursive download:
  -r,  --recursive                 specify recursive download
  -l,  --level=NUMBER              maximum recursion depth (inf or 0 for infinite)
       --delete-after              delete files locally after downloading them
  -k,  --convert-links             make links in downloaded HTML or CSS point to
                                     local files
       --backups=N                 before writing file X, rotate up to N backup files
  -K,  --backup-converted          before converting file X, back up as X.orig
  -m,  --mirror                    shortcut for -N -r -l inf --no-remove-listing
  -p,  --page-requisites           get all images, etc. needed to display HTML page
       --strict-comments           turn on strict (SGML) handling of HTML comments

Recursive accept/reject:
  -A,  --accept=LIST               comma-separated list of accepted extensions
  -R,  --reject=LIST               comma-separated list of rejected extensions
       --accept-regex=REGEX        regex matching accepted URLs
       --reject-regex=REGEX        regex matching rejected URLs
       --regex-type=TYPE           regex type (posix|pcre)
  -D,  --domains=LIST              comma-separated list of accepted domains
       --exclude-domains=LIST      comma-separated list of rejected domains
       --follow-ftp                follow FTP links from HTML documents
       --follow-tags=LIST          comma-separated list of followed HTML tags
       --ignore-tags=LIST          comma-separated list of ignored HTML tags
  -H,  --span-hosts                go to foreign hosts when recursive
  -L,  --relative                  follow relative links only
  -I,  --include-directories=LIST  list of allowed directories
       --trust-server-names        use the name specified by the redirection
                                     URL's last component
  -X,  --exclude-directories=LIST  list of excluded directories
  -np, --no-parent                 don't ascend to the parent directory

Mail bug reports and suggestions to <bug-wget@gnu.org>
Have I screwed up a setting in my profile, or somewhere else that leads to this behavior or am I not looking at this in the correct logical way?

I also just noticed while typing this post that when I'm logged in as regular user the Coreutils binaries seem to apply and when I su to root then I get a bunch of Busybox shortcuts. Now I'm pretty sure that I've done something to screw my setup up. Help!

Any thoughts, comments, questions, links, ideas, rants, insults are always appreciated.

Thanks,

Dan
Last edited by dewhite on Sat Mar 12, 2016 5:07 pm, edited 1 time in total.
Work FS: SM X10SRA | E5-2667v3 | 4x16Gb ECC RAM | Mirrored NVMe LUKS root | 2x 8TB ZFS Mirror
Home FS: HP Z440 | E5-2667v3 | 4x16Gb ECC RAM | Mirrored NVMe LUKS root | 2x 14TB ZFS Mirror
Top
Roman_Gruber
Advocate
Advocate
Posts: 3854
Joined: Tue Oct 03, 2006 8:43 am
Location: Austro Bavaria

  • Quote

Post by Roman_Gruber » Sat Mar 12, 2016 10:28 am

Check your Path variable please

Code: Select all

echo $PATH
/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/5.3.0:/opt/blackdown-jdk-1.4.2.03/bin:/opt/blackdown-jdk-1.4.2.03/jre/bin:/opt/android-sdk-update-manager/tools:/opt/android-sdk-update-manager/platform-tools:/usr/games/bin
It could be that you have not fully booted your box and you are still in the initramfs which usually uses busybox

you could access directly wget via the full path, correct the path environment variable
Top
khayyam
Watchman
Watchman
User avatar
Posts: 6227
Joined: Thu Jun 07, 2012 2:45 am
Location: Room 101

Re: Busybox vs Coreutils on desktop workstation

  • Quote

Post by khayyam » Sat Mar 12, 2016 2:19 pm

dewhite wrote:In my regular daily life on my regular workstation setup though, I'm little confused by the fact that often when I use simple utilities from the command line they are provided by Busybox instead of the genuine Coreutils counterpart. Is this typical, correct, normal, sensible, logical, etc?
dewhite ... no.
dewhite wrote:Sometimes when I'm writing shell scripts or doing somewhat complicated operations in the shell I get an error that a particular switch or option isn't supported or I see output or behavior that I don't expect. After a few minutes of scratching my head I'll call the simple program (eg. diff, wget, nslookup, etc) with the --help switch and find that I'm working with a stripped down Busybox shortcut instead of the full Coreutils binary.
This sounds as though the 'make-symlinks' useflag is enabled on busybox, or at some point you've run 'busybox --install -s' ... and so replaced the coreutils, wget, etc, binaries with links to busybox. You should look at /bin and see if these binaries are links to busybox.

Code: Select all

# ls -l /bin
dewhite wrote:I also just noticed while typing this post that when I'm logged in as regular user the Coreutils binaries seem to apply and when I su to root then I get a bunch of Busybox shortcuts. Now I'm pretty sure that I've done something to screw my setup up. Help!
Hmmm ... that suggests they are not symlinks, as it'd effect both root and user(s) in the same way. What does echo -e "$SHELL\n$PATH" show for user/root?
dewhite wrote:Any thoughts, comments, questions, links, ideas, rants, insults are always appreciated.
Silly-billy! ;)

best ... khay
Top
dewhite
Tux's lil' helper
Tux's lil' helper
Posts: 107
Joined: Sun Mar 16, 2003 8:18 am
Location: Houston, Texas, USA
Contact:
Contact dewhite
Website

  • Quote

Post by dewhite » Sat Mar 12, 2016 4:47 pm

Thanks both of you for your quick responses and thoughts.

First, I see different paths have been defined for my regular user and my root user:

Code: Select all

dan@rack ~ $ echo $PATH
/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.9.3
dan@rack ~ $ su
Password: 
rack dan # echo $PATH
/sbin:/bin:/usr/sbin:/usr/bin
Next I see that several of the commands that live in /bin are indeed symlinked to Busybox:

Code: Select all

rack dan # ls -l /bin
total 7540
lrwxrwxrwx 1 root root     12 Jan  2  2013 [ -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 [[ -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 addgroup -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 adduser -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 ar -> /bin/busybox
-rws--x--x 1 root root  18752 Feb 19  2015 arping
lrwxrwxrwx 1 root root     12 Jan  2  2013 ash -> /bin/busybox                                                                                                                                                     
-rwxr-xr-x 1 root root  10288 Aug  3  2015 attr                                                                                                                                                                    
lrwxrwxrwx 1 root root     15 Jan  7  2014 awk -> ../usr/bin/gawk                                                                                                                                                  
lrwxrwxrwx 1 root root     12 Jan  2  2013 base64 -> /bin/busybox                                                                                                                                                  
-rwxr-xr-x 1 root root  31120 Oct 22 14:33 basename                                                                                                                                                                
-rwxr-xr-x 1 root root 725880 Jan 19 14:55 bash                                                                                                                                                                    
lrwxrwxrwx 1 root root      7 Mar  9 17:24 bb -> busybox                                                                                                                                                           
lrwxrwxrwx 1 root root     12 Jan  2  2013 bbconfig -> /bin/busybox                                                                                                                                                
lrwxrwxrwx 1 root root     12 Jan  2  2013 bbsh -> /bin/busybox                                                                                                                                                    
lrwxrwxrwx 1 root root      5 Mar 14  2014 bunzip2 -> bzip2                                                                                                                                                        
-rwxr-xr-x 1 root root 976256 Mar  9 17:24 busybox                                                                                                                                                                 
lrwxrwxrwx 1 root root      5 Mar 14  2014 bzcat -> bzip2                                                                                                                                                          
-rwxr-xr-x 1 root root  91600 Mar 14  2014 bzip2                                                                                                                                                                   
lrwxrwxrwx 1 root root     12 Jan  2  2013 cal -> /bin/busybox                                                                                                                                                     
-rwxr-xr-x 1 root root  51824 Oct 22 14:33 cat                                                                                                                                                                     
lrwxrwxrwx 1 root root     12 Jan  2  2013 catv -> /bin/busybox                                                                                                                                                    
-rwxr-xr-x 1 root root  14536 Sep 26  2014 chacl                                                                                                                                                                   
lrwxrwxrwx 1 root root     12 Jan  2  2013 chat -> /bin/busybox                                                                                                                                                    
lrwxrwxrwx 1 root root     12 Jan  2  2013 chattr -> /bin/busybox                                                                                                                                                  
-rwxr-xr-x 1 root root  59984 Oct 22 14:33 chgrp
-rwxr-xr-x 1 root root  55856 Oct 22 14:33 chmod
-rwxr-xr-x 1 root root  64080 Oct 22 14:33 chown
lrwxrwxrwx 1 root root     12 Jan  2  2013 chpst -> /bin/busybox
-rwxr-xr-x 1 root root  35376 Oct 22 14:33 chroot
lrwxrwxrwx 1 root root     12 Jan  2  2013 chrt -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 chvt -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 cksum -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 clear -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 cmp -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 comm -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 conspy -> /bin/busybox
-rwxr-xr-x 1 root root 134192 Oct 22 14:33 cp
-rwxr-xr-x 1 root root 149920 Mar  9 14:32 cpio
lrwxrwxrwx 1 root root     12 Jan  2  2013 cryptpw -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 cttyhack -> /bin/busybox
-rwxr-xr-x 1 root root  39408 Oct 22 14:33 cut
-rwxr-xr-x 1 root root  64080 Oct 22 14:33 date
-rwxr-xr-x 1 root root  60064 Oct 22 14:33 dd
lrwxrwxrwx 1 root root     12 Jan  2  2013 deallocvt -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 delgroup -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 deluser -> /bin/busybox
-rwxr-xr-x 1 root root  97632 Oct 22 14:33 df
lrwxrwxrwx 1 root root     12 Jan  2  2013 diff -> /bin/busybox
-rwxr-xr-x 1 root root 118064 Oct 22 14:33 dir
-rwxr-xr-x 1 root root  27024 Oct 22 14:33 dirname
-rwxr-xr-x 1 root root  56272 Mar  9 16:10 dmesg
lrwxrwxrwx 1 root root      8 Jan 19 14:35 dnsdomainname -> hostname
lrwxrwxrwx 1 root root      8 Jan 19 14:35 domainname -> hostname
lrwxrwxrwx 1 root root     12 Jan  2  2013 dos2unix -> /bin/busybox
-rwxr-xr-x 1 root root 113488 Oct 22 14:33 du
lrwxrwxrwx 1 root root     12 Jan  2  2013 dumpkmap -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 dumpleases -> /bin/busybox
-rwxr-xr-x 1 root root  31120 Oct 22 14:33 echo
-rwxr-xr-x 1 root root    158 Feb 19  2015 egrep
lrwxrwxrwx 1 root root     12 Jan  2  2013 eject -> /bin/busybox
-rwxr-xr-x 1 root root  31152 Oct 22 14:33 env
lrwxrwxrwx 1 root root     12 Jan  2  2013 envdir -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 envuidgid -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 ether-wake -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 expand -> /bin/busybox
-rwxr-xr-x 1 root root  39376 Oct 22 14:33 expr
-rwxr-xr-x 1 root root  26992 Oct 22 14:33 false
lrwxrwxrwx 1 root root     12 Jan  2  2013 fdflush -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 fdformat -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 fgconsole -> /bin/busybox
-rwxr-xr-x 1 root root    158 Feb 19  2015 fgrep
lrwxrwxrwx 1 root root     12 Jan  2  2013 find -> /bin/busybox
-rwxr-xr-x 1 root root  45136 Mar  9 16:10 findmnt
lrwxrwxrwx 1 root root     12 Jan  2  2013 flock -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 free -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 fsync -> /bin/busybox
-rwxr-xr-x 1 root root  31648 Feb 19  2015 fuser
-rwxr-xr-x 1 root root  23536 Sep 26  2014 getfacl
-rwxr-xr-x 1 root root  19184 Aug  3  2015 getfattr
lrwxrwxrwx 1 root root     12 Jan  2  2013 getopt -> /bin/busybox
-rwxr-xr-x 1 root root 154760 Feb 19  2015 grep
-rwxr-xr-x 1 root root  10344 Oct 22 15:09 groups
-rwxr-xr-x 1 root root   2301 Feb 19  2015 gunzip
-rwxr-xr-x 1 root root  98016 Feb 19  2015 gzip
lrwxrwxrwx 1 root root     12 Jan  2  2013 hd -> /bin/busybox
-rwxr-xr-x 1 root root  39408 Oct 22 14:33 head
lrwxrwxrwx 1 root root     12 Jan  2  2013 hexdump -> /bin/busybox
-rwxr-xr-x 1 root root  14472 Jan 19 14:35 hostname
lrwxrwxrwx 1 root root     12 Jan  2  2013 id -> /bin/busybox
-rwxr-xr-x 1 root root  72504 Jan 19 14:35 ifconfig
lrwxrwxrwx 1 root root     12 Jan  2  2013 ifplugd -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 install -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 ionice -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 iostat -> /bin/busybox
-rwxr-xr-x 1 root root 384560 Mar  9 14:35 ip
lrwxrwxrwx 1 root root     12 Jan  2  2013 ipaddr -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 ipcrm -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 ipcs -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 iplink -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 iproute -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 iprule -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 iptunnel -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 kbd_mode -> /bin/busybox
-rwxr-xr-x 1 root root  27040 Sep 26  2014 keyctl
-rwxr-xr-x 1 root root  22872 Jan 19 14:46 kill
lrwxrwxrwx 1 root root     12 Jan  2  2013 killall -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 killall5 -> /bin/busybox
-rwxr-xr-x 1 root root 146256 Jan 19 14:49 kmod
lrwxrwxrwx 1 root root     12 Jan  2  2013 last -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 less -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 linux32 -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 linux64 -> /bin/busybox
-rwxr-xr-x 1 root root  55904 Oct 22 14:33 ln
lrwxrwxrwx 1 root root     12 Jan  2  2013 logger -> /bin/busybox
-rwxr-xr-x 1 root root  44688 Oct 22 15:09 login
lrwxrwxrwx 1 root root     12 Jan  2  2013 lpq -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 lpr -> /bin/busybox
-rwxr-xr-x 1 root root 118064 Oct 22 14:33 ls
lrwxrwxrwx 1 root root     12 Jan  2  2013 lsattr -> /bin/busybox
-rwxr-xr-x 1 root root  72792 Mar  9 16:10 lsblk
lrwxrwxrwx 1 root root      4 Jan 19 14:49 lsmod -> kmod
lrwxrwxrwx 1 root root     12 Jan  2  2013 lsof -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 lspci -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 lsusb -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 lzcat -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 lzma -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 lzop -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 lzopcat -> /bin/busybox
lrwxrwxrwx 1 root root     13 Jan  5  2013 mail -> /usr/bin/mail
-rwxr-xr-x 1 root root   9708 Jan 19 14:40 mbchk
lrwxrwxrwx 1 root root     12 Jan  2  2013 md5sum -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 mesg -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 microcom -> /bin/busybox
-rwxr-xr-x 1 root root  51760 Oct 22 14:33 mkdir
-rwxr-xr-x 1 root root  31152 Oct 22 14:33 mkfifo
-rwxr-xr-x 1 root root  35280 Oct 22 14:33 mknod
lrwxrwxrwx 1 root root     12 Jan  2  2013 mkpasswd -> /bin/busybox
-rwxr-xr-x 1 root root  39440 Oct 22 14:33 mktemp
lrwxrwxrwx 1 root root      4 Jan 19 14:49 modinfo -> kmod
-rwxr-xr-x 1 root root  39480 Mar  9 16:10 more
-rws--x--x 1 root root  39880 Mar  9 16:10 mount
-rwxr-xr-x 1 root root  14496 Mar  9 16:10 mountpoint
lrwxrwxrwx 1 root root     12 Jan  2  2013 mpstat -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 mt -> /bin/busybox
-rwxr-xr-x 1 root root 121888 Oct 22 14:33 mv
-rwxr-xr-x 1 root root 204128 Jan 19 14:54 nano
lrwxrwxrwx 1 root root     12 Jan  2  2013 nc -> /bin/busybox
-rwxr-xr-x 1 root root 128760 Jan 19 14:35 netstat
lrwxrwxrwx 1 root root     12 Jan  2  2013 nice -> /bin/busybox
lrwxrwxrwx 1 root root      8 Jan 19 14:35 nisdomainname -> hostname
lrwxrwxrwx 1 root root     12 Jan  2  2013 nmeter -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 nohup -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 nslookup -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 openvt -> /bin/busybox
-rws--x--x 1 root root  46760 Oct 22 15:09 passwd
lrwxrwxrwx 1 root root     12 Jan  2  2013 patch -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 pgrep -> /bin/busybox
-rwxr-xr-x 1 root root  14488 Jan 19 14:46 pidof
-rws--x--x 1 root root  39800 Feb 19  2015 ping
-rws--x--x 1 root root  44376 Feb 19  2015 ping6
lrwxrwxrwx 1 root root     12 Jan  2  2013 pipe_progress -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 pkill -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 pmap -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 powertop -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 printenv -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 printf -> /bin/busybox
-rwxr-xr-x 1 root root  97112 Jan 19 14:46 ps
lrwxrwxrwx 1 root root     12 Jan  2  2013 pscan -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 pstree -> /bin/busybox
-rwxr-xr-x 1 root root  31216 Oct 22 14:33 pwd
lrwxrwxrwx 1 root root     12 Jan  2  2013 pwdx -> /bin/busybox
lrwxrwxrwx 1 root root      4 Jan 19 14:55 rbash -> bash
lrwxrwxrwx 1 root root     12 Jan 19 14:46 rc-status -> /sbin/openrc
lrwxrwxrwx 1 root root     12 Jan  2  2013 readahead -> /bin/busybox
-rwxr-xr-x 1 root root  39344 Oct 22 14:33 readlink
lrwxrwxrwx 1 root root     12 Jan  2  2013 realpath -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 renice -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 reset -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 resize -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 rev -> /bin/busybox
-rwxr-xr-x 1 root root  59984 Oct 22 14:33 rm
-rwxr-xr-x 1 root root  43472 Oct 22 14:33 rmdir
lrwxrwxrwx 1 root root      4 Jan 19 14:54 rnano -> nano
-rwxr-xr-x 1 root root  58240 Jan 19 14:35 route
lrwxrwxrwx 1 root root     12 Jan  2  2013 rtcwake -> /bin/busybox
-rwxr-xr-x 1 root root  19232 Jan 22  2014 run-parts
lrwxrwxrwx 1 root root     12 Jan  2  2013 rx -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 script -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 scriptreplay -> /bin/busybox
-rwxr-xr-x 1 root root 134600 Dec 10  2012 sed
-rwxr-xr-x 1 root root  47568 Oct 22 14:33 seq
lrwxrwxrwx 1 root root     12 Jan  2  2013 setarch -> /bin/busybox
-rwxr-xr-x 1 root root  36080 Sep 26  2014 setfacl
-rwxr-xr-x 1 root root  14784 Aug  3  2015 setfattr
lrwxrwxrwx 1 root root     12 Jan  2  2013 setkeycodes -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 setserial -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 setsid -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 setuidgid -> /bin/busybox
lrwxrwxrwx 1 root root      4 Jan 19 14:55 sh -> bash
lrwxrwxrwx 1 root root     12 Jan  2  2013 sha1sum -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 sha256sum -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 sha512sum -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 showkey -> /bin/busybox
-rwxr-xr-x 1 root root  31120 Oct 22 14:33 sleep
lrwxrwxrwx 1 root root     12 Jan  2  2013 softlimit -> /bin/busybox
-rwxr-xr-x 1 root root 105680 Oct 22 14:33 sort
lrwxrwxrwx 1 root root     12 Jan  2  2013 split -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 stat -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 strings -> /bin/busybox
-rwxr-xr-x 1 root root  68080 Oct 22 14:33 stty
-rws--x--x 1 root root  36656 Oct 22 15:09 su
lrwxrwxrwx 1 root root     12 Jan  2  2013 sum -> /bin/busybox
-rwxr-xr-x 1 root root  27024 Oct 22 14:33 sync
lrwxrwxrwx 1 root root     12 Jan  2  2013 tac -> /bin/busybox
-rwxr-xr-x 1 root root  64144 Oct 22 14:33 tail
-rwxr-xr-x 1 root root 353600 Oct 22 14:37 tar
lrwxrwxrwx 1 root root     12 Jan  2  2013 tee -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 telnet -> /bin/busybox
-rwxr-xr-x 1 root root  10328 Jan 22  2014 tempfile
lrwxrwxrwx 1 root root     12 Jan  2  2013 test -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 tftp -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 tftpd -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 time -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 timeout -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 top -> /bin/busybox
-rwxr-xr-x 1 root root  60048 Oct 22 14:33 touch
-rwxr-xr-x 1 root root  43472 Oct 22 14:33 tr
lrwxrwxrwx 1 root root     12 Jan  2  2013 traceroute -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 traceroute6 -> /bin/busybox
-rwxr-xr-x 1 root root  26992 Oct 22 14:33 true
-rwxr-xr-x 1 root root  27024 Oct 22 14:33 tty
lrwxrwxrwx 1 root root     12 Jan  2  2013 ttysize -> /bin/busybox
-rwxr-xr-x 1 root root 498040 Jan 19 15:29 udevadm
lrwxrwxrwx 1 root root     12 Jan  2  2013 udhcpc6 -> /bin/busybox
-rws--x--x 1 root root  27336 Mar  9 16:10 umount
-rwxr-xr-x 1 root root  31184 Oct 22 14:33 uname
lrwxrwxrwx 1 root root      6 Feb 19  2015 uncompress -> gunzip
lrwxrwxrwx 1 root root     12 Jan  2  2013 unexpand -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 uniq -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 unix2dos -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 unlzma -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 unlzop -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 unxz -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 unzip -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 uptime -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 users -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 usleep -> /bin/busybox
-rwxr-xr-x 1 root root 118064 Oct 22 14:33 vdir
lrwxrwxrwx 1 root root     12 Jan  2  2013 vi -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 vlock -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 volname -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 wall -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 watch -> /bin/busybox
-rwxr-xr-x 1 root root  39472 Oct 22 14:33 wc
-rwxr-xr-x 1 root root  26952 Mar  9 16:10 wdctl
lrwxrwxrwx 1 root root     12 Jan  2  2013 wget -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 which -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 who -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 whoami -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 whois -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 xargs -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 xz -> /bin/busybox
lrwxrwxrwx 1 root root     12 Jan  2  2013 xzcat -> /bin/busybox
-rwxr-xr-x 1 root root  27024 Oct 22 14:33 yes
lrwxrwxrwx 1 root root      8 Jan 19 14:35 ypdomainname -> hostname
-rwxr-xr-x 1 root root   1941 Feb 19  2015 zcat
I also observe that the creation date for those symlinks corresponds pretty closely with the last time I built a new initramfs:

Code: Select all

rack dan # ls -l /initramfs/
total 56
drwxr-xr-x 2 root root 4096 Jan  3  2013 bin
drwxr-xr-x 2 root root 4096 Jan 15  2012 dev
drwxr-xr-x 4 root root 4096 Jan  3  2013 etc
drwxr-xr-x 4 root root 4096 Jan  3  2013 home
-rwxr--r-- 1 root root 1716 Jan  4  2013 init
-rwxr--r-- 1 root root 1712 Jan 15  2012 init.bak
drwxr-xr-x 2 root root 4096 Jan 15  2012 lib64
-rwxr-xr-x 1 root root  109 Jan  3  2013 mkinit.sh
drwxr-xr-x 2 root root 4096 Jan 15  2012 newroot
drwxr-xr-x 2 root root 4096 Jan 15  2012 proc
drwxr-xr-x 3 root root 4096 Jan 15  2012 root
drwxr-xr-x 2 root root 4096 Jan 15  2012 sbin
drwxr-xr-x 2 root root 4096 Jan 15  2012 sys
-rwxr-xr-x 1 root root  120 Jan  4  2013 test.sh
My conclusion is that when I was tinkering with the initramfs I must have done something that affected the main system. Thoughts on the best way to unravel this mistake?
Last edited by dewhite on Sat Mar 12, 2016 5:10 pm, edited 1 time in total.
Work FS: SM X10SRA | E5-2667v3 | 4x16Gb ECC RAM | Mirrored NVMe LUKS root | 2x 8TB ZFS Mirror
Home FS: HP Z440 | E5-2667v3 | 4x16Gb ECC RAM | Mirrored NVMe LUKS root | 2x 14TB ZFS Mirror
Top
dewhite
Tux's lil' helper
Tux's lil' helper
Posts: 107
Joined: Sun Mar 16, 2003 8:18 am
Location: Houston, Texas, USA
Contact:
Contact dewhite
Website

  • Quote

Post by dewhite » Sat Mar 12, 2016 5:04 pm

With just this little bit of additional information that you guys pointed me towards, I was able to search another thread on this topic which was very instructive:

https://forums.gentoo.org/viewtopic-p-6332409.html

Following the thoughts in the second-to-last post of that thread, I think I have solved the issue:

I used:

Code: Select all

rm `find /bin /sbin /usr/bin /usr/sbin -type l | xargs ls -l | grep "\-> /bin/busybox" | grep -o "[a-z]*/.*" | sed "s/-> \/bin\/busybox//g"`

Code: Select all

rack dan # rm `find /bin /sbin /usr/bin /usr/sbin -type l | xargs ls -l | grep "\-> /bin/busybox" | grep -o "[a-z]*/.*" | sed "s/-> \/bin\/busybox//g"`
rack dan # ls -l /bin
total 7540
-rws--x--x 1 root root  18752 Feb 19  2015 arping
-rwxr-xr-x 1 root root  10288 Aug  3  2015 attr
lrwxrwxrwx 1 root root     15 Jan  7  2014 awk -> ../usr/bin/gawk
-rwxr-xr-x 1 root root  31120 Oct 22 14:33 basename
-rwxr-xr-x 1 root root 725880 Jan 19 14:55 bash
lrwxrwxrwx 1 root root      7 Mar  9 17:24 bb -> busybox
lrwxrwxrwx 1 root root      5 Mar 14  2014 bunzip2 -> bzip2
-rwxr-xr-x 1 root root 976256 Mar  9 17:24 busybox
lrwxrwxrwx 1 root root      5 Mar 14  2014 bzcat -> bzip2
-rwxr-xr-x 1 root root  91600 Mar 14  2014 bzip2
-rwxr-xr-x 1 root root  51824 Oct 22 14:33 cat
-rwxr-xr-x 1 root root  14536 Sep 26  2014 chacl
-rwxr-xr-x 1 root root  59984 Oct 22 14:33 chgrp
-rwxr-xr-x 1 root root  55856 Oct 22 14:33 chmod
-rwxr-xr-x 1 root root  64080 Oct 22 14:33 chown
-rwxr-xr-x 1 root root  35376 Oct 22 14:33 chroot
-rwxr-xr-x 1 root root 134192 Oct 22 14:33 cp
-rwxr-xr-x 1 root root 149920 Mar  9 14:32 cpio
-rwxr-xr-x 1 root root  39408 Oct 22 14:33 cut
-rwxr-xr-x 1 root root  64080 Oct 22 14:33 date
-rwxr-xr-x 1 root root  60064 Oct 22 14:33 dd
-rwxr-xr-x 1 root root  97632 Oct 22 14:33 df
-rwxr-xr-x 1 root root 118064 Oct 22 14:33 dir
-rwxr-xr-x 1 root root  27024 Oct 22 14:33 dirname
-rwxr-xr-x 1 root root  56272 Mar  9 16:10 dmesg
lrwxrwxrwx 1 root root      8 Jan 19 14:35 dnsdomainname -> hostname
lrwxrwxrwx 1 root root      8 Jan 19 14:35 domainname -> hostname
-rwxr-xr-x 1 root root 113488 Oct 22 14:33 du
-rwxr-xr-x 1 root root  31120 Oct 22 14:33 echo
-rwxr-xr-x 1 root root    158 Feb 19  2015 egrep
-rwxr-xr-x 1 root root  31152 Oct 22 14:33 env
-rwxr-xr-x 1 root root  39376 Oct 22 14:33 expr
-rwxr-xr-x 1 root root  26992 Oct 22 14:33 false
-rwxr-xr-x 1 root root    158 Feb 19  2015 fgrep
-rwxr-xr-x 1 root root  45136 Mar  9 16:10 findmnt
-rwxr-xr-x 1 root root  31648 Feb 19  2015 fuser
-rwxr-xr-x 1 root root  23536 Sep 26  2014 getfacl
-rwxr-xr-x 1 root root  19184 Aug  3  2015 getfattr
-rwxr-xr-x 1 root root 154760 Feb 19  2015 grep
-rwxr-xr-x 1 root root  10344 Oct 22 15:09 groups
-rwxr-xr-x 1 root root   2301 Feb 19  2015 gunzip
-rwxr-xr-x 1 root root  98016 Feb 19  2015 gzip
-rwxr-xr-x 1 root root  39408 Oct 22 14:33 head
-rwxr-xr-x 1 root root  14472 Jan 19 14:35 hostname
-rwxr-xr-x 1 root root  72504 Jan 19 14:35 ifconfig
-rwxr-xr-x 1 root root 384560 Mar  9 14:35 ip
-rwxr-xr-x 1 root root  27040 Sep 26  2014 keyctl
-rwxr-xr-x 1 root root  22872 Jan 19 14:46 kill
-rwxr-xr-x 1 root root 146256 Jan 19 14:49 kmod
-rwxr-xr-x 1 root root  55904 Oct 22 14:33 ln
-rwxr-xr-x 1 root root  44688 Oct 22 15:09 login
-rwxr-xr-x 1 root root 118064 Oct 22 14:33 ls
-rwxr-xr-x 1 root root  72792 Mar  9 16:10 lsblk
lrwxrwxrwx 1 root root      4 Jan 19 14:49 lsmod -> kmod
lrwxrwxrwx 1 root root     13 Jan  5  2013 mail -> /usr/bin/mail
-rwxr-xr-x 1 root root   9708 Jan 19 14:40 mbchk
-rwxr-xr-x 1 root root  51760 Oct 22 14:33 mkdir
-rwxr-xr-x 1 root root  31152 Oct 22 14:33 mkfifo
-rwxr-xr-x 1 root root  35280 Oct 22 14:33 mknod
-rwxr-xr-x 1 root root  39440 Oct 22 14:33 mktemp
lrwxrwxrwx 1 root root      4 Jan 19 14:49 modinfo -> kmod
-rwxr-xr-x 1 root root  39480 Mar  9 16:10 more
-rws--x--x 1 root root  39880 Mar  9 16:10 mount
-rwxr-xr-x 1 root root  14496 Mar  9 16:10 mountpoint
-rwxr-xr-x 1 root root 121888 Oct 22 14:33 mv
-rwxr-xr-x 1 root root 204128 Jan 19 14:54 nano
-rwxr-xr-x 1 root root 128760 Jan 19 14:35 netstat
lrwxrwxrwx 1 root root      8 Jan 19 14:35 nisdomainname -> hostname
-rws--x--x 1 root root  46760 Oct 22 15:09 passwd
-rwxr-xr-x 1 root root  14488 Jan 19 14:46 pidof
-rws--x--x 1 root root  39800 Feb 19  2015 ping
-rws--x--x 1 root root  44376 Feb 19  2015 ping6
-rwxr-xr-x 1 root root  97112 Jan 19 14:46 ps
-rwxr-xr-x 1 root root  31216 Oct 22 14:33 pwd
lrwxrwxrwx 1 root root      4 Jan 19 14:55 rbash -> bash
lrwxrwxrwx 1 root root     12 Jan 19 14:46 rc-status -> /sbin/openrc
-rwxr-xr-x 1 root root  39344 Oct 22 14:33 readlink
-rwxr-xr-x 1 root root  59984 Oct 22 14:33 rm
-rwxr-xr-x 1 root root  43472 Oct 22 14:33 rmdir
lrwxrwxrwx 1 root root      4 Jan 19 14:54 rnano -> nano
-rwxr-xr-x 1 root root  58240 Jan 19 14:35 route
-rwxr-xr-x 1 root root  19232 Jan 22  2014 run-parts
-rwxr-xr-x 1 root root 134600 Dec 10  2012 sed
-rwxr-xr-x 1 root root  47568 Oct 22 14:33 seq
-rwxr-xr-x 1 root root  36080 Sep 26  2014 setfacl
-rwxr-xr-x 1 root root  14784 Aug  3  2015 setfattr
lrwxrwxrwx 1 root root      4 Jan 19 14:55 sh -> bash
-rwxr-xr-x 1 root root  31120 Oct 22 14:33 sleep
-rwxr-xr-x 1 root root 105680 Oct 22 14:33 sort
-rwxr-xr-x 1 root root  68080 Oct 22 14:33 stty
-rws--x--x 1 root root  36656 Oct 22 15:09 su
-rwxr-xr-x 1 root root  27024 Oct 22 14:33 sync
-rwxr-xr-x 1 root root  64144 Oct 22 14:33 tail
-rwxr-xr-x 1 root root 353600 Oct 22 14:37 tar
-rwxr-xr-x 1 root root  10328 Jan 22  2014 tempfile
-rwxr-xr-x 1 root root  60048 Oct 22 14:33 touch
-rwxr-xr-x 1 root root  43472 Oct 22 14:33 tr
-rwxr-xr-x 1 root root  26992 Oct 22 14:33 true
-rwxr-xr-x 1 root root  27024 Oct 22 14:33 tty
-rwxr-xr-x 1 root root 498040 Jan 19 15:29 udevadm
-rws--x--x 1 root root  27336 Mar  9 16:10 umount
-rwxr-xr-x 1 root root  31184 Oct 22 14:33 uname
lrwxrwxrwx 1 root root      6 Feb 19  2015 uncompress -> gunzip
-rwxr-xr-x 1 root root 118064 Oct 22 14:33 vdir
-rwxr-xr-x 1 root root  39472 Oct 22 14:33 wc
-rwxr-xr-x 1 root root  26952 Mar  9 16:10 wdctl
-rwxr-xr-x 1 root root  27024 Oct 22 14:33 yes
lrwxrwxrwx 1 root root      8 Jan 19 14:35 ypdomainname -> hostname
-rwxr-xr-x 1 root root   1941 Feb 19  2015 zcat
Work FS: SM X10SRA | E5-2667v3 | 4x16Gb ECC RAM | Mirrored NVMe LUKS root | 2x 8TB ZFS Mirror
Home FS: HP Z440 | E5-2667v3 | 4x16Gb ECC RAM | Mirrored NVMe LUKS root | 2x 14TB ZFS Mirror
Top
khayyam
Watchman
Watchman
User avatar
Posts: 6227
Joined: Thu Jun 07, 2012 2:45 am
Location: Room 101

  • Quote

Post by khayyam » Sat Mar 12, 2016 5:18 pm

dewhite wrote:My conclusion is that when I was tinkering with the initramfs I must have done something that effected the main system. Thoughts on the best way to unravel this mistake?
dewhite ... that would be the most obvious conclusion. There are vavious ways of checking package integrity, 'equery check' (app-portage/gentoolkit), 'qcheck -Ba' (app-portage/portage-utils), etc, but these will produce false positives (as they will also catch edited config files, and the like). So, assuming its only files in /bin that are effected then the following should provide a list of those effected binaries.

Code: Select all

# find /var/db/pkg/ -name "CONTENTS" | xargs awk '/^obj\s\/bin/{print $3,$2}' |md5sum -c 2>/dev/null | grep -v "OK" | sort
You could then generate a list form that using 'equery belongs -e' on those binaries, but I expect it should be easy to figure out without doing that, and after re-merging the suspected packages re-runing the above should return no matches.

If you wanted a more complete list then the following will do that (again, with false positives).

Code: Select all

# equery -NC check $(qlist -IC) 2> failed-equery-check.txt
HTH & best ... khay
Top
EmaRsk
Apprentice
Apprentice
Posts: 158
Joined: Tue Sep 07, 2004 9:14 am
Location: Italy

  • Quote

Post by EmaRsk » Sun Mar 13, 2016 12:01 am

dewhite, if this can help, I checked on my system where the binaries linked to busybox in your /bin/ are:
  • there are some missing, that I have not installed at all
  • iptunnel and killall5 are in /sbin/
  • lspci, powertop, rtcwake and tftpd are in /usr/sbin/
  • all the others are in /usr/bin/
So that's why you see the problem only with root: your regular user looks in /usr/bin/ first and finds the "real" binaries, while your root looks in /bin/ first and finds the busybox versions.
You probably still have everything installed as it should be, and you just need to re-emerge busybox with USE="-make-symlinks", or just change the order in root's $PATH.
Please, avoid some common spelling errors:
http://theoatmeal.com/comics/misspelling
Top
Post Reply

7 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic