From: Ian Kelling Date: Wed, 18 Aug 2021 04:03:04 +0000 (-0400) Subject: Merge branch 'upstream' X-Git-Url: https://iankelling.org/git/?p=automated-distro-installer;a=commitdiff_plain;h=591c84435e22df12f2b5121c08578bff7c6bb047 Merge branch 'upstream' --- 591c84435e22df12f2b5121c08578bff7c6bb047 diff --cc fai/config/basefiles/mk-basefile index e4fd05d,085b9a4..39471d8 --- a/fai/config/basefiles/mk-basefile +++ b/fai/config/basefiles/mk-basefile @@@ -1,7 -1,8 +1,7 @@@ #! /bin/bash - # mk-basefile, create basefiles for some distributions # - # Thomas Lange, Uni Koeln, 2011-2020 + # Thomas Lange, Uni Koeln, 2011-2021 # based on the Makefile implementation of Michael Goetze # # Usage example: mk-basefile -J STRETCH64 @@@ -30,16 -30,14 +30,18 @@@ EXCLUDE_JESSIE=inf EXCLUDE_STRETCH=info EXCLUDE_BUSTER= EXCLUDE_BULLSEYE= + EXCLUDE_BOOKWORM= + EXCLUDE_TRIXIE= EXCLUDE_SID= +EXCLUDE_BELENOS=dhcp3-client,dhcp3-common,info EXCLUDE_TRUSTY=dhcp3-client,dhcp3-common,info EXCLUDE_XENIAL=udhcpc,dibbler-client,info +EXCLUDE_FLIDAS=udhcpc,dibbler-client,info EXCLUDE_BIONIC=udhcpc,dibbler-client,info +EXCLUDE_ETIONA=udhcpc,dibbler-client,info EXCLUDE_FOCAL=udhcpc,dibbler-client,info +EXCLUDE_NABIA=udhcpc,dibbler-client,info # here you can add packages, that are needed very early INCLUDE_DEBIAN= @@@ -312,11 -298,9 +316,11 @@@ case "$target" i SLC6_32) slc i386 6 ;; SLC6_64) slc amd64 6 ;; SLC7_64) slc amd64 7 ;; + BELENOS*|FLIDAS*|ETIONA*|NABIA*) + debgeneric $target $MIRROR_TRISQUEL ;; TRUSTY*|XENIAL*|BIONIC*|FOCAL*) debgeneric $target $MIRROR_UBUNTU ;; - SQUEEZE*|WHEEZY*|JESSIE*|STRETCH*|BUSTER*|BULLSEYE*|SID*) + SQUEEZE*|WHEEZY*|JESSIE*|STRETCH*|BUSTER*|BULLSEYE*|BOOKWORM*|TRIXIE*|SID*) debgeneric $target $MIRROR_DEBIAN $ARCH;; *) echo "Unknown distribution. Aborting." prtdists diff --cc fai/config/class/DEBIAN.var index 367c2e3,dc133a5..a00d0f8 --- a/fai/config/class/DEBIAN.var +++ b/fai/config/class/DEBIAN.var @@@ -1,7 -1,13 +1,14 @@@ - # sources are set with fcopy - #release=buster - #apt_cdn=http://deb.debian.org - #security_cdn=http://security.debian.org -release=bullseye -apt_cdn=http://deb.debian.org -security_cdn=http://security.debian.org ++# ian, commented, sources are set with fcopy ++# release=bullseye ++# apt_cdn=http://deb.debian.org ++# security_cdn=http://security.debian.org + + # since bullseye Debian changed the suite name for security + if [ $release = buster ]; then + secsuite=buster/updates + else + secsuite=$release-security + fi CONSOLEFONT= KEYMAP=us-latin1 diff --cc fai/config/package_config/STANDARD index 00376cb,de178ae..413254f --- a/fai/config/package_config/STANDARD +++ b/fai/config/package_config/STANDARD @@@ -21,63 -21,17 +21,61 @@@ ncurses-ter openssh-client pciutils perl - # newer distros dont have python, it gets naturally removed ++# ian: newer distros dont have python, it gets naturally removed +python +python-minimal +python3 +python3-minimal reportbug telnet traceroute ucf xz-utils +# ian standard packages +# lsof is used in my btrfs util scritps. +# netcat is used for proxy. +keyutils +cryptsetup +btrfs-progs +sudo +bridge-utils +netcat-openbsd +lsof +debconf-utils +file +less +rsync +openssh-client openssh-server +time +procinfo +locales +console-setup kbd +pciutils usbutils +unattended-upgrades +initramfs-tools-core +dropbear-initramfs +apt-transport-https +# ifupdown because etiona doesnt have it by default +# and fai scripts want to call ifquery. +ifupdown +netplan.io- +libnss-resolve +publicsuffix +iso-codes +# new package buster/nabia+ +cryptsetup-initramfs +# https://wiki.debian.org/UsrMerge +usrmerge +# for btrbk +zstd -PACKAGES install-norec STRETCH BUSTER -python -python-minimal +# iank, copied from DEBIAN so it goes into ubuntu too +PACKAGES install GRUB_PC +grub-pc -PACKAGES install-norec BULLSEYE -python3 -python3-minimal +PACKAGES install GRUB_EFI +# normally would have just grub-efi +# but theres a dependency problem with it in nabia: for some reason it depends on +# a version in security, but theres a later version in updates that the system +# really wants to install. +grub-efi-amd64 - - PACKAGES install NABIA FOCAL diff --cc fai/config/scripts/DEBIAN/10-rootpw index 7a7f617,329e2f6..539f2eb --- a/fai/config/scripts/DEBIAN/10-rootpw +++ b/fai/config/scripts/DEBIAN/10-rootpw @@@ -4,9 -4,14 +4,9 @@@ error=0; trap 'error=$(($?>$error?$?:$e # set root password if [ -n "$ROOTPW" ]; then - $ROOTCMD usermod -p "$ROOTPW" root - else + $ROOTCMD chpasswd --encrypted <<< "root:${ROOTPW}" + elif [ -n "$username" ]; then $ROOTCMD usermod -L root - # enable sudo for user - ainsl /etc/sudoers "$username ALL = ALL" - if [ ! -f $target/usr/bin/sudo ]; then - echo "WARNING. Package sudo is not installed" - fi fi exit $error diff --cc fai/config/scripts/GRUB_PC/10-setup index 85e90d2,270b356..e26aa26 --- a/fai/config/scripts/GRUB_PC/10-setup +++ b/fai/config/scripts/GRUB_PC/10-setup @@@ -40,18 -58,27 +60,29 @@@ if [[ $BOOT_DEVICE =~ '/dev/md' ]]; the raiddev=${BOOT_DEVICE#/dev/} # install grub on all members of RAID for device in $(LC_ALL=C perl -ne 'if(/^'$raiddev'\s.+raid\d+\s(.+)/){ $_=$1; s/\d+\[\d+\]//g; s/(nvme.+?)p/$1/g; print }' /proc/mdstat); do - echo Install grub on /dev/$device + pdevice=$(get_stable_devname /dev/$device) + if [ -z "$pdevice" ]; then + # if we cannot find a persistent name (for e.g. in a VM) use old name + pdevice="/dev/$device" + fi + mbrdevices+="$pdevice, " + echo Installing grub on /dev/$device = $pdevice $ROOTCMD grub-install --no-floppy "/dev/$device" done + # remove last , + mbrdevices=${mbrdevices%, } else - for dev in $BOOT_DEVICE; do - GROOT=$($ROOTCMD grub-probe -tdrive -d $dev) - $ROOTCMD grub-install --no-floppy "$GROOT" - if [ $? -eq 0 ]; then - echo "Grub installed on $dev = $GROOT" - fi - done - mbrdevices=$(get_stable_devname $BOOT_DEVICE) ++ for dev in $BOOT_DEVICE; do ++ mbrdevices=$(get_stable_devname $dev) + if [ -z "$mbrdevices" ]; then - # if we cannot find a persistent name (for e.g. in a VM) use old name - mbrdevices=$BOOT_DEVICE ++ # if we cannot find a persistent name (for e.g. in a VM) use old name ++ mbrdevices=$dev + fi - echo "Installing grub on $BOOT_DEVICE = $mbrdevices" ++ echo "Installing grub on $dev = $mbrdevices" + $ROOTCMD grub-install --no-floppy "$mbrdevices" ++ done fi - $ROOTCMD update-grub + echo "grub-pc grub-pc/install_devices multiselect $mbrdevices" | $ROOTCMD debconf-set-selections + $ROOTCMD dpkg-reconfigure grub-pc exit $error