Showing posts sorted by relevance for query busybox. Sort by date Show all posts
Showing posts sorted by relevance for query busybox. Sort by date Show all posts

busybox .config in gentoo

busybox can be configured, just like the kernel :)

runit openrc gentoo

I decided to have another go at runit, this time on my gentoo.

I had been thinking about this, since I noticed this on

tb termbin pastebin wgetpaste

just one to rule them all -- termbin!

i discovered this today on irc
kerframil: my go-to 'vanilla' pastebin is termbin.com, which can be used with nc (busybox has an nc implementation)

i am a huge busybox fan, and i'm always looking for ways to use it more. i replace whatever pkgs i can with busybox.

my toolkit

i am on a constant quest for more efficient apps. soon as i find one, i change over. efficiency means smaller code, focussed approach. leaner code is cleaner code is more efficient code.

netcat tar backup

debian netcat-openbsd is leaner, cleaner & more efficient than debian netcat-traditional. if you get a choice, prefer the openbsd version.

i now use busybox wherever i can, including nc and tar. small, simple, clean, standard, available the same everywhere.

$ busybox nc

Usage: nc [-iN] [-wN] [-l] [-p PORT] [-f FILE|IPADDR PORT] [-e PROG]

Open a pipe to IP:PORT or FILE

-e PROG Run PROG after connect
-l      Listen mode, for inbound connects (use -l twice with -e for persistent server)
-p PORT Local port
-w SEC  Timeout for connect
-i SEC  Delay interval for lines sent
-f FILE Use file (ala /dev/ttyS0) instead of network

$ busybox tar

Usage: tar -[cxtZzJjahmvO] [-f TARFILE] [-C DIR] [FILE]...

Create, extract, or list files from a tar file

Operation:
        c       Create
        x       Extract
        t       List
        f       Name of TARFILE ('-' for stdin/out)
        C       Change to DIR before operation
        v       Verbose
        Z       (De)compress using compress
        z       (De)compress using gzip
        J       (De)compress using xz
        j       (De)compress using bzip2
        a       (De)compress using lzma
        O       Extract to stdout
        h       Follow symlinks
        m       Don't restore mtime

at {destination}:
$ nc -l -p {port} | tar xpv[z|j]f -

at {source}:
$ tar cpv[z|j]f - {directory} | nc {destination host/ip} {port}

[z|j] compression: use over slower networks. ignore for faster networks and/or slower computers.

tar streams much faster copying than scp 'ping-pong', especially when you have lots of files.

copy files from {some-server} to your machine:
$ ssh {some-server} ‘cd /some/dir && tar cz dir’ | tar xz

and the other direction:
$ tar cz dir | ssh {some-server} `cd /some/dir && tar xz`

image a disk across the network from {box1} to {box2}:

at {box2}:
$ nc -l {port} [-vv] | dd of={disk.img} bs=1M

at {box1}:
$ dd if=/dev/sda bs=1M | nc {box2 host/ip} {port} [-vv] -q 10

[-vv] use at the box1 (and/or box2, if fast enough)

restore this image in {box2} to {box3}:

at {box3}:
$ nc -l {port} [-vv] | dd of=/dev/sda bs=1M

at {box2}:
$ dd if={disk.img} bs=1M | nc {box1 host/ip} {port} [-vv]

compressed backup

at {box1}:
$ tar cpvJf - {directory} | nc {box2 host/ip} {port}

at {box2}:
$ nc -l -p {port} | dd of={directory}.tar.xz bs=1k


references:
http://nc110.sourceforge.net/
http://sans.org/security-resources/sec560/netcat_cheat_sheet_v1.pdf
http://wikipedia.org/wiki/netcat
http://saurorja.org/2012/04/06/network-file-transfer-using-netcat/
http://compsoc.dur.ac.uk/~djw/tarpipe.html

gentoo install x86 btrfs

this as a quick start guide to the much longer and more comprehensive gentoo handbook. but please understand what i have done, and not blindly copy. you should definitely read the gentoo install handbook a few times before even attempting an install.

gentoo phase 2

My first attempt boosted confidence in gentoo (and it's community) beyond expectation. So much that the debian to gentoo transition continues to gather pace.

In all my systems, I have always replaced the full fledged (bloatware?) tools with minimal busybox, wherever I could. Busybox is stable, and fulfils all my requirements rather nicely. This led me to voidlinux which has that same ethos in it's core. It is a great booster that gentoo could satisfy me on this count too.

vi quick reference

I have a need to refer to some vi commands that I keep forgetting every now and then. My favourite is busybox vi

debian to gentoo

as debian builds more & more complexity/layers obscuring internals from users, i get more & more disillusioned by the current crop of debian decision-makers. jessie, the current debian stable seems no longer stable, and an unstable init at it's core.

wheezy is/was the last stable version gone oldstable now. oldstable is expected to be even more stable than stable. but recent updates have littered wheezy with systemd and ubuntu garbage including upstart. even oldstable has had more than a few days downtime recently, due to buggy updates. sad debian :(

gentoo second install x86 btrfs debian

Now that my Gentoo Phase 2 has been put on hold for the near future, I have to satisfy this itch to install gentoo on my main laptop. Having it on my primary rig, would allow me to use it more often than pulling out my backup system.

My blind first attempt, at a gentoo install, gave me a lot of confidence in the gentoo community. This second attempt substantially lessens the time/aggro I spent previously installing gentoo.

DSL Extensibility

Another advantage of DSL is adding modules to extend/add functionality.

Two apps I always load are screen and ratpoison. Both take a little getting used to. Once I did, I didn't want to use anything else.

Some apps are not designed to WM specs, and ratpoison has issues dealing with such apps. But I rarely use these broken apps, and when I do, I use tmpwm to load jwm temporarily.

With this combination, I never get to see any bells n whistles from the DSL designers. This suits me fine, as I prefer a plain black background, and no dancing bits n bobs on my screen. When I was a newbie, all this was very helpful, and I must confess, allowed me to continue with my linux journey.

I also use citrix client, mplayer-nogui, and qiv. That is just about everything I need, along with busybox. All others are non-essentials for me.

environment

desktop | laptop phone | tablet
gentoo | debian | devuan
arch | void | alpine | openbsd
android v2.x
ubuntu? | linux?? | windows???

runit | openrc?
busybox
tmux
lynx elinks

i3wm
jwm, wpa_gui, volumeicon
sylpheed
mpv
sgt-puzzles

qupzilla | firefox

k9 mail
Search based launcher
Tiny Home
Draweroid
X-plore
QuickPic
f-droid
Rmaps
MapFactor Navigator
Train Scout
Hanzovy Sachy
Puzzles
250+ Solitaire
And Bible
Lectio Divina
Lit
Jango Radio
Spotify

 

though practical issues have me often irregularly using many others not listed above.

what consists your environment, and why?

sed quick reference

Continuing on this idea of quick references[1] to aid my memory, the next one is
sed: stream editor for filtering and transforming text

My favourite busybox toolkit contains sed too.

most viewed