Apr. 5, 2021

FreeBSD - MacBook and Broadcom BCM4321

As part of reviving my MacBook 4,1 (or early 2008 / A1181) on which I decided to install FreeBSD, I encountered some difficulties with the wifi adapter. bwn_pci0@pci0:2:0:0: class=0x028000 rev=0x03 hdr=0x00 vendor=0x14e4 device=0x4328 subvendor=0x106b subdevice=0x0088 vendor = 'Broadcom Inc. and subsidiaries' device = 'BCM4321 802.11a/b/g/n' class = network Here are the steps I had to go through to get it working. First a custom kernel has to be build with the BWN_GPL_PHY option that allows to build some GPL-licensed portions of the driver code base.

Apr. 5, 2021

FreeBSD - MacBook Wayland only setup

I decided to revive my old Macbook 4,1 (or early 2008 / A1181) and FreeBSD seemed like a good fit. In addition I wanted to see if I could achieve a Wayland-only setup I could use easily, knowing that my activities are mostly web browsing and shell. The first thing was to get a booting install media, I had to use a 12.2 USB image as I couldn’t go past the loading kernel step on 13.

Dec. 15, 2018

DragonFlyBSD - french keyboard in initrd

I did install DragonFlyBSD on my laptop using a Hammer2 filesystem on top of a dm-crypt device, following the instruction of the official documentation. The only problem is that I use an azerty keyboard and the uncrypting dialog when booting offers a qwerty layout. That can be a little annoying for people having special characters in their passwords. This is how I managed to have an azerty layout to type my decrypting password at boot time.

Nov. 10, 2018

DragonFlyBSD - UEFI dual boot with Linux

In order to install DragonFlyBSD on a UEFI machine one might want to keep the already installed operating system, in my case Arch Linux, leading to what people usually call dual boot. I won’t describe the DragonFlyBSD installation process, I might in a following article, but just what’s required before and what needs to be done after to get it to boot. Prerequisites So before installing I had a working Linux installation and I’m using the UEFI boot manager from my laptop (an HP Elitebook), to boot it.

Nov. 10, 2018

Linux - UEFI boot manager configuration with encrypted root and swap

This article is more a memo to keep the details regarding the encrypted install of my Arch Linux distribution. I’m using systemd, sd-vconsole, sd-encrypt and sd-plymouth mkinitcpio hooks. This is important for what comes after. Now this is the layout of my SSD disk being identified as /dev/sda. lsblk -o NAME,UUID NAME UUID sda ├─sda1 7244-DD77 ├─sda2 ├─sda7 f92638e9-21ba-4ee2-82d1-3bfc2ac8f6e8 ├─sda8 b7c05834-a995-412f-bb0e-63069778d21a │ └─luks-b7c05834-a995-412f-bb0e-63069778d21a cd9d2579-f4dc-4aaa-878f-d54e9ea9bb83 └─sda9 44739df0-7605-45e1-ab30-eb2e7d4f00c8 └─luks-44739df0-7605-45e1-ab30-eb2e7d4f00c8 1aea47d1-1bb3-4a90-b1bc-e9354cca1417 /dev/sda1 is the efi partition /dev/sda7 is a partition I created for /boot, but I’m not using it anymore.

Oct. 15, 2018

LineageOS - fix vendor mismatch error

During the last LineageOS update, after having rebooted the phone I got a message saying “ensure your vendor image matches OMP7.18.1005.003”. After a little bit of research I fixed it easily, the reason for that to happen is that LineageOS doesn’t ship vendor, bootloader or radio as part of the update. So it has to be done manually. The first thing is to identify the version of the image that you need, for my bullhead (Nexus 5X) I needed “OMP7.

Oct. 13, 2018

SFR Labox - Monter le disque dur sous Linux

En tant que possesseur d’une box SFR Labox, je trouve pratique de pouvoir placer du contenu sur la box depuis mon pc pour le lancer ensuite depuis l’interface depuis le téléviseur. Je vous propose dans ce petit article de monter le disque dur sur votre pc et de pouvoir y placer le contenu de votre choix. Pour cela il faut commencer par vérifier quel est le nom du partage Samba offert par la box.

May. 30, 2018

DragonFlyBSD - Hammer2 snapshot first steps

I am running DragonFlyBSD for quite some time now, but I never took the time to explore how Hammer2 really works concerning its snapshot abilities. This post is my first try at it and I intend it to be a little memo. First let’s gather some info about our mounted filesystems. $ mount | grep hammer2 serno/QM00005.s1d on / (hammer2, local) /dev/serno/QM00005.s1e@DATA on /build (hammer2, local) There are 2 different mountpoints interesting for us : / and /build.

May. 18, 2018

DragonFlyBSD - Install Firefox syncserver with PostgreSQL

This article has been inspired by this article and by the official documentation of Mozilla Firefox syncserver. After reading the article by Mirabelette, I thought it would be nice to have my own syncserver, the only difference is that: I run DragonFlyBSD I want a PostgreSQL database as I know how to make backups of it. That led me to two different steps : building syncserver under DragonFlyBSD making syncserver use PostgreSQL as its database instead of SQLite.

