Questions tagged [busybox]

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

-3
votes
1answer
351 views

In shell, what does “./directory” command means?

I'm trying to install busybox on my tab. I copied the busybox binaries to my tab, went to its location, then printed "./busybox", enter. message appeared: "can't execute: is a directory" It looks like ...
2
votes
0answers
868 views

Logrotate on Busybox

I'm using "BusyBox v1.23.2 (2016-05-10 18:40:19 CST) multi-call binary." How do I achieve logrotate functionality on a particular log file?
0
votes
2answers
2k views

How to convert seconds to hh:mm:ss format from output of another shell script

everyone here is my script /bin/wstalist | grep 'uptime' Which is return value like "uptime": 3456, yes there's a , coming with output. These number are seconds. I want to convert it to hh:mm:ss ...
0
votes
0answers
96 views

Make home router accessible via Internet

Setup: I have logged in to a Huawei router using ssh. It's a busybox system with ash. Tools available are ifconfig, iptables and some others. What I want to do: Making all ports (http, ssh, telnet, ...
3
votes
1answer
1k views

3DR Solo Drone WiFi Communication

I have two 3DR Solo UAVs. They have ARM computers in both the drone and the controller running busybox Linux. From what I understand: By default the controller acts as a wireless access point. It ...
2
votes
1answer
55 views

Bulletproof method for dealing with duplicate runs

I have a script at my router running every 30 minutes by cron. Router ocassionally runs it twice, few seconds apart but only when the router is booting. Few weeks ago, to avoid it being run twice ...
0
votes
0answers
536 views

BusyBox - Bash signal handler 'echo' issue

I have a Bash script that begins by opening a TCP client socket using nc and sending a start command over that socket. The server then sends me back data over the socket (which nc prints to stdout), ...
5
votes
1answer
2k views

Return status of Busybox `timeout` command

I'm writing a shell script that's supposed to function on various different distributions, some of which are using busybox and some are not. This script uses the timeout command to figure whether a ...
2
votes
1answer
3k views

How can I delete changes from an overlay fs?

I have an embedded device running BusyBox, there are a number of directories mounted with overlayfs with work and data directories mounted on separate UBI partitions using the following style of ...
1
vote
1answer
199 views

What does it mean to “just add /dev, /etc, and a Linux kernel” - BusyBox

I have been reading the documentation of BusyBox with the intention of using its small filesize to make a bootable cd. The documentation states To create a working system, just add /dev, /etc, and ...
3
votes
2answers
489 views

How to create sha1 checksums of files inside a tar archive on busybox without using much disk space

I would like to get the sha1 checksums of all files inside a simple tar archive as a list. This should be done on a busybox machine where only a minimal tar binary is avalable, see http://linux.die....
4
votes
1answer
334 views

Linux Device Drivers test environment setup

What is the best way to setup a test environment while working through Linux Device Drivers? I have compiled a bzImage for x86 from the latest Linux source using x86_64_defconfig. I have followed ...
2
votes
1answer
6k views

How to login automatically without typing the root username or password in Buildroot BusyBox init?

If I do: git clone git://git.buildroot.net/buildroot cd buildroot git checkout 2016.05 make qemu_x86_defconfig make BR2_JLEVEL=2 qemu-system-x86_64 -M pc -kernel output/images/bzImage -drive file=...
1
vote
1answer
183 views

Find capacity details and oldest file in Busybox format

I am using Mobax and it has Busybox installed in it. I can successfully get the capacity, available, used and used percentage of the directory and its sub-directories in Linux by typing: clear &&...
2
votes
2answers
249 views

Predictable partition name for squashfs partition in initramfs

TL;DR: How can I boot a squashfs partition from initramfs with a predictable partition name? /dev/sda2 won't work because the device names get reordered randomly and sometimes it will boot from the ...
3
votes
2answers
9k views

how to check variable existence and compare with the string in busybox?

