Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Upgrading the BusyBox binary?

  1. #1
    Join Date
    Jul 2011
    Location
    Merrimack, NH, USA
    Posts
    28

    Default Upgrading the BusyBox binary?

    I can't help but notice that the BusyBox BadIntentions supplied with his Rooter plug-in is vastly superior to the stock binary:

    Code:
    [root@javelin]# ./busybox
    BusyBox v1.00-rc2 (2006.11.07-01:55+0000) multi-call binary
    
    Usage: busybox [function] [arguments]...
       or: [function] [arguments]...
    
            BusyBox is a multi-call binary that combines many common Unix
            utilities into a single executable.  Most people will create a
            link to busybox for each function they wish to use, and BusyBox
            will act like whatever it was invoked as.
    
    Currently defined functions:
            [, ash, basename, bunzip2, busybox, bzcat, cat, chgrp, chmod,
            chroot, chvt, clear, cmp, cp, cut, dd, deallocvt, df, dirname,
            dmesg, du, echo, egrep, env, expr, false, fgrep, free, getty,
            grep, gunzip, gzip, head, hostname, id, ifconfig, insmod, install,
            kill, killall, ln, loadkmap, logger, login, ls, lsmod, mkdir,
            mknod, mkswap, more, mv, netstat, nslookup, openvt, passwd, pidof,
            ping, ps, pwd, reset, rm, rmdir, rmmod, route, run-parts, sed,
            sh, sleep, sort, start-stop-daemon, strings, stty, sulogin, swapoff,
            swapon, sync, tail, tar, tee, test, time, top, touch, tr, true,
            tty, uname, uniq, unzip, uptime, usleep, vi, vlock, wc, whoami,
            xargs, yes, zcat
    ... vs ...

    Code:
    [root@javelin]# /APP/Rooter/bin/busybox
    BusyBox v1.18.4 (2011-04-04 20:06:35 CDT) multi-call binary.
    Copyright (C) 1998-2009 Erik Andersen, Rob Landley, Denys Vlasenko
    and others. Licensed under GPLv2.
    See source distribution for full notice.
    
    Usage: busybox [function] [arguments]...
       or: busybox --list[-full]
       or: function [arguments]...
    
            BusyBox is a multi-call binary that combines many common Unix
            utilities into a single executable.  Most people will create a
            link to busybox for each function they wish to use and BusyBox
            will act like whatever it was invoked as.
    
    Currently defined functions:
            [, [[, acpid, add-shell, addgroup, adduser, adjtimex, arp, arping, ash,
            awk, base64, basename, beep, blkid, blockdev, bootchartd, brctl,
            bunzip2, bzcat, bzip2, cal, cat, catv, chat, chattr, chgrp, chmod,
            chown, chpasswd, chpst, chroot, chrt, chvt, cksum, clear, cmp, comm,
            cp, cpio, crond, crontab, cryptpw, cttyhack, cut, date, dc, dd,
            deallocvt, delgroup, deluser, depmod, devmem, df, dhcprelay, diff,
            dirname, dmesg, dnsd, dnsdomainname, dos2unix, du, dumpkmap,
            dumpleases, echo, ed, egrep, eject, env, envdir, envuidgid, ether-wake,
            expand, expr, fakeidentd, false, fbset, fbsplash, fdflush, fdformat,
            fdisk, fgconsole, fgrep, find, findfs, flock, fold, free, freeramdisk,
            fsck, fsck.minix, fsync, ftpd, ftpget, ftpput, fuser, getopt, getty,
            grep, gunzip, gzip, halt, hd, hdparm, head, hexdump, hostid, hostname,
            httpd, hush, hwclock, id, ifconfig, ifdown, ifenslave, ifplugd, ifup,
            inetd, init, insmod, install, ionice, iostat, ip, ipaddr, ipcalc,
            ipcrm, ipcs, iplink, iproute, iprule, iptunnel, kbd_mode, kill,
            killall, killall5, klogd, last, length, less, linux32, linux64,
            linuxrc, ln, loadfont, loadkmap, logger, login, logname, logread,
            losetup, lpd, lpq, lpr, ls, lsattr, lsmod, lspci, lsusb, lzcat, lzma,
            lzop, lzopcat, makedevs, makemime, man, md5sum, mdev, mesg, microcom,
            mkdir, mkdosfs, mke2fs, mkfifo, mkfs.ext2, mkfs.minix, mkfs.vfat,
            mknod, mkpasswd, mkswap, mktemp, modinfo, modprobe, more, mount,
            mountpoint, mpstat, mt, mv, nameif, nbd-client, nc, netstat, nice,
            nmeter, nohup, nslookup, ntpd, od, openvt, passwd, patch, pgrep, pidof,
            ping, ping6, pipe_progress, pivot_root, pkill, pmap, popmaildir,
            poweroff, powertop, printenv, printf, ps, pscan, pwd, raidautorun,
            rdate, rdev, readahead, readlink, readprofile, realpath, reboot,
            reformime, remove-shell, renice, reset, resize, rev, rm, rmdir, rmmod,
            route, rpm, rpm2cpio, rtcwake, run-parts, runlevel, runsv, runsvdir,
            rx, script, scriptreplay, sed, sendmail, seq, setarch, setconsole,
            setfont, setkeycodes, setlogcons, setsid, setuidgid, sh, sha1sum,
            sha256sum, sha512sum, showkey, slattach, sleep, smemcap, softlimit,
            sort, split, start-stop-daemon, stat, strings, stty, su, sulogin, sum,
            sv, svlogd, swapoff, swapon, switch_root, sync, sysctl, syslogd, tac,
            tail, tar, tcpsvd, tee, telnet, telnetd, test, tftp, tftpd, time,
            timeout, top, touch, tr, traceroute, traceroute6, true, tty, ttysize,
            tunctl, udhcpc, udhcpd, udpsvd, umount, uname, unexpand, uniq,
            unix2dos, unlzma, unlzop, unxz, unzip, uptime, usleep, uudecode,
            uuencode, vconfig, vi, vlock, volname, wall, watch, watchdog, wc, wget,
            which, who, whoami, xargs, xz, xzcat, yes, zcat, zcip
    Would I break anything by upgrading /bin/busybox with the bigger, better, more robust version?

    - Dave

  2. #2
    Join Date
    May 2010
    Location
    In the land of make believe.
    Posts
    501

    Default

    You can try, but i didn't compile it quite right. Now that I have an SDK version of the Javelin, rebuilding it should give better results.

    You should be able to reboot and undo it if it goes wrong, since most of root is a ramdisk.
    I AM NOT A PATRIOT MEMORY EMPLOYEE.

    But they have, on occasion, bribed me with hardware.



    I am happy to help, but don't PM me. Post a thread in the appropriate forum so others may benefit and offer assistance.
    Your lack of planning is not an emergency on my part.

  3. #3
    Join Date
    Jul 2011
    Location
    Merrimack, NH, USA
    Posts
    28

    Smile

    Given the safety net of rebooting to rebuild the ramdisk, I gave it a shot. So far, the system is still up and I have a much more robust shell environment.

    Note that you can't use busybox to overwrite busybox, so you have to be a little creative:

    Code:
    [root@javelin]# cp /APP/Rooter/bin/busybox .
    cp: unable to open `./busybox': Text file busy
    [root@javelin]# /APP/Rooter/bin/busybox cp /APP/Rooter/bin/busybox .
    [root@javelin]# ls -l busybox
    -rwxr--r--    1 root     root       1116068 Jul 27 23:39 busybox
    As a total hack, I used the attached shell script to symlink all the new shell commands into /bin:

    bb.sh.txt

    No warranty expressed or implied.

    - Dave

  4. #4
    Join Date
    May 2010
    Location
    In the land of make believe.
    Posts
    501

    Default

    As an added benefit, when you use my busybox, you get colorful shell without re-aliasing!


    I have a new 1.18.5 binary compiled native on the Javelin's toolchain. I don't know if its 'better' but here it is. Its as full featured as I can make it using the proper Javelin toolchain.

    busybox1-18-5.zip
    Last edited by BadIntentions; 07-28-2011 at 02:19 AM. Reason: Edited out bad info, only applied to my modded Javelin
    I AM NOT A PATRIOT MEMORY EMPLOYEE.

    But they have, on occasion, bribed me with hardware.



    I am happy to help, but don't PM me. Post a thread in the appropriate forum so others may benefit and offer assistance.
    Your lack of planning is not an emergency on my part.

  5. #5
    Join Date
    Jul 2011
    Location
    Merrimack, NH, USA
    Posts
    28

    Default

    Quote Originally Posted by BadIntentions View Post
    I have a new 1.18.5 binary compiled native on the Javelin's toolchain. I don't know if its 'better' but here it is. Its as full featured as I can make it using the proper Javelin toolchain.
    Thanks! I installed your binary and it looks good. The previous one used to stop the DLNA Server (Status = "OFF") for some reason, but this one allows it to remain happy.

    I tried 'busybox --install' and got a page full of "Invalid cross-device link" errors:

    Code:
    [root@javelin]# busybox --install
    busybox: /usr/bin/[: Invalid cross-device link
    busybox: /usr/bin/[[: Invalid cross-device link
    busybox: /usr/bin/add-shell: Invalid cross-device link
    busybox: /usr/bin/arping: Invalid cross-device link
    busybox: /usr/bin/awk: Invalid cross-device link
    busybox: /usr/bin/basename: Invalid cross-device link
    busybox: /usr/bin/beep: Invalid cross-device link
    busybox: /usr/sbin/brctl: Invalid cross-device link
    busybox: /usr/bin/bunzip2: Invalid cross-device link
    busybox: /usr/bin/bzcat: Invalid cross-device link
    busybox: /usr/bin/bzip2: Invalid cross-device link
    busybox: /usr/bin/cal: Invalid cross-device link
    busybox: /usr/bin/chat: Invalid cross-device link
    busybox: /usr/sbin/chpasswd: Invalid cross-device link
    ...
    Is this the best way to update the symlinks for the new shell commands?

    I tried creating another quick 'n dirty shell script to create the symlinks:

    #!/bin/sh
    cd /bin
    #
    /VOLUME1/DOWNLOAD/busybox cp /VOLUME1/DOWNLOAD/busybox .
    #
    for i in $(busybox --list-full)
    do
    if [ ! -f /$i ]
    then
    ln -s busybox /$i
    fi
    done


    but then realized that /usr was a read-only filesystem. I s'pose I could stuff all the symlinks into /bin, but it would've been cooler to put them where BusyBox thinks they belong.

    - Dave
    Last edited by ViperGeek; 07-28-2011 at 04:34 AM.

  6. #6
    Join Date
    May 2010
    Location
    In the land of make believe.
    Posts
    501

    Default

    Yeah, I noticed that. Then I fixed it.

    busybox1-18-5-INSTALLFIX.zip

    This one fully installs now with the --install command. You must overwrite the old busybox, which is somewhat tricky.

    try this:

    Code:
    /APP/Rooter/bin/busybox chmod +x /VOLUME1/UPLOAD/busybox
    /APP/Rooter/bin/busybox cp /VOLUME1/UPLOAD/busybox /bin/busybox
    then execute the installation.

    Code:
    /bin/busybox --install
    and bask in the um... glory?

    Code:
    [root@s4]# busybox
    BusyBox v1.18.5 (2011-07-28 13:43:46 CST) multi-call binary.
    Copyright (C) 1998-2009 Erik Andersen, Rob Landley, Denys Vlasenko
    and others. Licensed under GPLv2.
    See source distribution for full notice.
    
    Usage: busybox [function] [arguments]...
       or: busybox --list[-full]
       or: function [arguments]...
    
            BusyBox is a multi-call binary that combines many common Unix
            utilities into a single executable.  Most people will create a
            link to busybox for each function they wish to use and BusyBox
            will act like whatever it was invoked as.
    
    Currently defined functions:
            [, [[, acpid, add-shell, addgroup, adduser, adjtimex, arp, arping, ash, awk, base64, basename, beep, blkid, blockdev, bootchartd, brctl, bunzip2,
            bzcat, bzip2, cal, cat, catv, chat, chattr, chgrp, chmod, chown, chpasswd, chpst, chroot, chrt, chvt, cksum, clear, cmp, comm, cp, cpio, crond,
            crontab, cryptpw, cttyhack, cut, date, dc, dd, deallocvt, delgroup, deluser, depmod, devmem, df, dhcprelay, diff, dirname, dmesg, dnsd,
            dnsdomainname, dos2unix, du, dumpkmap, dumpleases, echo, ed, egrep, eject, env, envdir, envuidgid, ether-wake, expand, expr, fakeidentd, false,
            fbset, fbsplash, fdflush, fdformat, fdisk, fgconsole, fgrep, find, findfs, flock, fold, free, freeramdisk, fsck, fsck.minix, fsync, ftpd, ftpget,
            ftpput, fuser, getopt, getty, grep, gunzip, gzip, halt, hd, hdparm, head, hexdump, hostid, hostname, httpd, hush, hwclock, id, ifconfig, ifdown,
            ifenslave, ifplugd, ifup, inetd, init, insmod, install, iostat, ip, ipaddr, ipcalc, ipcrm, ipcs, iplink, iproute, iprule, iptunnel, kbd_mode, kill,
            killall, killall5, klogd, last, length, less, linux32, linux64, linuxrc, ln, loadfont, loadkmap, logger, login, logname, logread, losetup, lpd, lpq,
            lpr, ls, lsattr, lsmod, lspci, lsusb, lzcat, lzma, lzop, lzopcat, makedevs, makemime, man, md5sum, mdev, mesg, microcom, mkdir, mkdosfs, mke2fs,
            mkfifo, mkfs.ext2, mkfs.minix, mkfs.vfat, mknod, mkpasswd, mkswap, mktemp, modinfo, modprobe, more, mount, mountpoint, mpstat, mt, mv, nameif,
            nbd-client, nc, netstat, nice, nmeter, nohup, nslookup, ntpd, od, openvt, passwd, patch, pgrep, pidof, ping, ping6, pipe_progress, pivot_root,
            pkill, pmap, popmaildir, poweroff, powertop, printenv, printf, ps, pscan, pwd, raidautorun, rdate, rdev, readahead, readlink, readprofile, realpath,
            reboot, reformime, remove-shell, renice, reset, resize, rev, rm, rmdir, rmmod, route, rpm, rpm2cpio, rtcwake, run-parts, runlevel, runsv, runsvdir,
            rx, script, scriptreplay, sed, sendmail, seq, setarch, setconsole, setfont, setkeycodes, setlogcons, setsid, setuidgid, sh, sha1sum, sha256sum,
            sha512sum, showkey, slattach, sleep, smemcap, softlimit, sort, split, start-stop-daemon, stat, strings, stty, su, sulogin, sum, sv, svlogd, swapoff,
            swapon, switch_root, sync, sysctl, syslogd, tac, tail, tar, tcpsvd, tee, telnet, telnetd, test, tftp, tftpd, time, timeout, top, touch, tr,
            traceroute, traceroute6, true, tty, ttysize, tunctl, udhcpc, udhcpd, udpsvd, umount, uname, unexpand, uniq, unix2dos, unlzma, unlzop, unxz, unzip,
            uptime, usleep, uudecode, uuencode, vconfig, vi, vlock, volname, wall, watch, watchdog, wc, wget, which, who, whoami, xargs, xz, xzcat, yes, zcat,
            zcip

    Edit to add:

    *sighs* I just realized i could add this to the rooter plugin, as well as automatically installing it. I'll have to repackage the whole shebang a bit later...
    Last edited by BadIntentions; 07-28-2011 at 05:47 AM.
    I AM NOT A PATRIOT MEMORY EMPLOYEE.

    But they have, on occasion, bribed me with hardware.



    I am happy to help, but don't PM me. Post a thread in the appropriate forum so others may benefit and offer assistance.
    Your lack of planning is not an emergency on my part.

  7. #7
    Join Date
    Jul 2011
    Location
    Merrimack, NH, USA
    Posts
    28

    Default

    Sheer genius:

    Code:
    [root@javelin]# ./busybox cp busybox /bin
    [root@javelin]# cd /bin
    [root@javelin]# busybox --install
    [root@javelin]# which busybox
    /bin/busybox
    [root@javelin]#
    Thanks for the awesome work! Now I have to go to bed.

    - Dave

  8. #8

    Default

    You should consider a sticky with the latest build. That's always a good thing.

  9. #9
    Join Date
    May 2010
    Location
    In the land of make believe.
    Posts
    501

    Default

    I'll probably package a few of my plugins up in a nice post once they are stable and well tested. I'm pushing hard on the youtube downloader right now

    Busybox though, for an example, is actually quite stable as it doesn't add new functions very often. It is a mature product that generally only releases bugfixes. This is probably the build i will wrap into the final version of my rooter plugin once development is complete.
    I AM NOT A PATRIOT MEMORY EMPLOYEE.

    But they have, on occasion, bribed me with hardware.



    I am happy to help, but don't PM me. Post a thread in the appropriate forum so others may benefit and offer assistance.
    Your lack of planning is not an emergency on my part.

  10. #10
    Join Date
    Mar 2012
    Location
    NYC, NY
    Posts
    90

    Default

    Hey BadIntentions.

    can you please include this latest binary with the rooter plugin? I installed rooter today and Im still on 1.18.4

    Edit:
    In the mean time, for those noobs like me...

    Download the Attached Zip
    unzip busybox to the Nas UPLOAD dir

    then

    Code:
    [admin@nas]# sudo ./busybox chmod +x /VOLUME1/UPLOAD/busybox
    [admin@nas]# sudo ./busybox cp /VOLUME1/UPLOAD/busybox /bin/busybox
    [admin@nas]# sudo /bin/busybox --install
    [admin@nas1]# sudo busybox
    BusyBox v1.18.5 (2011-07-28 13:43:46 CST) multi-call binary.
    Copyright (C) 1998-2009 Erik Andersen, Rob Landley, Denys Vlasenko
    and others. Licensed under GPLv2.
    P.S. I am using the "enable admin" version of rooter script that I created, hence the SUDO commands
    Last edited by ruben00; 03-09-2012 at 05:12 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •