Unattended installs
The BlueRune ISO can install without asking any questions. It reads the answers from a file named bluerune.json on a second drive labelled cidata, installs, and restarts into the new system. Use it for virtual machines, for several identical machines, or for tests.
This page is a reference. For an install with questions, see Install BlueRune.
Warning: An unattended install erases the disk named in
bluerune.jsonwithout asking. Start the ISO with thecidatadrive attached only on a machine you mean to install.
How it works
- When the ISO starts, before the installer opens, it looks for a drive labelled
cidata(orCIDATA). Any file system the live system can mount read-only will do, such as FAT. - If that drive holds
bluerune.jsonat its top level, the ISO runsbluerune-install --config bluerune.json --yes. Its output shows on the screen and, when the machine has one, on the first serial port (ttyS0). - When the install succeeds, the machine restarts into the new system. Remove the ISO and the
cidatadrive, or set the virtual machine to start from its disk: if the machine starts the ISO again with thecidatadrive attached, it installs again.
Without a cidata drive, or without bluerune.json on it, the ISO starts the usual installer.
Each final line the unattended install prints starts with BLUERUNE-UNATTENDED:, so a script that reads the serial port can tell how it ended.
Make a cidata drive
For a virtual machine, make a small FAT image and attach it as a second disk. This needs dosfstools and mtools:
mkfs.fat -C -n cidata cidata.img 2048
mcopy -i cidata.img bluerune.json ::bluerune.json
cidata.img is a 2 MiB disk image holding bluerune.json. mkfs.fat warns that lowercase labels might not work on some systems; the ISO looks for both cidata and CIDATA.
For a real machine, use a second USB stick, or a partition on one, formatted with the label cidata, and copy bluerune.json to its top level. For example, with the stick's partition at /dev/sdY1 (check with lsblk; formatting erases it):
sudo mkfs.fat -n cidata /dev/sdY1
Then mount it and copy bluerune.json onto it.
bluerune.json
A complete example:
{
"disk": "/dev/nvme0n1",
"encryption": "a long passphrase",
"hostname": "bluerune",
"user": { "login": "me", "full_name": "My Name", "password": "secret" },
"timezone": "Europe/Berlin",
"locale": "en_US.UTF-8",
"keymap": "us",
"xkb_layout": "us",
"xkb_variant": "",
"gpu": "auto",
"autologin": false,
"kernel_args": ""
}
The smallest file that installs, unencrypted, with every default:
{ "disk": "auto", "user": { "login": "me", "password": "secret" } }
The installer refuses a file with a key that isn't listed below, and says which.
Keys
| Key | Type | Required | Default | Valid values |
|---|---|---|---|---|
disk |
string | yes | A whole disk, such as /dev/sda, /dev/nvme0n1 or /dev/vda; or "auto" |
|
encryption |
string or null |
no | no encryption | The LUKS2 passphrase; not empty |
hostname |
string | no | "bluerune" |
Letters, digits and hyphens in dot-separated parts of up to 63, none starting or ending with a hyphen; 253 at most |
user |
object | yes | See The user | |
timezone |
string | no | "UTC" |
An IANA time zone, such as "Europe/Berlin" or "America/New_York" |
locale |
string | no | "en_US.UTF-8" |
A UTF-8 locale from /usr/share/i18n/SUPPORTED |
keymap |
string | no | "us" |
A console keymap, such as "de-latin1"; used at the disk passphrase prompt |
xkb_layout |
string | no | "us" |
Keyboard layouts for the desktop, comma-separated: "us", "de,us" |
xkb_variant |
string | no | "" |
Variants for those layouts, comma-separated; no more than there are layouts |
gpu |
string | no | "auto" |
"auto", "open" or "nvidia"; see Graphics drivers |
autologin |
boolean | no | false |
true logs the user in at startup without the login screen |
kernel_args |
string | no | "" |
More kernel options for the installed system, after BlueRune's own, such as "nomodeset". No quotes, backslashes, $ or line breaks |
The user
The account the installer creates. It is in the wheel group, so it is an administrator through sudo.
| Key | Type | Required | Default | Valid values |
|---|---|---|---|---|
login |
string | yes | A lowercase letter or _, then lowercase letters, digits, _ and -; 32 at most. Not an account or group the system has, such as root or wheel |
|
full_name |
string | no | "" |
No colon, comma or line break; 256 bytes at most |
password |
string | one of the two | The password; not empty, no line break | |
password_hash |
string | one of the two | A crypt hash instead of the password, such as SHA-512 ($6$…) |
Give exactly one of password and password_hash. To keep the password itself out of the file, make a SHA-512 crypt hash and use it as password_hash:
openssl passwd -6
openssl asks for the password twice and prints a hash that starts with $6$.
Choosing the disk
"disk": "auto" picks the only disk that is fixed (not removable), not the install medium and not in use. If there is no such disk, the install stops. If there are several, it stops and names them; then give the disk's path.
Whichever disk you give, the installer refuses it when it:
- isn't one of the disks the installer found, such as a partition (
/dev/sda1) or a path that doesn't exist, - is the install medium,
- is in use: mounted partitions, swap, open LUKS volumes, LVM or RAID,
- is too small; the message gives the size needed and the size of the disk.
Each problem is printed as error: <key>: <message>, followed by nothing was changed. A disk that holds another system is accepted and erased; the installer prints a warning (warning: disk: Everything on … is erased, including …) and goes on.
Graphics drivers
The system image has Mesa, the open-source graphics drivers. gpu decides what is added:
"auto": what the machine's graphics cards need. For an NVIDIA card, that is NVIDIA's open kernel modules and its user-space driver."open": open-source drivers only (Mesa, and nouveau for NVIDIA cards)."nvidia": NVIDIA's open kernel modules and its user-space driver, whatever was detected.
Check a file before you use it
From a terminal on the running ISO, bluerune-install can list the disks and show every command an install would run, without running any:
sudo bluerune-install --list-disks
sudo bluerune-install --config bluerune.json --dry-run
The dry run leaves secrets out of what it prints. The same checks run before a real install, so a file the dry run accepts installs with the same choices.
The command line
bluerune-install --help on the ISO prints:
Usage:
bluerune-install --config FILE.json [--yes] [--dry-run] install as the file says
bluerune-install --interactive [--dry-run] install, asking in the terminal
bluerune-install --list-disks [--json] the disks it can install to
Options:
--yes don't ask before erasing the disk
--dry-run show every command it would run (secrets left out), and run none
--media DIR the payload directory (default: the live ISO's, or $BLUERUNE_MEDIA)
--target-is-a-vm-disk allow installing outside the live ISO (to a VM's disk or a loop
device), and list loop devices
-h, --help show this help
The log is /var/log/bluerune-install.log, copied to the installed system.
It exits with 0 when the install succeeds, 1 when it fails, and 2 when the options are wrong.