You need:
The steps:
Download the installer image (v-i.img.xz) and
related scripts (configure-installer and
write-and-config.sh) from a subdirectory or https://files.liw.fi/v-i/.
Unpack the downloaded image.
unxz v-i.img.xzThis will use a few gigabytes of disk apace.
Write a configuration file for the installer, to allow logging in
via SSH to the running installer. If you don’t intend to do that, you
can just create an empty file. Otherwise, create a YAML file like the
one below, but with values customized for you. You need one of
authorized_keys_file or user_ca_pub_file.
user_ca_pub_file: ~liw/.ssh/ca/userca.pub
authorized_keys_file: ~liw/.ssh/id_personal.pubEither of these two lines configures the installer SSH to allow you
to log in as root using SSH. Password logins are not
allowed for SSH. You can also log in via the console, as
root, without a password.
The installer configuration file can specify a wifi access point to connect to, if you need that.
wifi_name: DadItIsThisOne
wifi_password: hunter2Insert USB drive and find out the device allocated it. I prefer
GNOME Disks for this, but you can also look up the device of the USB
stick: run sudo dmsg -T. The device name is usually
/dev/sdx for some value of x.
Write the installer image to the USB drive, and configure it.
sudo bash write-and-config.sh config.yaml /dev/sdx v-i.imgThis will take a few minutes.
Make sure everything has been written to the USB drive. Again, I prefer GNOME Disks for this, but from the command line:
udisksctl power-off -b /dev/sdxMove the USB drive to the target machine and boot off the drive. How this happens varies from machine to machine. On my Thinkpad X220, I press F12 at the POST screen and then choose the right drive from the boot menu.
Wait for the system to boot. Log in as root, either from the virtual console (no password), or via SSH.
If you need to connect to wifi, you need to log in as root and run the following commands:
iwctl station wlan0 get-networks
iwctl station wlan0 connect DadItIsThisOneSubstitute the name of the network as needed. Enter wifi password when requested.
Create a target specification file foo-target.yaml.
The name can be anything, but it must be valid YAML. In the example
below, there is one NVMe drive that will get the system installed. All
drives will be encrypted using LUKS, with the password “hunter2”.
hostname: x220
drive: /dev/nvme0n1
luks: hunter2
ansible_vars:
user_pub: |
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPQe6lsTapAxiwhhEeE/ixuK+5N8esCsMWoekQqjtxjPThe SSH public key will be added to the root user’s
authorized_keys file. See spec.md
for a full description of the target specification file.
Install. Add the --verbose option to
./v-i if you want to know what’s happening. The first time
you run this on a given v-i USB drive, it takes a while: it runs
vmdebootstrap and that is just slow. However, the output is
cached, so further runs are faster.
rm -f install.log
v-i --verbose foo-target.yamlThis will take few minutes the first time, assuming a fast Internet connection. Further runs go faster.
Reboot into the installed system.
Finish configuring the system in whatever way you like to do that. I use Ansible.
Remember to change the LUKS password for each drive.
Optional: Let me know how it went.