Stack Exchange Network

Stack Exchange network consists of 174 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.

1
vote
2answers
33 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
21 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
203 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
30 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
24 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
0answers
25 views

Parse nc output in bash

I'm trying to extract the content of a POST request from nc. My code is based upon this example: #!/bin/bash rm -f out mkfifo out trap "rm -f out" EXIT while true do cat out | ./busybox-armv7l nc ...
0
votes
1answer
81 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
37 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
328 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
227 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....
0
votes
0answers
19 views

how to use dnsd / bind for ip resolving?

I am using ltib + busybox and I recently installed bind + dnsd so I could resolve urls. I tried going over this manual for bind but failed at the start as I have no /etc/bind dir. So, I moved to ...
1
vote
0answers
92 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
89 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
46 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
77 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
128 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
446 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
159 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
589 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
107 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
37 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
40 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
2answers
522 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
243 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
588 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
84 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
204 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
626 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 ...
1
vote
1answer
1k 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
195 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
95 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
132 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
283 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
0answers
49 views

busybox change permission for the kill command [duplicate]

Use busybox and would like to give a few commands the permission to be executed by not-root-user - as for instance "kill". For this I changed the link from /bin/busybox.nosuid to /bin/busybox.suid - (...
0
votes
1answer
357 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
34 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
1answer
97 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 ...
0
votes
0answers
214 views

automount/unmounting of mmc device in embedded linux-kernel 2.6

I'm developing an application on embedded linux kernel 2.6 powered device and Auto mounting and un-mounting process is not works correctly. e.g. checking dmesg show kernel correctly determine ...
1
vote
0answers
157 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
87 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 -...
1
vote
1answer
1k views

How to Autorun a program using busybox after boot?

I am using an embedded linux with busybox. I would like to automatically run my app called "myApplication" (runlevel 5 after boot all the services are up). What I have done so far: I made a script ...
3
votes
1answer
429 views

bash script: capturing tcp traffic on a remote server sometimes works, sometimes fails. No errors

Background I am running BusyBox in the remote server. I have a bash script that does two things: 1. via ssh, starts a sub process to monitor tcp traffic using tcpdump command. Save results to a ...
7
votes
1answer
415 views

How can I convert a date with a named month to a unix timestamp with only Busybox tools?

I'm working in an environment where I pretty much only have access to busybox tools, and trying to convert a date in the format Mon Jan 1 23:59:59 2018 GMT to a unix timestamp, in a shell script. I ...
1
vote
0answers
492 views

.ash_history file is not created

I am using a login session in my ash machine. My problem is, when executing history command in ash shell, it returns 0. This is because the .ash_history is not created. I tried to triage the issue by ...
0
votes
0answers
20 views

Adding Symlinks to Initrd balloons image size

I have an initrd with glibc 2.24 and busybox installed on it. For anyone who hasn't worked with busybox, you symlink to the executable with symlinks named for whatever standard distribution executable ...
1
vote
0answers
193 views

Embedded Linux TTY font change

I'm using Linux kernel + Busybox on an embedded system with a video console (fbcon) on LCD. I'd like to be able to change between compiled-in fonts (e.g. VGA 8x8, MINI4x6) on runtime. I know it's ...
1
vote
1answer
340 views

how to move cursor left and right in default shell

my router runs asuswrt merlin. the /bin/sh is packaged in BusyBox v1.25.1 (2017-12-02 00:49:46 EST) multi-call binary. my question is how do I move my cursor one word left and right? with bash, i ...
-1
votes
1answer
2k views

File system check of the root filesystem failed, manual fsck can not fix [closed]

Linux Mint 18 on SDD with LVM ext4 Booting in recovery mode shows: ata3.00: status: { DRDY DF ERR } ata3.00: error: { ABRT } ata3.00: configured for UDMA/100 sd 2:0:0:0: [sdb] tag#0 FAILED Result: ...
0
votes
0answers
86 views

Converting regular tar command to equivalent Buildroot Busybox compatible command

I am attempting to get a Wireless Modem configured for a Raspberry Pi 3 IoT device and am running into issues with some of the instructions provided by the manufacturer. The command given is a tar ...
3
votes
2answers
6k views

Package manager for Busybox

Is there a package manager for busybox devices? After all Busybox utilities are quite restricted. I suppose one would have to compile it for specific device. Since I am asking on Unix/Linux exchange ...