Debug initramfs, unpack – repack initrd.img and run-init

Debug initramfs, unpack – repack initrd.img and run-init

When working with a Linux system being loaded through PXE / tftpboot / NFS in a device without hard disk it could happen that we need to understand or fix problems at boot time process, part of it is initramfs. The procedure to unpack an initrd.img is simple: # create...
Grep not parsing the whole file because of NUL

Grep not parsing the whole file because of NUL

Today  I’ve found a nice problem to solve in stack overflow. There was this guy claiming why unix utility grep didn’t parse this file in his Linux. Long story short the file was being somehow “recognized” as binary for grep, because it had four...
Setup terminator default layout with custom commands

Setup terminator default layout with custom commands

I’ve been working with terminator for years and one of the best things you can do is personalize your own layout with custom commands in each window. Be careful, terminator version 1.90 won’t render layouts properly. I’m using terminator 1.91 In my...
Bash: Round up floating numbers

Bash: Round up floating numbers

I’ve found two easy ways to round up “ceiling” float numbers with bash. Simply add “0.5” to your floating number and use printf: Shell myfloating=$(echo "14.1129312938+0.5" | bc ) printf '%0.f' $myfloating 15 123 myfloating=$(echo...
Installing Debian on Asus Transformer Mini T102H

Installing Debian on Asus Transformer Mini T102H

This procedure also worked for me with Asus T103H (next model of T102H). Installing Debian We must consider this device has UEFI, so the bootable pendrive must be created accordingly to it. I followed this procedure and worked great: You can do something like the...
Copy /etc/hosts with scp from multiple servers with cygwin

Copy /etc/hosts with scp from multiple servers with cygwin

This one was easy, first create a file (hosts_ip.txt) with the IP of each server to get its /etc/hosts: Vim 192.168.0.3 192.168.0.4 192.168.0.5 192.168.0.6 192.168.0.7 12345 192.168.0.3192.168.0.4192.168.0.5192.168.0.6192.168.0.7 Generate a private/public pair key and...