Piero V.

A small journey with my Orange Pi Zero

A couple of weeks ago, Debian Bookworm became stable. I have a few devices running stable, including an Orange Pi Zero I use to open and close my garage door with a Telegram bot.

So, I SSH’ed in it, and ran the following commands:

apt update
apt upgrade
apt dist-upgrade

Without even changing my /etc/apt/sources.list because I already keep stable instead of the codename 😎️.

End of the story, just like any other major Debian update there in the last 6 years… Or is it?

I just wanted a new kernel…

Many boot files were dated June 2017, so the system probably started as Debian Stretch. And actually, it was an Armbian installation (which uses the official Debian repos, contrarily to Raspbian, plus a custom repository for a few additional packages).

The Linux kernel was one of these custom packages, and its version was 4.11.3, released on May 25, 2017, so quite old. I wanted a more recent kernel with security vulnerabilities fixed and all the other improvements.

Debian supports a configuration they call ARMMP (ARM multiplatform). With a single kernel and DeviceTree, it targets many different devices, and the Orange Pi is one of them. So, I tried to install Debian’s official kernel instead of the one I was using… and for the first time in 6 years, I screwed up to the point I needed to remove the thumb drive I use as storage on that system. It was somehow annoying because the board is in an electrical box, and there were several things I needed to move to get to it. I tried to troubleshoot it for an entire evening without success. Eventually, I went back to the old kernel, closed the box, and moved everything again. … [Leggi il resto]

Motion: videosorveglianza con Raspberry Pi

Questo weekend io e la mia famiglia abbiamo avuto un impegno, per cui siamo stati tutti via, lasciando la casa vuota.

Allora, ho pensato di sfruttare la mia Raspberry Pi 3, che da tempo era rimasta inutilizzata, per creare un mini sistema di sorveglianza.

Cercando su Internet, ho trovato subito un programmino molto semplice da configurare, ma anche alquanto efficace, chiamato motion.

Si interfaccia con le webcam e può registrare un video qualora rilevi del movimento. Inoltre, può eseguire dei comandi quando il movimento inizia e finisce, permettendo interessanti integrazioni. Infine, mette a disposizione anche uno stream del video stesso tramite HTTP. L’unico neo è che gli stream sono solo video, senza audio, anche qualora la webcam fosse dotata di un microfono.

Visto che usa l’API V4L2 (Video For Linux 2), può funzionare su tutti i sistemi Linux, non solo con la Raspberry. Io stesso, con la mia Raspberry, ho provato sia su Debian, che su Raspbian. Qualora vogliate comprare un single-board computer da adibire allo scopo, la lista dei dispositivi supportati da Armbian potrebbe esservi utile. … [Leggi il resto]

Debian on an encrypted microSD on a Surface Pro 2017

Wow, I have not needed to write a guide about installing a Linux system for years (well, these are my notes rather than a complete guide).

Partly because I found it quite easy in the latest… 5 years? Partly because I avoid reinstalling my systems unless strictly needed.

This time is different: I am targeting a peculiar device (a Surface Pro 2017) with a microSD (I am too lazy to repartition its SSD) and full disk encryption (including /boot).

But I am happy because I have learned a lot! For example, if you choose the expert installation for Debian, you can disable the source repositories immediately!

Big caveat: my initial plan was to install GRUB on the microSD, but it did not work. If I understood correctly, the Surface cannot boot from SDs. So, I used the ESP of the SSD. If you wanted a completely autonomous system on a microSD that disappears as soon as you remove it, I fear you cannot get one.

Preparing the install drive

After I discovered Rufus, I have always used it to prepare installation drives on Windows.

But Debian ISOs have a feature I really appreciate: in UEFI mode, you can just extract the image to a FAT32 partition. The advantages are that you do not need Windows, and you do not have to format the drive, you do not lose any existing data. And, on top of that, secure boot worked at the first try (with Microsoft & 3rd party CAs, but I do not remember if it is the default). I have tried with other distributions, but none worked in the same way. … [Leggi il resto]

hubiC as a Duplicity backend in 2022

Warning: these instructions are given without any warranty.

If you decide to follow them, you are on your own, and it is your responsibility to verify that everything works as expected.

I do not take any responsibility for data losses or any other consequences.

TL; DR

Duplicity supports Rclone as a backend, and Rclone is compatible with hubiC in turn.

First, follow these instructions to configure a hubiC remote in Rclone.

Then pass something like rclone://hubic:/your-backup-container to Duplicity as a target.

Notice the second colons! Firstly, I missed the second one, and it did not work for this reason.

Also, notice the lack of a trailing slash: if you add it, the first backup will succeed, but the following ones will fail.

Fortunate and unfortunate coincidences

You know they say «💩️💩️💩️💩️ happens.». For example, data centers catch fire.

That happened last year to OVH, and my VPS was hosted at the said data center. … [Leggi il resto]

Linux cryptsetup and rEFInd

TL; DR: create a /boot/refind_linux.conf file with the following content:

"Boot with standard options"  "root=UUID=uuid-of-unencrypted-root-partition ro cryptdevice=UUID=uuid-of-luks-partition:volume-name:allow-discards quiet"
"Boot to single-user mode"    "root=UUID=uuid-of-unencrypted-root-partition ro cryptdevice=UUID=uuid-of-luks-partition:volume-name:allow-discards quiet single"
"Boot with minimal options"   "root=UUID=uuid-of-unencrypted-root-partition ro cryptdevice=UUID=uuid-of-luks-partition:volume-name:allow-discards"

The rest of the article is a nice story about why I needed this 😄️.

More fast storage!

I built my current desktop two years ago with the first money I earned during my internship. So, I was on a budget, and cheapening on the storage is always a way to save some bucks.

Therefore, I bought a WD Black 250GB SSD to dual boot my systems and a 2TB hard disk for the data.

Recently I changed job, and now I use my personal desktop to work. And I need more fast storage.

So, since I was already upgrading, I finally switched to full-disk encryption and btrfs. … [Leggi il resto]