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.
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
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 …
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 …
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
IFNAME is the interface name. For example:
Will prevent NetworkManager to manage eth0 …
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 …