Working preseed version. (At least for the VM)
This commit is contained in:
parent
2395210b76
commit
eb6c2908b3
31
input.cfg
31
input.cfg
@ -1,4 +1,3 @@
|
|||||||
#### Contents of the preconfiguration file (for buster)
|
|
||||||
### Localization
|
### Localization
|
||||||
# Preseeding only locale sets language, country and locale.
|
# Preseeding only locale sets language, country and locale.
|
||||||
d-i debian-installer/locale string en_US
|
d-i debian-installer/locale string en_US
|
||||||
@ -31,9 +30,9 @@ d-i netcfg/wireless_wep string
|
|||||||
d-i hw-detect/load_firmware boolean true
|
d-i hw-detect/load_firmware boolean true
|
||||||
|
|
||||||
### Wifi settings
|
### Wifi settings
|
||||||
d-i netcfg/wireless_essid CLC-Guest
|
#d-i netcfg/wireless_essid CLC-Guest
|
||||||
d-i netcfg/wireless_security_type wpa
|
#d-i netcfg/wireless_security_type wpa
|
||||||
d-i netcfg/wireless_wpa OneChurch!
|
#d-i netcfg/wireless_wpa OneChurch!
|
||||||
|
|
||||||
### Mirror settings
|
### Mirror settings
|
||||||
# If you select ftp, the mirror/country string does not need to be set.
|
# If you select ftp, the mirror/country string does not need to be set.
|
||||||
@ -66,6 +65,7 @@ d-i clock-setup/ntp boolean true
|
|||||||
|
|
||||||
|
|
||||||
### Partitioning
|
### Partitioning
|
||||||
|
#Tell disk to use lvm and bypasss confirmations to clear previous lvm, raid.
|
||||||
d-i partman-auto/method string lvm
|
d-i partman-auto/method string lvm
|
||||||
d-i partman-auto-lvm/guided_size string max
|
d-i partman-auto-lvm/guided_size string max
|
||||||
d-i partman-lvm/device_remove_lvm boolean true
|
d-i partman-lvm/device_remove_lvm boolean true
|
||||||
@ -73,20 +73,17 @@ d-i partman-md/device_remove_md boolean true
|
|||||||
d-i partman-lvm/confirm boolean true
|
d-i partman-lvm/confirm boolean true
|
||||||
d-i partman-lvm/confirm_nooverwrite boolean true
|
d-i partman-lvm/confirm_nooverwrite boolean true
|
||||||
|
|
||||||
|
#Default partition map all files in one partition
|
||||||
d-i partman-auto/choose_recipe select atomic
|
d-i partman-auto/choose_recipe select atomic
|
||||||
|
|
||||||
|
#Tell partman to go without confirmation
|
||||||
d-i partman-partitioning/confirm_write_new_label boolean true
|
d-i partman-partitioning/confirm_write_new_label boolean true
|
||||||
d-i partman/choose_partition select finish
|
d-i partman/choose_partition select finish
|
||||||
d-i partman/confirm boolean true
|
d-i partman/confirm boolean true
|
||||||
d-i partman/confirm_nooverwrite boolean true
|
d-i partman/confirm_nooverwrite boolean true
|
||||||
|
|
||||||
d-i partman-md/confirm boolean true
|
#Force UEFI
|
||||||
d-i partman-partitioning/confirm_write_new_label boolean true
|
#d-i partman-efi/non_efi_system boolean true
|
||||||
d-i partman/choose_partition select finish
|
|
||||||
d-i partman/confirm boolean true
|
|
||||||
d-i partman/confirm_nooverwrite boolean true
|
|
||||||
|
|
||||||
d-i partman-efi/non_efi_system boolean true
|
|
||||||
|
|
||||||
### Base system installation
|
### Base system installation
|
||||||
|
|
||||||
@ -96,7 +93,7 @@ d-i apt-setup/non-free boolean true
|
|||||||
d-i apt-setup/contrib boolean true
|
d-i apt-setup/contrib boolean true
|
||||||
|
|
||||||
### Package selection
|
### Package selection
|
||||||
#tasksel tasksel/first multiselect standard, web-server, kde-desktop
|
#tasksel tasksel/first multiselect standard, gnome
|
||||||
|
|
||||||
# Individual additional packages to install
|
# Individual additional packages to install
|
||||||
#d-i pkgsel/include string openssh-server build-essential
|
#d-i pkgsel/include string openssh-server build-essential
|
||||||
@ -106,6 +103,9 @@ d-i pkgsel/include string firmware-iwlwifi openssh-server curl vlc timeshift
|
|||||||
# Allowed values: none, safe-upgrade, full-upgrade
|
# Allowed values: none, safe-upgrade, full-upgrade
|
||||||
#d-i pkgsel/upgrade select none
|
#d-i pkgsel/upgrade select none
|
||||||
|
|
||||||
|
#Skip popularity contest
|
||||||
|
popularity-contest popularity-contest/participate boolean false
|
||||||
|
|
||||||
### Boot loader installation
|
### Boot loader installation
|
||||||
# This is fairly safe to set, it makes grub install automatically to the MBR
|
# This is fairly safe to set, it makes grub install automatically to the MBR
|
||||||
# if no other operating system is detected on the machine.
|
# if no other operating system is detected on the machine.
|
||||||
@ -117,9 +117,9 @@ d-i grub-installer/with_other_os boolean true
|
|||||||
|
|
||||||
# Due notably to potential USB sticks, the location of the MBR can not be
|
# Due notably to potential USB sticks, the location of the MBR can not be
|
||||||
# determined safely in general, so this needs to be specified:
|
# determined safely in general, so this needs to be specified:
|
||||||
d-i grub-installer/bootdev string /dev/sda
|
#d-i grub-installer/bootdev string /dev/sda
|
||||||
# To install to the first device (assuming it is not a USB stick):
|
# To install to the first device (assuming it is not a USB stick):
|
||||||
#d-i grub-installer/bootdev string default
|
d-i grub-installer/bootdev string default
|
||||||
|
|
||||||
# Use the following option to add additional boot parameters for the
|
# Use the following option to add additional boot parameters for the
|
||||||
# installed system (if supported by the bootloader installer).
|
# installed system (if supported by the bootloader installer).
|
||||||
@ -131,6 +131,9 @@ d-i grub-installer/bootdev string /dev/sda
|
|||||||
# Avoid that last message about the install being complete.
|
# Avoid that last message about the install being complete.
|
||||||
d-i finish-install/reboot_in_progress note
|
d-i finish-install/reboot_in_progress note
|
||||||
|
|
||||||
|
#eject install cd
|
||||||
|
d-i cdrom-detect/eject boolean false
|
||||||
|
|
||||||
#### Advanced options
|
#### Advanced options
|
||||||
### Running custom commands during the installation
|
### Running custom commands during the installation
|
||||||
|
|
||||||
|
@ -1,12 +1,21 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
CMD=$1
|
CMD=$1
|
||||||
|
|
||||||
|
if ! command -v parallel-ssh &> /dev/null
|
||||||
|
then
|
||||||
|
echo "parallel-ssh could not be found. Attempting to aquire from the repo."
|
||||||
|
sudo apt install pssh
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
|
||||||
echo -e "You are about to run \e[1;32m$CMD\e[0m on all hosts."
|
echo -e "You are about to run \e[1;32m$CMD\e[0m on all hosts."
|
||||||
|
|
||||||
run () {
|
run () {
|
||||||
if grep -q "sudo" <<< "$CMD"; then
|
if grep -q "sudo" <<< "$CMD"; then
|
||||||
echo "sudo command detected. Attempting to elevate permissions"
|
echo "sudo command detected. Attempting to elevate permissions"
|
||||||
parallel-ssh -A -i -x '-tt' -t 0 -h pssh_hosts -l ansible "echo 'ansible' | $CMD && history -c"
|
echo "Please enter your sudo password."
|
||||||
|
read -s SUDOPASS
|
||||||
|
parallel-ssh -A -i -x '-tt' -t 0 -h pssh_hosts -l ansible "echo '$SUDOPASS' | $CMD && history -c"
|
||||||
else
|
else
|
||||||
parallel-ssh -A -i -x '-tt' -h pssh_hosts -l ansible "$CMD && history -c"
|
parallel-ssh -A -i -x '-tt' -h pssh_hosts -l ansible "$CMD && history -c"
|
||||||
fi
|
fi
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#EXAMPLE PASSWD config file
|
#EXAMPLE PASSWD config file
|
||||||
#rename to .passwd.cfg and add a crypt(3) hash password
|
#rename to .passwd.cfg and add a crypt(3) hash password
|
||||||
rootpassword=notarealpassword
|
roothash=notarealpassword
|
||||||
userpasswort=12345
|
userhash=12345
|
@ -7,7 +7,9 @@ fi
|
|||||||
|
|
||||||
LOCALIP=$(hostname -I)
|
LOCALIP=$(hostname -I)
|
||||||
|
|
||||||
. .passwd.cfg
|
source .passwd.cfg
|
||||||
|
|
||||||
|
[ -d "webdir" ] && echo "Old config found. Removing." && rm -r webdir
|
||||||
|
|
||||||
#copy the pre-preseed file and update the passwords from the .passwd.cfg file
|
#copy the pre-preseed file and update the passwords from the .passwd.cfg file
|
||||||
mkdir webdir
|
mkdir webdir
|
||||||
|
Loading…
Reference in New Issue
Block a user