Mar. 23, 2018

Access CouchDB 2.x stats

After installing CouchDB I wanted to be able to access the /_stats page which is supposed to contain a lot of statistics about the running instance. The thing is that page is now displaying {"error":"not_found","reason":"Database does not exist."} After looking for a long time, the solution came from IRC channel #couchdb, and I need to access /_node/couchdb@, where couchdb@ is the node name you find in vm.args on ArchLinux. # Licensed under the Apache License, Version 2.

Mar. 18, 2018

Build a live arch iso with sshd

I’m the owner of a little pc that I use as a server. It’s a headless machine, that means I don’t have a screen linked to it and that’s a pain when something goes wrong. Yesterday I decided to migrate the hard drive to a new 500 GB one. I wanted to be able to do it without plugging the screen that is so far away and any keyboard. To be able to do it I needed an iso that’s using dhcp and spawning a sshd daemon.

Feb. 4, 2018

How to backup a btrfs filesystem using Amazon S3 and s3backer

A while ago, a friend of mine introduced me to s3backer, a tool that makes you able to use a s3 bucket as a support for any filesystem you want. I was looking for a way to backup my btrfs filesystem using btrfs send/receive commands, this looked like a good opportunity to do so. In addition I’ll use cryptsetup to encrypt the data on this filesystem. In order to achieve this you need a few things ready :

Nov. 21, 2017

The fastest HTTP server to deploy with Python

Python 2 python2.7 -m SimpleHTTPServer 8080 Python 3 python3 -m http.server --bind 8080

Sep. 7, 2017

Install Boinc on CentOS 7

Boinc is a piece of software that allows to get involved into distributed computing in projects such as WorldCommunityGrid, Rosetta@Home or even LHC@Home. It’s both interesting and put your lazy computers to work. There’s of course a package in the EPEL repository allowing us to install the software easily. Let’s install it ! yum install epel-release yum install boinc-client Now that this is done, there’s the tricky part. Right after you’ve created your account on the website of the project that you’d like to join, you have to get the account key.

Feb. 7, 2017

Extract and encode a cd to mp3 via the Linux cli

Ripping a cd and encoding it to mp3 is so easy it takes only 3 lines to be achieved. mkdir cd01 && cd cd01 # create a directory and put yourself in it cdparanoia -B # extract all the cd tracks in current directory as .wav files for t in *.wav; do lame -b 320 $t; done # encode all the files to mp3 320kbps It makes it rather easy to script and encode all your cd collection easily if needed.

Feb. 5, 2017

Hugo - how I run it with systemd

I was looking for a solution to run a little blog, I did try wordpress but it’s not what I was looking for, then I discovered Hugo. It’s a Go program that will parse Markdown files (your articles in fact) and generate a static website for you. I don’t want to describe the full configuration on this article, but I want to share the systemd unit file I wrote. [Unit] Description=Hugo webserver After=network.

Oct. 25, 2016

OpenBSD - Munin graphs generated without text

I did install munin and at first my graphs looked like this on this image. So as you can see this looks like something is wrong here. The solution was to modify my cron job to look like the following. su -s /bin/ksh _munin -c 'LC_CTYPE=en_US.UTF-8 /usr/local/bin/munin-cron' It seems that munin-cron does require a LC_CTYPE value, otherwise it generates without any text.

Oct. 25, 2016

OpenBSD - Munin plugins missing libraries

Today I’ve decided to document how I installed my munin monitoring system on OpenBSD and how to make two plugins work in particular. I run an instance of Nginx and also a PostgreSQL server so I wanted my munin to be able to get some info about them. The fact is that you need some additionnal dependencies in order to make them return values properly. The two required libraries are p5-libwww (for the Nginx plugin) and p5-DBD-Pg (for the PostgreSQL one).

Oct. 29, 2015

Linux - How to slow down the data flowing through a pipe

If for some reason you want to slow down the speed of a pipe between two process on Linux, you can use pv (pipe viewer). For example you can use it this way to transfer a file to another place at a slow speed. cat /home/user/file | pv -L 3k -q > /tmp/mynewfile You can adjust the speed with the number given to the -L parameter to pv. For example 1, 10, 100, 1k, 10k, 1m etc.

Oct. 22, 2015

Nginx - SSL Proxy configuration

For a project at work I had to setup a SSL Proxy with nginx, because one of our old weblogic server can’t manage SHA2 certificates and we can’t update now. We decided to make it talk to a SSL Proxy and here is the code of the nginx.conf acting as such. It makes use of Nginx module http_proxy. As a little reminder we had a situation like this : serverA (client certificate) -> webservice (HTTPS / server certificate)

Oct. 22, 2015

Web - How to test that your webserver is serving gzip pages

When you want to set up your webserver you might want to use gzip. But how to test if it works ? I used to test some request with telnet, the problem is that it will always return without gzip, because you don’t specify that you can process the gzip binary returned. So the webserver don’t use it. But there’s a solution available on all linux boxes. It requests headers only and specifies that it can handle gzip compression.

Jan. 1, 1970

Hello world !

Hello Hugo world !