Decompressing sparse files


When decompressing a sparse file with gzip, the file is not sparsed anymore. In order to decompress it as sparse, we can use dd:

zcat <sparsefile.bin.gz> | dd conv=sparse of=<sparsefile.bin>

Note that this is not specific to gzip. Also note that some utilities such as xz automatically support sparse files.


Last posts

Useful commands, one-liners, etc.

I decided to record here useful bash fragments, commands, etc. I kept using and forgetting from time to time... I will enrich it as needed. There is no particular order nor specific explanation. Some might be useful to others. Maybe. Who knows.

Arbitrary file binary dump into C array

To …

Updating Thinkpad X61 BIOS

TL;DR

WARNING 1: the update is done at your own risk and may brick your computer.

WARNING 2: this will wipe all data on the target USB device.

WARNING 3: do not use SYSLINUX MEMDISK driver to boot it directly with eg. Grub. The Lenovo BIOS updater use the …

128-bits multiply with NumPy

128-bits multiply

For another on-going project, I needed to do 64-bits x 64-bits to 128-bits multiply, and I needed it in Python. When doing numerical work with Python, I always use NumPy which is a really awesome library. Unfortunately NumPy is heavily biased towards hardware native types, which makes sense …

Force NetworkManager to ignore an interface

Continuing my Bookmarks serie, here is how to tell NetworkManager to not manage an interface, thank you very much:

~# sudo cat >> /etc/NetworkManager/NetworkManager.conf << EOF
plugins+=keyfile
[keyfile]
unmanaged-devices=interface-name:IFNAME
EOF

Where IFNAME is the interface name. For example:

unmanaged-devices=interface-name:eth0

Will prevent NetworkManager to manage eth0 …

X11 forwarding request failed on channel 0

A quick post as a reminder to my future self: if ssh does not want to forward X11 despite using -X or -Y options, it might be because I am missing Xauth installed:

~local# ssh -YC remote
X11 forwarding request failed on channel 0
Last login: Tue Apr 26 09 …