您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
lub e8616c3dc7 systemd-networkd fix config 9 小时前
authorized_keys update keys 8 个月前
config/etc fix parameter used in 1d7656a8a3 8 个月前
hardware systemd-networkd fix config 9 小时前
README.md Revert "only use rsa keys for dropbear" 8 个月前
post-debootstrap-installer.sh trying to fix dropbear 8 个月前
reset.sh make reset multithreaded and shorter 8 个月前
setup.sh go directly in chroot at the end to set passwords 8 个月前

README.md

These scripts setup a blank hardware server according to our requirements including partitions, raids, debootstrap, package installation and various other configuration. The goal is to create a server ready to join into the swarm.

Usage (from a live system):

# (!) wipes the start sectors of all disks (!)
# (!) review before executing (!)
./reset.sh
reboot


./setup.sh <template> <fqdn>

# example:
./setup.sh ovh_rise-1 server321.example.com


# Unlock the disk after booting the server from disk:
# Dropbear is configured on 222 and only allows the user root
ssh -p 222 root@<fqdn>
cryptroot-unlock

setup.sh executes the hardware specific template files, debootstraps and invokes the actual installer inside the fresh environment.
As much as possible should be done in the chroot, as only there we have control over the software (the live system is normally provided by the hardware provider).

Templates (hardware/*) consist of three files:

  • esp - a symlink to the desired ESP partition
  • parted.sh - script to prepare the partitions. Should create ESP (/boot/efi), md0 (/) and md1 (/boot)
  • network.sh - creates the neccessary configs in /etc/systemd/network

config/* gets copied to the chroot and contains static config files

authorized_keys/* is used to create the users and populate their respective ~/.ssh/authorized_keys