Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [busybox]

BusyBox combines tiny versions of many common UNIX utilities into a single small executable.

0
votes
0answers
16 views

busybox / init.d daemon to monitor result of script

I'm looking to run a script upon a GPIO pin being set (button press) on ARM. I do not want to use sysfs. I found a tool (libgpiod) that can read this event. I can run gpiomon and it writes to the ...
1
vote
2answers
30 views

Busybox: Find all files on partition that have been modified since power-on

I am trying to come up with a Busybox-compatible script (or one-liner) that lists every file inside a specified partition that has been modified since the last power-on. This should include files that ...
0
votes
0answers
30 views

Linux system process activity suspended

Introduction: I am running a cpp application on an embedded systems device with onboard Linux, which gathers sensor data, prepares it into a JSON formatted string payload and publishes the payload on ...
0
votes
1answer
24 views

Alpine 3.9.4 update busybox 1.30.0

I am using latest stable version of alpine 3.9.4 image. this image comes with busybox -1.29.3-r10. I need to upgrade to busybox 1.30.0. apk upgrade busybox command not upgrading the package. What is ...
1
vote
1answer
24 views

Truncated Syslog on OpenWrt

I configured OpenWrt to send syslog to a remote system. This has been working nicely for a long time, however I was missing logs from nginx. nginx on OpenWrt does not support logging to syslog, so ...
0
votes
1answer
63 views

Ubuntu won't boot [duplicate]

