Sortix cross-nightly manual
This manual documents Sortix cross-nightly. You can instead view this document in the latest official manual.
NAME
autoinstall.conf — automatic installation configurationSYNOPSIS
/etc/autoinstall.conf |
DESCRIPTION
autoinstall.conf configures sysinstall(8) to do an automatic operating system installation(7).- accept_defaults=[no | yes] (default no)
- Accept the default answer (if any) to questions that were not configured in autoinstall.conf? This feature makes installations entirely automated even if unexpected questions are asked, although the essential questions must be answered.
-
countdown=seconds (
default
10
) - Count down for this many seconds with a warning that an automated installation is about to happen? The countdown happens if accept_defaults=yes or if the ready question is answered and either the disked or confirm_install questions are answered.
- ignore_missing_programs=[no | yes] (default no)
- Ignore if the installer environment does not have the needed ports installed? This situation ordinarily does not happen.
- ready=affirmation
-
Are you ready to begin the installation process? This is a human readable positive affirmation of your choice that you're ready to install, useful for fully automated installations. Not answering this question is useful for semi-automated installations where one would acknowledge the installation before it's begun. It also provides the opportunity to escape to a shell before installing.
- kblayout=[default | layout] (default default)
- Switch to this keyboard layout using chkblayout(1)? The choice is remembered as the kblayout(5) system default.
- videomode=[no | yes | WIDTHxHEIGHTxBPP] (default yes)
-
Interactively select a graphics resolution using chvideomode(1) or non-interactively set it to the specified resolution? The choice is remembered as the videomode(5) system default.
- grub=[no | yes]
-
Install the GRUB bootloader onto the device containing the /boot filesystem (if it exists, otherwise the root filesystem)? The default is yes if any existing installations are found with GRUB enabled or if no filesystems were found, otherwise the default is no.
- grub_password=[no | yes] (default yes)
-
Protect the bootloader with a password to avoid unauthorized root access via the advanced bootloader features? The standard bootloader menu options don't require a password. The password is set in the grub_password_hash question.
- grub_password_hash=hash
-
The bootloader password as hashed by the grub-mkpasswd-pbkdf2(1) program? The password is asked interactively if this question is not answered. The choice is remembered in grubpw(5).
grub-mkpasswd-pbkdf2 -p password
to dynamically hash the bootloader password. - grub_password_empty=[no | yes] (default no)
- Allow an insecure empty bootloader password typed interactively?
- kernel_options=options
- What kernel(7) options should be set in grub(5) with GRUB_CMDLINE_SORTIX? This question is asked only the GRUB port is installed, if the kernel was booted with explicit options or this question is set.
- disked=commands
-
Commands to create partitions and filesystems with disked(8)? The
++=
syntax is useful to append multiple lines to the disked answer. A root filesystem must be mounted in order to install the operating system. The mountpoints are remembered in fstab(5). - missing_bios_boot_partition=[no | yes] (default yes)
- Attempt disked(8) again if the GRUB bootloader is installed but the /boot directory's filesystem is inside a GPT partition table that doesn't have a biosboot partition?
- confirm_install=[no | yes | exit | poweroff | reboot | halt] (default yes)
-
Install the operating system or abort the installation? This is the final confirmation before the operating system is installed, after the partitioning has taken place.
- hostname=hostname
-
Hostname for the installation? The choice is remembered in hostname(5).
- password_hash_root=hash
-
Password for the root user as hashed with crypt_newhash(2)? The empty string sets the password to the empty string (insecure) and a literal x disables password login for root. The choice is remembered in passwd(5).
echo password | passwd -H
to dynamically hash the root password. - password_hash_root=[no | yes] (default no)
- Allow an insecure empty root password typed interactively?
- copy_ssh_authorized_keys_root=[no | yes] (default yes)
- Copy the /root/.ssh/authorized_keys file (if it exists) into the installation?
- copy_ssh_config_root=[no | yes] (default yes)
- Copy the /root/.ssh/config file (if it exists) into the installation?
- copy_ssh_id_rsa_root=[no | yes] (default yes)
- Copy the /root/.ssh/id_rsa file (if it exists) into the installation?
- copy_ssh_known_hosts_root=[no | yes] (default yes)
- Copy the /root/.ssh/known_hosts file (if it exists) into the installation?
- empty_password=[no | yes] (default no)
- Allow insecure empty passwords for regular users?
- enable_gui=[no | yes] (default yes)
- Enable the display(1) graphical user interface? The choice is remembered in session(5).
- enable_ntpd=[no | yes] (default no)
- Automatically get time from the network using ntpd(8)? Note this choice has privacy implications as the servers in ntpd.conf(5) file will be contacted in the background. The choice is remembered in /etc/init/local per init(5).
- enable_sshd=[no | yes] (default no)
- Enable the sshd(8) secure shell server? The choice is remembered in /etc/init/local per init(5).
- copy_sshd_config=[no | yes] (default no)
- Copy the /etc/sshd_config file (if it exists) into the installation?
- enable_sshd_password=[no | yes] (default no)
-
Enable password authentication in the local sshd(8)? The choice is remembered in sshd_config(5).
- enable_sshd_root_password=[no | yes] (default no)
- Enable ssh to the root user with password authentication?
- copy_sshd_private_keys=[no | yes] (default yes)
- Copy the sshd private keys (if they exist) into the installation? These are /etc/ssh_host_ecdsa_key, /etc/ssh_host_ed25519_key, and /etc/ssh_host_rsa_key.
- finally=[exit | poweroff | reboot | halt | boot | chroot] (default boot)
-
What action should be taken when the installation is finished?
chroot -d .
command is useful to chroot(8) into the new root filesystem to run commands with the /dev filesystem mounted.
FILES
- /etc/autoinstall.conf
- Automatic installation configuration.
EXAMPLES
Fully automated installation
To perform a fully automated installation with root login disabled, create autoinstall.conf:accept_defaults=yes grub=yes disked++=mktable mbr disked++=mkpart 1 0% 100% ext2 / hostname=dragon password_hash_root=x
tix-iso-liveconfig --autoinstall=autoinstall.conf liveconfig tix-iso-bootconfig \ --liveconfig=liveconfig --default=1 --random-seed \ bootconfig tix-iso-add sortix.iso bootconfig -o autosortix.iso
Setting passwords
The grub-mkpasswd-pbkdf2(1) command can be used to hash a GRUB password and passwd(1) can be used to hash a user password:grub-mkpasswd-pbkdf2 -p bootloader-password echo root-password | passwd -H
grub_password_hash=grub.pbkdf2.sha512.10000.68DA[...] password_hash_root=$2b$10$d/9pP1[...]
grub_password_hash!=grub-mkpasswd-pbkdf2 -p bootloader-password password_hash_root!=echo root-password | passwd -H
Automatically install with sshd
To automatically install the operating system with sshd enabled with keys and authorizations set up ahead of time, first create autoinstall.conf:accept_defaults=yes grub=yes disked++=mktable mbr disked++=mkpart 1 0% 100% ext2 / hostname=example.com password_hash_root=x enable_sshd=yes
tix-iso-liveconfig \ --autoinstall=autoinstall.conf \ --root-ssh-authorized-keys="$HOME/.ssh/id_rsa.pub" \ --sshd-keygen \ --sshd-key-known-hosts-file="$HOME/.ssh/known_hosts" \ --sshd-key-known-hosts-hosts="example.com example.com,192.0.2.1 192.0.2.1" \ liveconfig tix-iso-bootconfig \ --liveconfig=liveconfig --default=1 --random-seed \ bootconfig tix-iso-add sortix.iso bootconfig -o autosortix.iso
ssh root@example.com
Automatically install into a virtual machine with sshd
To automatically install into a qemu virtual machine, follow the above example but instead associate the server keys with your localhost and optionally use a known_hosts file per virtual machine.... --sshd-key-known-hosts-file="sortix.hdd.known_hosts" \ --sshd-key-known-hosts-hosts=127.0.0.1 \ ...
qemu-img create -f qcow2 sortix.hdd 1G qemu-system-x86_64 \ -vga std -m 1024 \ -hda sortix.hdd -cdrom autosortix.iso \ -device e1000,netdev=net0 \ -netdev user,id=net0,hostfwd=tcp:127.0.0.1:2222-:22
ssh -oUserKnownHostsFile=sortix.hdd.known_hosts -p 2222 root@127.0.0.1