I installed Debian 10 (buster) on a Lenovo Thinkpad X220 laptop today. You’re justified in thinking that this isn’t a feat worth blogging about. The interesting bit is that I did it with v-i.

No, not the editor. v-i is another of my silly personal tool projects that has an awful name. v-i is “vmdb2 installer”. vmdb2 is my “install Debian in a disk image” tool. The name v-i is a play on d-i, the name or nickname of the official Debian installer.

Why not use d-i, instead of writing my own installer? Some years ago I asked myself “how hard can it be?”. That question is the most dangerous question for me. It is the bane of my existence. When I’m found on Mars, surrounded by the remains of an exploded rocket ship, they shall put up a memorial there engraved with “He asked how hard can it be. Reality answered, too hard.”

I wrote vmdb2 to be able to more easily create custom disk images for my virtual machines. It then occurred to me that the program should easily work on bare metal hardware as well.

After many misadventures and much debugging, I got it to work today. Well, technically I got it to work a year or two ago, but I didn’t tell anyone, and then I broke it, but now it works again. I’m blogging about it so that you can laugh at the things I spend my free time on.

There is absolutely no reason why you should try it. The d-i installer works better. I’m interested in v-i because I’m interested in trying another approach than d-i, something that’s more automated. If I had the energy, I’d develop v-i so that it’d be as easy to install on bare metal as it is to create a VM.

The way v-i works is you boot an X220 off a USB drive with a v-i image on it, and then run a single command to install Debian onto sda. The command runs vmdb2. Then you boot the laptop and have a very minimal Debian. The system has just the output of debootstrap with a couple of other necessary packages installed to create a system that boots and is usable, plus a very small amount of additional configuration using Ansible.

It’s not a great system, but at least my little installer project works. At least for some cases. At least on an X220. At least on my X220.

(See v-i and vmdb2 repositories, if you want to know more. If developing a new Debian installer sounds like something you’d like to work on, fork and hack away. Beware of boot loaders.)