files | ||
.gitignore | ||
install-bios.py | ||
install.py | ||
LICENSE | ||
README.md | ||
requirements.txt | ||
ruff.toml |
Chimera pyinfra Config
Goal: Point these pyinfra operations at a machine booted into the Chimera live CD and install Chimera Linux to a bootable base state.
These scripts are intended for quick, automated installation of Chimera Linux on virtual machines. They've been used against local VMs in virt-manager as well as the web-based VNC console provided by some VPC hosts.
Setup
Initial setup to install pyinfra in a virtual env.
UNIX-like:
python -m venv .venv
. .venv/bin/activate
pip install --require-virtualenv -r requirements.txt
Windows:
python -m venv .venv
.venv\Scripts\Activate.ps1
pip install --require-virtualenv -r requirements.txt
powershell -Command { $env:VCPKG_ROOT="D:\Source\vcpkg"; pip install -r .\requirements.txt }
Configuration
EFI systems will use install.py
, BIOS systems will use install-bios.py
.
Edit files before running.
- Add your SSH public key to the
user_ssh_key
variable. - Review the 'Add swap' step and adjust the amount of swap if desired.
Install
- Boot from the Chimera base live CD
- Log into the console as root
- Bootstrap SSH access with xdotool; replace
<key> your-public-ssh-key
with your public SSH key:xdotool windowfocus --sync $(xdotool selectwindow) type 'dinitctl start sshd && mkdir ~/.ssh && echo "<key> your-public-ssh-key" > ~/.ssh/authorized_keys && ip addr && fdisk -l'
- Note IP address above
- Note the name of the disk to install to from above
fdisk
output - For EFI based systems run the
install.py
operation against the IP noted in step 5:pyinfra -vvv --user root IP install.py
- For BIOS based systems run the
install-bios.py
operation against the IP noted in step 5:pyinfra -vvv --user root IP install-bios.py
- At the beginning of the run after the disk device confirmation note the root password that is printed
- Reboot:
pyinfra --user root IP exec reboot
- Log in and set passwd for regular user (if
doas
access is required)
Post Install
Perform these steps either manually or by writing pyinfra code.
- https://chimera-linux.org/docs/configuration/post-installation
- https://chimera-linux.org/docs/configuration/microcode
Troubleshooting
Remount root
If something goes wrong and you want to remount a previous attempt (replace /dev/vda2
as necessary):
xdotool windowfocus --sync $(xdotool selectwindow) type 'mkdir /media/root && mount /dev/vda2 /media/root && mount /dev/vda1 /media/root/boot'
Dropped Characters With Typing With xdotool
Add --delay 100
to the xdotool type
command.
Maintenance Status
I'm publishing this code in the hope it's useful to others but maintenance will be limited. I'm unlikely to implement feature requests, but will review smaller contributions and bug reports.
Licence
This code is licenced under terms of the Zero-Clause BSD licence.