41 lines
1.3 KiB
Plaintext
41 lines
1.3 KiB
Plaintext
#/usr/bin/guestfish -f
|
|
run
|
|
mount /dev/sda3 /
|
|
mount /dev/sda2 /boot
|
|
mount /dev/sda1 /boot/efi
|
|
|
|
!rm -rf entries
|
|
!mkdir entries
|
|
tar-out /boot/loader/entries - | tar -C entries -x
|
|
!sed -i '/options/s/\bro\b/rw/' entries/*.conf
|
|
!tar -cf entries.tar -C entries .
|
|
tar-in entries.tar /boot/loader/entries
|
|
!rm -rf entries.tar entries
|
|
|
|
write-append /boot/efi/config.txt dtoverlay=disable-bt
|
|
write-append /boot/efi/config.txt dtoverlay=disable-wifi
|
|
|
|
write /etc/hostname serial1.pyrocufflink.blue
|
|
write /etc/machine-id uninitialized
|
|
|
|
write /etc/sysconfig/ssh-host-cert-sign SSHCA_SERVER=https://sshca.pyrocufflink.blue
|
|
upload ssh-host-certificate.conf /etc/ssh/sshd_config.d/10-hostcertificate.conf
|
|
|
|
upload authorized_keys /root/.ssh/authorized_keys
|
|
|
|
rm-f /etc/systemd/system/multi-user.target.wants/initial-setup.service
|
|
|
|
mkdir-p /etc/systemd/system-preset
|
|
upload serialpi.preset /etc/systemd/system-preset/50-serialpi.preset
|
|
|
|
upload chrony-wait.service /etc/systemd/system/chrony-wait.service
|
|
mkdir-p /etc/systemd/system/time-sync.target.wants
|
|
|
|
upload dch.repo /etc/yum.repos.d/dch.repo
|
|
|
|
upload dch-firstboot.sh /usr/local/libexec/dch-firstboot.sh
|
|
chmod 0755 /usr/local/libexec/dch-firstboot.sh
|
|
upload dch-firstboot.service /etc/systemd/system/dch-firstboot.service
|
|
|
|
selinux-relabel /etc/selinux/targeted/contexts/files/file_contexts /
|