I want to use something like that if [[ ! -z "$ENV" && $ENV == 'production' ]]; then echo "production"; else echo "dev"; fi but in BusyBox it does not work :( sh: 1: [[: not found It looks ...
2
votes
1answer
3k views

Unable to boot after installing after systemd update

First it repeats this error many times: Lvmetad is not active yet, using direct activation during sysinit Volume group "mint-vg"not found Cannot process volume group mint-vg Than it shows: Gave up ...
0
votes
0answers
891 views

How to compile wget or curl with https support statically on armv5tejl?

I have an IP camera with BusyBox. It has armv5tejl architecture When I want to use wget to download something from https://.... When I try to use it with https I get an error: wget: not an http or ...
2
votes
1answer
481 views

Add vi on Busybox which is trimmed down

I have a smart energy plug which is running Busybox and works over Wifi to my local LAN. I can telnet into it, but lack crucial binaries like vi. I'd like to add a few scripts to the device, but ...
2
votes
0answers
69 views

How to automatically switch between DHCP Server and Client mode on startup of several devices?

I do wan't to have several embedded devices to boot up at the same time and automatically select the first booted device as the dhcp server and the others as client. But every client can be the server ...
1
vote
1answer
3k views

How do I find and list folders with a specific folder name, containing files modified recently?

I have a set of folders that are regularly updated, which I would like to regularly parse through and update to a simple text file list. This list gets used with rsync so I shorten the file names ...
1
vote
1answer
681 views

Syntax error when exectuting bash shell script from busybox

Syntax error when executing a bash shell script from busybox Script #!/bin/bash for dev in `cat /proc/partitions | awk '{print $4}'`; do if cmp -s <(head -c 2 /dev/$dev) <(echo -n -e '\x38\x6e'...
3
votes
4answers
4k views

Efficiently compare If variable exists and is not equal

I have a problem with the sh script syntax. I wrote a script for my Asus router. The script works perfectly. But I have this line: if [[ "$OldIP" && "$StartIP" != "$OldIP" ]]; then echo OK; ...
1
vote
1answer
656 views

Compiling a kernel on STLinux

I have recently accessed STMicroelectronics Base Distribution with BusyBox v1.18.2, built-in shell. I read all the information on STLinux documentary regarding my problems, and followed all the steps....
1
vote
2answers
718 views

Top command output explanation (in embedded system)

Can someone please help me understand the output that I get from the top command? This is the point that the oom-killer is invoked and kills my main application. What exactly is under the VSZ and %VSZ?...
0
votes
1answer
1k views

How to “export” configuration variables and “source” them on embedded Linux?

A router runs firmware containing BusyBox and in addition to flash memory the device has secondary memory storage. That USB stick is mounted at both /media/Main and /opt: # mount | grep sda /dev/sda1 ...
2
votes
1answer
938 views

When in the fallback shell, how do you start init?

I booted my system using in grub : linux /boot/vmlinuz-4.5.0 root=/dev initrd /boot/initrd-4.5.0 I set root to dev to specifically not get it to boot correctly. Of course it falls back to the ...
3
votes
1answer
5k views

How do I set up busybox to allow a non-root user to set the date?

I have an embedded system built with busy box. I allow a user named "app" to download a program/script to a directory and it will be run on boot. The program should be allowed to set the date. It ...
1
vote
2answers
2k views

Name resolution in busybox

I have a statically linked busybox and want to be able to write busybox telnet foo. How do I specify the address of "foo"? Do I really need /etc/nsswitch.conf and the corresponding dynamic libraries, ...
28
votes
2answers
3k views

Are BusyBox commands truly built in?

I was reading the famous Unix Recovery Legend, and it occurred to me to wonder: If I had a BusyBox shell open, and the BusyBox binary were itself deleted, would I still be able to use all the ...
1
vote
2answers
49 views

Load old Ubuntu Linux after fresh Linux Mint install

I had Ubuntu and time ago I installed Linux Mint. During installation there was no option for alongside install, so I chose the manual option for the install to empty the partition (mount point /). ...
4
votes
2answers
5k views

How to make a minimal bootable linux (only with terminal) from kernel source code? [duplicate]

I want to make a very minimal linux os which only have a terminal interface and basic commands/applications (busybox is my choice for commands/apps). I don't want the installation option on my os. I ...
2
votes
4answers
2k views

shell script - subtract 1 from hexadecimal mac address and add colons to it

I have mac address as 'C4:B9:83:7F:FF:AC' and I want to subtract 1 from its hex values which is C4B9837FFFAC so it will become C4B9837FFFAB and after this I again want to add colons to make it ...
3
votes
2answers
996 views

how to delete (or keep) certain file extensions using busybox find?

I have a folder which contains files (various file extensions) and subfolders. I want to keep certain file extensions and delete the rest. e.g. keep all .txt and .jpg files and delete all other files....
4
votes
1answer
3k views

How to get BusyBox udhcpc to run in background forever?

I would like to configure eth0 on my BusyBox based Linux system to try and get a DHCP lease for 5 times, then run in the background forever if it doesn't get an IP after those 5 tries (i.e. does not ...
2
votes
2answers
5k views

Debian: Boot fails when mounting sda with “invalid argument”

I am trying to move a Debian squeeze installation to VMWare VSphere 5.5 environment. However when booting the new machine after replication, the initrd/busybox gives an error, that it cannot mount the ...
5
votes
1answer
5k views

Set environment variable (TZ) for all startup scripts and inittab

I'm working on an embedded Linux system and looking for a way to set the time zone for all processes. The question is: Is there any possibility to set the TZ environment variable at boot time (init ...
1
vote
1answer
548 views

How can I check the first process that is run? I can see both init and linuxrc in root folder

I get a modified Linux installation on QNAP x86 based NAS. In the initrd image file, I noticed there are both a init script /initand a symbolic link that points to a different program(busybox): ...
2
votes
0answers
352 views

Make changes to busybox/initramfs that are persistent?

I am in the process of recovering my 32-bit Debian Jessie box with a lvm+LUKS disk. I am coming back from a system that had a root partition but no boot partition. Grub executes, but either vmlinuz or ...
1
vote
1answer
230 views

Busybox ASH inside initrd has a problem when piping tee to sed

I'm trying to log the early boot output from the init script. This is what is working: mkdir -p /run/log && \ mkdir -p /tmp && \ mkfifo /tmp/stage-1-init.log.fifo1 && \ mkfifo ...
3
votes
1answer
2k views

How do I install another distro on a linux DVR

I was fiddling with an old DVR and discovered it had telnet unblocked. So I ran ncrack and after gaining access started looking around. It seems to be running some custom version of Linux. Not many ...
3
votes
2answers
1k views

Minimal Busybox/Linux Installation - Won't Run C

I'm trying my hand at creating a very minimal custom Busybox/Linux distro, a task that is admittedly above my head, but I figured I'd give it a shot. My issue is that whenever I try to run a C program ...
1
vote
1answer
309 views

Adding a custom preset build configuration to make

I'm building busybox from source and I have more than one configuration. (For different uses) As I have it now, each time I want to build something, I have to copy the correct .config file to the ...
0
votes
1answer
223 views

Unable to mount USB media in sagem fast3304 V2 router (busybox v1.01 inside)

I have a wireless router that runs busybox (V1.0). A media server (Twonky Media Version 3.4) running on this router. I would like to use its USB port to mount an external drive containing mutltimedia ...
2
votes
1answer
552 views

bash while/read loop behaves differently in a mips/musl/busybox based VM

On a musl/busybox based system running in qemu (mips), the script #!/usr/bin/bash printf '%s\n' "${BASH_VERSION}" > test.txt echo 'test.txt:' cat test.txt echo "No process substitution:" while ...
0
votes
1answer
256 views

Compress mtdblock with 'tar' before sending it via TFTP

what is proper command compress mtdblock with 'tar' before sending it via TFTP? tftp -l /dev/mtdblock3 -p 192.168.100.40
1
vote
1answer
3k views

Using dd command to download mtd block

How to use dd command to download mtd block from embedded Linux-based device? # cat /proc/mtd dev: size erasesize name ... mtd3: 003a0000 00010000 "DRTI2" I need download mtd3 block, so dd if=...
3
votes
0answers
468 views

change ls color on OpenWrt

I am not able to change the color of dir entries for ls command (dark blu is a very annoying color to read) on my OpenWrt device. I've added the line LS_COLORS=$LS_COLORS:'di=0;37:' ; export ...
0
votes
1answer
165 views

ls without --time-style support

I need the same output in FMTIME as in the following command: FMTIME=`ls -l --time-style=+%s $FILE | cut -f6 -d' '` but my Linux (running busybox) does not support ls --time-style. I am running :: ...
1
vote
1answer
767 views

Busybox pager with color capability?

I asked on Superuser about colors for git log in MobaXterm (on Windows), but it turned out that the problem wasn't MobaXterm—it's the lack of a -R flag in busybox's less. It would help my workflow ...