My laptop ran out of power and when I went to plug it in and power it on, Ubuntu no longer boots. I get directed to BusyBox built in shell that looks exactly like: BusyBox v1.27.2 (Ubuntu 1:1.27.2-...
2
votes
1answer
36 views

Pass script to background using script itself

It is possible to do something like this: nohup ./run.sh > /dev/null 2>&1 & Which sends the process to background, discards its output and allows us to close terminal. Is there any ...
0
votes
1answer
27 views

Why does docker run busybox timeout not work?

I'm trying to make a script to quickly test whether the network connection works inside docker using busybox. All of these tests failed to timeout after 5 seconds (they took 30 seconds to timeout): ...
0
votes
1answer
55 views

Replacing busybox in an embedded device

I'm using busybox in an embedded device. The built-in busybox is rather limited. So I want try to replace busybox in place with new, more complete version. I find some info about replacing Busybox on ...
1
vote
1answer
50 views

How to test whether my tail is posixly correct?

I'm having problems with a vim interface for the theorem prover HOL: https://github.com/HOL-Theorem-Prover/HOL/tree/master/tools/vim I run it on MobaXterm, a cygwin-based system, and vim is freezing ...
3
votes
1answer
123 views

Where is the PS1 prompt variable set in ash shell?

I have a NAS drive from Western Digital. I can ssh into it, and when I log in, the first line that appears is: BusyBox v1.20.2 (2014-10-30 15:28:59 CST) built-in shell (ash) I don't like the default ...
0
votes
1answer
429 views

tftp - Error code 1: File not found

I need the correct syntax of tftp to get and put file. My ultimate goal is using busybox tftp (this should be second question), but it failed even trying to test with local Ubuntu tftp client. As you ...
1
vote
0answers
48 views

A more permanent change to readonly squashfs mounted /etc

I have an IP-camera with the BusyBox v1.22.1 operating system that has some accounts either without or with public known passwords that I want to change to make it more secure. I have managed to log ...
0
votes
1answer
52 views

busybox - Can't detect grub binaries

I compiled GRUB from source, using pretty much default settings in a chroot debian sid environment using default --prefix so it installed in /usr/local. When I copied the files over to a system with ...
2
votes
2answers
384 views

date command in busybox not accepting formatted input date

I want to set the date using busybox's date command (BusyBox v1.21.0). My custom date to which I want to set the computer is of this form: Tue, 15 Jan 2019 10:46:13 GMT What my date command is ...
0
votes
1answer
115 views

Set date on embedded linux with limited busybox (no ntp)

I am trying to automatically set a date after boot on an embeddd linux with busybox ( I dont have a RTC). I also dont have ntp command in busybox, nor curl. My wget is very limited too, and I cant ...
5
votes
3answers
266 views

Portable way to invoke tar with a list of files from stdin

I want to create a .tgz from the content of a directory. I also want to strip the leading "./" from the tar'ed content. I had done this as follows: cd /path/to/files/ && find . -type f | cut -...
1
vote
1answer
79 views

Busybox USB Ethernet adapter

I have an embedded device running busybox on an ARM 7 processor. How would I go about using a USB -> Ethernet adapter for network connectivity? Currently I only have a serial console. The system ...
0
votes
1answer
30 views

nc server does not work if launched on startup

I wrote a (ba)sh script to write to a file the content received from a POST method: #!/bin/sh PORT=$1 FILE=$2 while true do echo -e "HTTP/1.1 200 OK\n\n" | ./busybox-armv7l nc -l -p $PORT | tr '[\...
0
votes
1answer
542 views

Why is there no /var/log/kern.log?

I have an embedded system running a slim installation of Buildroot Linux with kernel 3.10.105. Apparently most commands come from BusyBox here, and it seems those do not always implement the full ...
1
vote
0answers
89 views

File not found when running a simple busybox system

I'm running Linux 4.1 and booting into a simple busybox environment. Busybox and shadow packages have been built as static and installed in my rootFS. Busybox is used for the /sbin/init and shadow's ...
3
votes
2answers
562 views

Remove busybox from buildroot

As part of Linux hardening we want to remove busybox from filesystem created with buildroot. But I am not sure if system can boot without it. I am quite sure that there are init files that depends ...
2
votes
1answer
1k views

Cannot Install busybox on centos

When running sudo yum install busybox On Centos 07 I receive this error Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.vorboss.net * extras: repo.uk....
1
vote
0answers
198 views

Cannot access nand or emmc partition from linux

I have a i.mx6 based board running using buildroot and linux. This board have two storages nand and emmc. The nand had full rootfs and kernel on itself. I am now booting from SD card. From the boot ...
0
votes
1answer
185 views

if statement: 'fi' unexpected

I have made a shell with an if statment, all newline characters are LF (Linux), when i try to execute the shell, i get an "syntax error: 'fi' unexpected". if [ "$(ls -A /storage/$SDCARD_DIR/Android/...
0
votes
1answer
156 views

Change UEFI boot order from busybox

After generate a new efi boot entry with efibootmgr: # efibootmgr -c -g -L "Debian (EFI stub)" -l '\EFI\debian\vmlinuz' -u "root=UUID=955548bd-9c77-4893-8633-3a5e7966dfc9 ro quiet rootfstype=ext4 ...
4
votes
1answer
143 views

gunzip on Embedded machine

I'm using BusyBox 1.24.1 on my Embedded Linux machine (with kernel v3.10.31) and I get behavior I can't understand when unzipping files.  The gunzip command (often, but not always) fails, with no ...
2
votes
2answers
669 views

How to remove every file and folder recursively except for a few specific folders?

Having the Busybox ash shell at hand, I wish to cleanup the /opt folder. Cleanup means to remove every file and folder recursively except for a few exclusion paths that need to be left untouched. ...
4
votes
0answers
1k views

Accessing regular linux commands in Huawei's Dopra Linux

Backstory: I have a Huawei HG8245 router in my house and I want to change the default username/password. I've tried following this guide but the config file always gets reset. My ISP isn't helping ...
0
votes
1answer
302 views

Split string in ash shell? (BusyBox)

I'm trying to split a string in ash shell using only the tools provided in BusyBox. The string is of the format host-name:port,host-name2:port2 but I only care about the first hostname and port, both ...
9
votes
2answers
1k views

Finding files older than x days on a system with a stripped down busybox

I need to find and delete files older than 1 week in the Development unit. There are limited number utilities available on this unit. -mtime find's predicate is not available. How do I check all files ...
1
vote
0answers
175 views

can't build busybox with musl [closed]

I tried a lot of different configurations with musl and busybox but i can't get it to work. Starting out i though that busybox would build /bin /usr /sbin and musl would give me /lib and magically ...
2
votes
2answers
40 views

Find latest file by numbered extension

I want to automatically clean up the oldest log files first in an embedded system where the clock may be reset (so file times are not useful). I am looking for a simple shell script to find the latest ...
0
votes
0answers
138 views

Disable commands in Alpine Linux

I want to attempt to increase the security of some Alpine Linux Docker containers which run Nginx and other servers. I would like to disable commands like ls, cat, ed or sed, so that they are ...
1
vote
3answers
1k views

How to mount USB drive in udev rule?

I setup a rule in udev to run a script in background to automount the USB drive. It managed to run the script fine, but the mounting is failing for some reason. RULE: ACTION=="add", KERNEL=="sd[a-z]*...
0
votes
1answer
541 views

I want to run a command in background without cron with specific time

My command is ppp-ublox-on to activate GSM ppp0. After 25 minutes interval the PPP0 disconnect .and I need to run the command ppp-ublox -on again manually. I am using busy box. ppp-ublox-on script is ...
3
votes
2answers
2k views

Installing busybox for ubuntu

I'm trying to create an initramfs for ubuntu using this guide. How do I "re-create" the USE="static" emerge -av busyboxcommand on ubuntu, as emerge is gentoo-specific command? Basically, what are the ...
0
votes
1answer
92 views

Get Variables from Grep Output

I am running a grep command and getting the output below: user@hostname:~$ ps -o args | grep lp_ | grep -v grep | sort -n /usr/local/bin/lp_server -n 5964 -d /dev/usb/lp1 /usr/local/bin/lp_server -n ...
0
votes
1answer
371 views

Running top in Busybox [duplicate]

when I ran TOP command in Busy box, I just wanted to know if VSZ% is MEM%, if not how can get MEM% with TOP command in Busy box
1
vote
1answer
2k views

Monitor Busy Box NTPD in Tiny Core Linux

I use Busy Box with Tiny Core Linux in a virtual appliance. I can run NTP Daemon using /usr/sbin/ntpd -p pool.ntp.org The problem is it doesn't output any logs to /var/log/ntp.log. Am I looking at ...
2
votes
1answer
3k views

busybox shell script - unknown operand error message

I need to write a small shell script that will execute a python script and get the results. When I try to run it this way it works: #!/bin/sh /usr/bin/python /etc/scripts/backup.py result=$? if [ $...
2
votes
1answer
394 views

How to enable busybox httpd on Alpine linux image

When trying to run busybox httpd in alpine:latest image it ends with error httpd: applet not found How can I install httpd applet into Alpine image?
0
votes
0answers
157 views

Use uClibc for single package

I'm having some issues using busybox and dns lookups. I found a claim that this a glibc problem. I'm on gentoo. I would like to compile busybox against uClibc, without replacing glibc on the system. ...
0
votes
0answers
211 views

busybox dmesg old timestamp format

I'm working on an arm board running an old kernel(3.14.29) I trying to to get the dmesg output and pass it to the bootgraph.pl to generate an SVG of kernel boot sequence. However after passing the ...
1
vote
1answer
665 views

How to set up syslog to log to both file && buffer

I'm using an embedded Linux OS which was built using yocto. I'm trying to alter busybox syslogd in order to have it output to both a file & buffer. so I can use logread -f as well as have the ...
0
votes
1answer
727 views

Do math arithmetic on busybox sh

I have string variables MIN and SEC (minute and seconds): MIN="1" SEC="34" I want to do calculations on these: TOTSEC = MIN*60 + SEC I tried: expr $SEC + $MIN * 60 Result: expr: non-numeric ...
0
votes
1answer
54 views

Benchmark a USB host transfer speed with Busybox

I want to benchmark a USB host on my custom machine. It has Busybox V1.20.2. From google, I see that it can be done using dd command. For testing, i copy blender.exe (76MB) to the home folder in ...
0
votes
2answers
182 views

How can I expand a list of letters/numbers in ash?

In busybox, the default shell is ash, so some familiar tricks in bash are not available. One thing I would like to do is expand a list of letters, like {a..z}, which would expand to a b c d e f g h i ...
1
vote
0answers
211 views

NFS Shares on an unmounted file system

I am trying to run a file system check. First, I want to unmount the device. umount /dev/md2 umount: /dev/md2: not mounted Seems good. Then, I want to run the check: e2fsck -fp -C 0 /dev/md2 /dev/...
1
vote
1answer
161 views

watch netcat transfer dump from android to pc

how can i monitor netcat transferring from android to my linux machine i used this command on android device ( sender ) to make a full dump for my device : dd if=/dev/block/mmcblk0 | busybox nc -...