From: Ian Kelling Date: Thu, 4 Jul 2019 03:28:46 +0000 (-0400) Subject: Merge branch 'upstream' X-Git-Url: https://iankelling.org/git/?p=automated-distro-installer;a=commitdiff_plain;h=3d9cc96092cdc8aa05bc95cf83c07bb1af692013;hp=b231c7038b1d0b6143f14a1a5efb90cd62aae876 Merge branch 'upstream' Tested with flidas vm. --- diff --git a/fai/config/basefiles/mk-basefile b/fai/config/basefiles/mk-basefile index 4037d09..6dcd986 100755 --- a/fai/config/basefiles/mk-basefile +++ b/fai/config/basefiles/mk-basefile @@ -184,6 +184,7 @@ debgeneric() { dist=${DIST%%[0-9][0-9]} local exc="EXCLUDE_$dist" + [ -n "${!exc}" ] && exc="--exclude=${!exc}" || unset exc dist=${dist,,} check @@ -192,7 +193,7 @@ debgeneric() { fi if [ -n "$arch" ]; then - qemu-debootstrap --arch $arch --exclude=${!exc} $inc $dist $xtmp $mirror + qemu-debootstrap --arch $arch ${exc} $inc $dist $xtmp $mirror target="${target}_${arch^^}" else if [[ $DIST =~ 64 ]]; then @@ -200,7 +201,7 @@ debgeneric() { else arch=i386 fi - debootstrap --arch $arch --exclude=${!exc} $dist $xtmp $mirror + debootstrap --arch $arch ${exc} $inc $dist $xtmp $mirror fi cleanup-deb tarit diff --git a/fai/config/class/20-hwdetect.sh b/fai/config/class/20-hwdetect.sh index a928b54..510be75 100755 --- a/fai/config/class/20-hwdetect.sh +++ b/fai/config/class/20-hwdetect.sh @@ -12,8 +12,7 @@ echo 0 > /proc/sys/kernel/printk # here, you can load modules depending on the kernel version case $(uname -r) in 2.6*) kernelmodules="$kernelmodules mptspi dm-mod md-mod aes dm-crypt" ;; - 3*) kernelmodules="$kernelmodules mptspi dm-mod md-mod aes dm-crypt" ;; - 4*) kernelmodules="$kernelmodules mptspi dm-mod md-mod aes dm-crypt" ;; + [3456]*) kernelmodules="$kernelmodules mptspi dm-mod md-mod aes dm-crypt" ;; esac for mod in $kernelmodules; do diff --git a/fai/config/class/60-misc b/fai/config/class/60-misc index 9733dcb..1c3b4fd 100755 --- a/fai/config/class/60-misc +++ b/fai/config/class/60-misc @@ -1,6 +1,11 @@ #! /bin/bash ifclass -o CENTOS SLC && exit 0 -if ifclass -o I386 AMD64 ; then - ifclass -o GRUB_PC GRUB_EFI ||echo GRUB_PC + +ifclass -o GRUB_PC GRUB_EFI && exit 0 + +if [ -d /sys/firmware/efi ]; then + echo GRUB_EFI +elif ifclass -o I386 AMD64 ; then + echo GRUB_PC fi diff --git a/fai/config/class/DEBIAN.var b/fai/config/class/DEBIAN.var index 2ce239b..f343669 100644 --- a/fai/config/class/DEBIAN.var +++ b/fai/config/class/DEBIAN.var @@ -1,4 +1,4 @@ -release=stretch +release=buster apt_cdn=http://deb.debian.org security_cdn=http://security.debian.org diff --git a/fai/config/class/example.profile b/fai/config/class/example.profile new file mode 100644 index 0000000..70a940e --- /dev/null +++ b/fai/config/class/example.profile @@ -0,0 +1,54 @@ +Default: Xfce + +Name: Simple +Description: My first FAI installation +Short: just a very simple example, no xorg, an account called demo +Long: This is the demohost example of FAI. +Additional account called demo with password: fai, root password: fai +All needed packages are already on the CD or USB stick. +Classes: INSTALL FAIBASE DEBIAN DEMO + +Name: Xfce +Description: Xfce desktop, LVM partitioning +Short: A fancy Xfce desktop will be installed, the user account is demo +Long: This is the Xfce desktop example. Additional account called +demo with password: fai, root password: fai +All needed packages are already on the CD or USB stick. +Classes: INSTALL FAIBASE DEBIAN DEMO XORG XFCE LVM + +Name: Gnome +Description: Gnome desktop installation +Short: A Gnome desktop, no LVM, You will get an account called demo +Long: This is the Gnome desktop example. Additional account called +demo with password: fai, root password: fai +You should have a fast network connection, because most packages are +downloaded from the internet. +Classes: INSTALL FAIBASE DEBIAN DEMO XORG GNOME + +Name: CentOS 7 +Description: CentOS 7 with Xfce desktop +Short: A normal Xfce desktop, running CentOS 7 +Long: We use the Debian nfsroot for installing the CentOS 7 OS. +You should have a fast network connection, because most packages are +downloaded from the internet. +Classes: INSTALL FAIBASE CENTOS CENTOS7_64 XORG + +Name: Ubuntu +Description: Ubuntu 18.04 desktop installation +Short: Unity desktop +Long: We use the Debian nfsroot for installing the Ubuntu OS. +You should have a fast network connection, because most packages are +downloaded from the internet. +Classes: INSTALL FAIBASE DEMO DEBIAN UBUNTU BIONIC BIONIC64 XORG + +Name: Inventory +Description: Show hardware info +Short: Show some basic hardware infos +Long: Execute commands for showing hardware info +Classes: INVENTORY + +Name: Sysinfo +Description: Show defailed system information +Short: Show detailed hardware and system information +Long: Execute a lot of commands for collecting system information +Classes: SYSINFO diff --git a/fai/config/debconf/CLOUD b/fai/config/debconf/CLOUD index a5ab74d..e3614d6 100644 --- a/fai/config/debconf/CLOUD +++ b/fai/config/debconf/CLOUD @@ -1,2 +1,2 @@ # Linux command line: -grub-pc grub2/linux_cmdline_default string elevator=noop quiet +grub-pc grub2/linux_cmdline_default string elevator=noop quiet diff --git a/fai/config/debconf/DEBIAN b/fai/config/debconf/DEBIAN index e9dc3c1..1e14af7 100644 --- a/fai/config/debconf/DEBIAN +++ b/fai/config/debconf/DEBIAN @@ -1,9 +1,9 @@ exim4-config exim4/dc_eximconfig_configtype select local delivery only; not on a network locales locales/default_environment_locale select en_US.UTF-8 locales locales/locales_to_be_generated multiselect en_US.UTF-8 UTF-8 -keyboard-configuration keyboard-configuration/modelcode string pc105 -keyboard-configuration keyboard-configuration/xkb-keymap select us -keyboard-configuration keyboard-configuration/variant select USA -keyboard-configuration keyboard-configuration/model select Generic 105-key (Intl) PC -keyboard-configuration keyboard-configuration/layoutcode string us -keyboard-configuration keyboard-configuration/optionscode string ctrl:nocaps,terminate:ctrl_alt_bksp +keyboard-configuration keyboard-configuration/modelcode string pc105 +keyboard-configuration keyboard-configuration/xkb-keymap select us +keyboard-configuration keyboard-configuration/variant select USA +keyboard-configuration keyboard-configuration/model select Generic 105-key (Intl) PC +keyboard-configuration keyboard-configuration/layoutcode string us +keyboard-configuration keyboard-configuration/optionscode string ctrl:nocaps,terminate:ctrl_alt_bksp diff --git a/fai/config/debconf/GERMAN b/fai/config/debconf/GERMAN index a1fbc27..cca0416 100644 --- a/fai/config/debconf/GERMAN +++ b/fai/config/debconf/GERMAN @@ -1,8 +1,8 @@ locales locales/default_environment_locale select de_DE.UTF-8 locales locales/locales_to_be_generated multiselect de_DE.UTF-8 UTF-8 -keyboard-configuration keyboard-configuration/modelcode string pc105 -keyboard-configuration keyboard-configuration/xkb-keymap select de -keyboard-configuration keyboard-configuration/variant select Germany -keyboard-configuration keyboard-configuration/model select Generic 105-key (Intl) PC -keyboard-configuration keyboard-configuration/layoutcode string de -keyboard-configuration keyboard-configuration/optionscode string ctrl:nocaps,terminate:ctrl_alt_bksp +keyboard-configuration keyboard-configuration/modelcode string pc105 +keyboard-configuration keyboard-configuration/xkb-keymap select de +keyboard-configuration keyboard-configuration/variant select Germany +keyboard-configuration keyboard-configuration/model select Generic 105-key (Intl) PC +keyboard-configuration keyboard-configuration/layoutcode string de +keyboard-configuration keyboard-configuration/optionscode string ctrl:nocaps,terminate:ctrl_alt_bksp diff --git a/fai/config/files/etc/dhcp/dhcpd.conf/FAISERVER b/fai/config/files/etc/dhcp/dhcpd.conf/FAISERVER index 55784e2..b0343cc 100644 --- a/fai/config/files/etc/dhcp/dhcpd.conf/FAISERVER +++ b/fai/config/files/etc/dhcp/dhcpd.conf/FAISERVER @@ -15,7 +15,12 @@ subnet 192.168.33.0 netmask 255.255.255.0 { # option ntp-servers faiserver; server-name faiserver; next-server faiserver; - filename "fai/pxelinux.0"; + if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00000" { + filename "fai/pxelinux.0"; + } + if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00007" { + filename "fai/syslinux.efi"; + } allow unknown-clients; pool { range 192.168.33.100 192.168.33.150; diff --git a/fai/config/files/etc/fai/nfsroot.conf/FAISERVER b/fai/config/files/etc/fai/nfsroot.conf/FAISERVER index 9e192c6..dfa5c1f 100644 --- a/fai/config/files/etc/fai/nfsroot.conf/FAISERVER +++ b/fai/config/files/etc/fai/nfsroot.conf/FAISERVER @@ -1,7 +1,7 @@ # For a detailed description see nfsroot.conf(5) # " " for debootstrap -FAI_DEBOOTSTRAP="stretch http://deb.debian.org/debian" +FAI_DEBOOTSTRAP="buster http://deb.debian.org/debian" FAI_ROOTPW='$1$kBnWcO.E$djxB128U7dMkrltJHPf6d1' NFSROOT=/srv/fai/nfsroot diff --git a/fai/config/files/etc/rc.local/FAISERVER b/fai/config/files/etc/rc.local/FAISERVER index 8710678..e70fae9 100755 --- a/fai/config/files/etc/rc.local/FAISERVER +++ b/fai/config/files/etc/rc.local/FAISERVER @@ -33,7 +33,7 @@ if [ ! -d "$FAI_CONFIGDIR/class" ]; then mkdir -p $FAI_CONFIGDIR cp -a /usr/share/doc/fai-doc/examples/simple/* $FAI_CONFIGDIR ainsl /srv/fai/config/class/FAIBASE.var "^LOGUSER=fai" - myip=$(ip addr show up| grep -w inet | cut -d t -f 2 | cut -d ' ' -f 2 | cut -d / -f 1 | grep -v 127.0.0.1) + myip=$(ip addr show up| grep -P -o '(?<=inet )[^/]+' | grep -v 127.0.0.1) echo "APTPROXY=http://$myip:3142" >> /srv/fai/config/class/DEBIAN.var fi # set the LOGUSER, wo we get all the logs from our install clients @@ -79,7 +79,7 @@ EOF fai-chboot -o default # create a template for booting the installation -fai-chboot -Iv -f verbose,sshd,createvt,menu -u nfs://faiserver/srv/fai/config stretch.tmpl +fai-chboot -Iv -f verbose,sshd,createvt,menu -u nfs://faiserver/srv/fai/config buster.tmpl # Since we do not know the MAC address, our DHCP cannot provide the hostname. # Therefore we do explicitly set the hostname diff --git a/fai/config/hooks/instsoft.DEBIAN b/fai/config/hooks/instsoft.DEBIAN index 4119173..34e6ebb 100755 --- a/fai/config/hooks/instsoft.DEBIAN +++ b/fai/config/hooks/instsoft.DEBIAN @@ -9,12 +9,10 @@ fi fcopy -Bi /etc/apt/apt.conf.d/force_confdef -# ian: on flidas this gives an error: update-locale: Error: invalid locale settings: LANG=en_US.UTF-8 -# # in case the locales are already included inside the base file (Ubuntu) -# if [ -f $target/usr/sbin/locale-gen ]; then -# $ROOTCMD dpkg-reconfigure -fnoninteractive locales -# exit -# fi +# in case the locales are already included inside the base file (Ubuntu) +if [ -f $target/usr/sbin/locale-gen ]; then + exit +fi # if we want to install locales, install them now install_packages -l 2>/dev/null | egrep -q ' locales|locales ' diff --git a/fai/config/hooks/savelog.LAST.sh b/fai/config/hooks/savelog.LAST.sh index e77b9be..dd922ba 100755 --- a/fai/config/hooks/savelog.LAST.sh +++ b/fai/config/hooks/savelog.LAST.sh @@ -55,6 +55,7 @@ kolabadmin gstreamer.\+-plugins-really-bad liberrors.so liberrors-samba +libsamba-errors gsambad libad libtest-nowarnings-perl @@ -159,6 +160,15 @@ Warning: apt-key output should not be parsed WARNING: Failed to connect to lvmetad. Falling back to device scanning Warning: The home dir /var/lib/usbmux you specified diff: /var/lib/apparmor/profiles/.apparmor.md5sums: No such file or directory +error reporting disabled +Enabling Firmware First mode for corrected errors +errors: 0 + 0 errors +Memory Error Correction: +Memory Controller 0 - Channel . Error +IIO RAS/Control Status/Global Errors +__stack_chk_fail +grub.cfg.new: Directory nonexistent update-rc.d: warning: start and stop actions are no longer supported" # add pattern on some conditions diff --git a/fai/config/package_config/FAISERVER b/fai/config/package_config/FAISERVER index b26cdd9..25672c8 100644 --- a/fai/config/package_config/FAISERVER +++ b/fai/config/package_config/FAISERVER @@ -10,4 +10,4 @@ apt-cacher-ng nscd psmisc bind9 dnsutils iptables-persistent -emacs25-nox +zile diff --git a/fai/config/package_config/UBUNTU b/fai/config/package_config/UBUNTU index 81670da..a2de98e 100644 --- a/fai/config/package_config/UBUNTU +++ b/fai/config/package_config/UBUNTU @@ -31,7 +31,5 @@ grub-pc cryptsetup btrfs-tools mbuffer sudo bridge-utils netcat-openbsd resolvco PACKAGES install FLIDAS64 XENIAL64 linux-image-generic-hwe-8.0 -PACKAGES install XORG -ubuntu-desktop -ubuntu-standard -ubuntu-minimal +PACKAGES install GERMAN +language-pack-gnome-de diff --git a/fai/config/package_config/XFCE b/fai/config/package_config/XFCE index 28cade9..2e878d3 100644 --- a/fai/config/package_config/XFCE +++ b/fai/config/package_config/XFCE @@ -3,3 +3,4 @@ xfce4 # base system xfce4-goodies # additional tools lightdm firefox-esr +network-manager-gnome diff --git a/fai/config/package_config/XORG b/fai/config/package_config/XORG index 5859084..2dd9d0b 100644 --- a/fai/config/package_config/XORG +++ b/fai/config/package_config/XORG @@ -5,3 +5,8 @@ xscreensaver xscreensaver-gl xterm desktop-base + +PACKAGES install UBUNTU +ubuntu-server- +ubuntu-standard +ubuntu-desktop diff --git a/fai/config/scripts/DEBIAN/10-rootpw b/fai/config/scripts/DEBIAN/10-rootpw index 7a7f617..bb77d1a 100755 --- a/fai/config/scripts/DEBIAN/10-rootpw +++ b/fai/config/scripts/DEBIAN/10-rootpw @@ -7,6 +7,8 @@ if [ -n "$ROOTPW" ]; then $ROOTCMD usermod -p "$ROOTPW" root else $ROOTCMD usermod -L root + # enable sudo for user + ainsl /etc/sudoers "$username ALL = ALL" fi exit $error diff --git a/fai/config/scripts/DEBIAN/30-interface b/fai/config/scripts/DEBIAN/30-interface index 72f04a0..5955f7b 100755 --- a/fai/config/scripts/DEBIAN/30-interface +++ b/fai/config/scripts/DEBIAN/30-interface @@ -3,18 +3,63 @@ # modified from upstream fai example error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error code +netplan_yaml() { + # network configuration using ubuntu's netplan.io + local IFNAME="$1" + local METHOD="$2" + echo "Generating netplan configuration for $IFNAME ($METHOD)" >&2 + echo "# generated by FAI" + echo "network:" + echo " version: 2" + echo " renderer: $RENDERER" + case "$RENDERER" in + networkd) + echo " ethernets:" + echo " $IFNAME:" + case "$METHOD" in + dhcp) + echo " dhcp4: true" + ;; + static) + echo " addresses: [$CIDR]" + echo " gateway4: $GATEWAYS_1" + echo " nameservers:" + echo " search: [$DOMAIN]" + echo " addresses: [${DNSSRVS// /, }]" + ;; + esac + esac +} + +iface_stanza() { + # classic network configuration using /etc/network/interfaces + local IFNAME="$1" + local METHOD="$2" + echo "Generating interface configuration for $IFNAME ($METHOD)" >&2 + echo "# generated by FAI" + echo "auto $IFNAME" + echo "iface $IFNAME inet $METHOD" + case "$METHOD" in + static) + echo " address $IPADDR" + echo " netmask $NETMASK" + echo " broadcast $BROADCAST" + echo " gateway $GATEWAYS" + ;; + esac +} + newnicnames() { # determine predictable network names only for stretch and above [ $do_init_tasks -eq 0 ] && return - + [ -z "$NIC1" ] && return ver=$($ROOTCMD dpkg-query --showformat='${Version}' --show udev) if dpkg --compare-versions $ver lt 220-7; then return fi - [ -z "$NIC1" ] && return fields="ID_NET_NAME_FROM_DATABASE ID_NET_NAME_ONBOARD ID_NET_NAME_SLOT ID_NET_NAME_PATH" for field in $fields; do @@ -34,13 +79,25 @@ newnicnames() { } if [ -z "$NIC1" ]; then - echo "ERROR: \$NIC1 is not defined. Cannot configure /etc/network/interfaces properly." + echo "WARNING: \$NIC1 is not defined. Cannot add ethernet to /etc/network/interfaces." fi -newnicnames CIDR=$(ip -o -f inet addr show $NIC1 | awk '{print $4}') -if ifclass DHCPC && [ $FAI_ACTION = "install" -o $FAI_ACTION = "dirinstall" ]; then +newnicnames + +case "$FAI_ACTION" in + install|dirinstall) + ifclass DHCPC && METHOD=dhcp || METHOD=static + ifclass XORG && RENDERER=NetworkManager || RENDERER=networkd - if ifclass VM; then + if [ -d $target/etc/netplan ]; then + # Ubuntu >= 17.10 with netplan.io + if [ -n "$NIC1" ]; then + netplan_yaml $NIC1 $METHOD > $target/etc/netplan/01-${NIC1}.yaml + fi + elif [ -d $target/etc/network/interfaces.d ]; then + # ifupdown >= 0.7.41 (Debian >= 8, Ubuntu >= 14.04) + + if ifclass VM; then # note, this condition would apply to the elif below too, # but I don't specify a static ip in fai, so not bothering cat > $target/etc/network/interfaces <<-EOF @@ -49,7 +106,7 @@ if ifclass DHCPC && [ $FAI_ACTION = "install" -o $FAI_ACTION = "dirinstall" ]; t iface lo inet loopback iface $NIC1 inet dhcp EOF - else + else cat > $target/etc/network/interfaces <<-EOF # generated by FAI auto lo br0 @@ -65,21 +122,22 @@ EOF bridge_stp off bridge_maxwait 0 EOF + fi + else + ( + iface_stanza lo loopback + iface_stanza $NIC1 $METHOD + ) > $target/etc/network/interfaces fi -elif [ $FAI_ACTION = "install" -o $FAI_ACTION = "dirinstall" ]; then - [ -n "$CIDR" ] && cat > $target/etc/network/interfaces <<-EOF - # generated by FAI - auto lo $NIC1 - iface lo inet loopback - iface $NIC1 inet static - address $CIDR - gateway $GATEWAYS -EOF - [ -n "$NETWORK" ] && echo "localnet $NETWORK" > $target/etc/networks - if [ ! -L $target/etc/resolv.conf -a -e /etc/resolv.conf ]; then - cp -p /etc/resolv.conf $target/etc + + if ! ifclass DHCPC ; then + [ -n "$NETWORK" ] && echo "localnet $NETWORK" > $target/etc/networks + if [ ! -L $target/etc/resolv.conf -a -e /etc/resolv.conf ]; then + cp -p /etc/resolv.conf $target/etc + fi fi -fi + ;; +esac # here fcopy is mostly used, when installing a client for running in a # different subnet than during the installation diff --git a/fai/config/scripts/FAISERVER/10-conffiles b/fai/config/scripts/FAISERVER/10-conffiles index 812003b..578255f 100755 --- a/fai/config/scripts/FAISERVER/10-conffiles +++ b/fai/config/scripts/FAISERVER/10-conffiles @@ -18,7 +18,7 @@ if [ $FAI_ACTION = "install" -o $FAI_ACTION = "dirinstall" ] ; then ainsl -av /etc/apt/apt.conf.d/02proxy 'Acquire::http::Proxy "http://127.0.0.1:3142";' # create some host entries - myip=$(ip addr show up| grep -w inet | cut -d t -f 2 | cut -d ' ' -f 2 | cut -d / -f 1 | grep -v 127.0.0.1) + myip=$(ip addr show up| grep -P -o '(?<=inet )[^/]+' | grep -v 127.0.0.1) ainsl /etc/hosts "$myip faiserver" # that's me ainsl /etc/hosts "192.168.33.100 demohost" ainsl /etc/hosts "192.168.33.101 xfcehost" diff --git a/fai/config/scripts/GRUB_EFI/10-setup b/fai/config/scripts/GRUB_EFI/10-setup index 3e610ad..f586ba1 100755 --- a/fai/config/scripts/GRUB_EFI/10-setup +++ b/fai/config/scripts/GRUB_EFI/10-setup @@ -35,6 +35,11 @@ fi GROOT=$($ROOTCMD grub-probe -tdrive -d $BOOT_DEVICE) +# handle /boot in lvm-on-md +_bdev=$(readlink -f $BOOT_DEVICE) +if [ "${_bdev%%-*}" = "/dev/dm" ]; then + BOOT_DEVICE=$( lvs --noheadings -o devices $BOOT_DEVICE | sed -e 's/^*\([^(]*\)(.*$/\1/' ) +fi # Check if RAID is used for the boot device if [[ $BOOT_DEVICE =~ '/dev/md' ]]; then @@ -45,7 +50,8 @@ if [[ $BOOT_DEVICE =~ '/dev/md' ]]; then $ROOTCMD grub-install --no-floppy --force-extra-removable "/dev/$device" done -elif [[ $GROOT =~ 'hostdisk' ]]; then +elif [[ $BOOT_DEVICE =~ '/dev/loop' ]]; then + # do not update vmram when using a loop device $ROOTCMD grub-install --no-floppy --force-extra-removable --modules=part_gpt --no-nvram $BOOT_DEVICE if [ $? -eq 0 ]; then echo "Grub installed on hostdisk $BOOT_DEVICE" diff --git a/fai/config/scripts/GRUB_PC/10-setup b/fai/config/scripts/GRUB_PC/10-setup index 00829e1..a78df0c 100755 --- a/fai/config/scripts/GRUB_PC/10-setup +++ b/fai/config/scripts/GRUB_PC/10-setup @@ -28,6 +28,11 @@ fi GROOT=$($ROOTCMD grub-probe -tdrive -d $BOOT_DEVICE) +# handle /boot in lvm-on-md +_bdev=$(readlink -f $BOOT_DEVICE) +if [ "${_bdev%%-*}" = "/dev/dm" ]; then + BOOT_DEVICE=$( lvs --noheadings -o devices $BOOT_DEVICE | sed -e 's/^*\([^(]*\)(.*$/\1/' ) +fi # Check if RAID is used for the boot device if [[ $BOOT_DEVICE =~ '/dev/md' ]]; then @@ -38,14 +43,6 @@ if [[ $BOOT_DEVICE =~ '/dev/md' ]]; then echo Install grub on /dev/$device $ROOTCMD grub-install --no-floppy "/dev/$device" done - -elif [[ $GROOT =~ 'hostdisk' ]]; then - for dev in $BOOT_DEVICE; do - $ROOTCMD grub-install --no-floppy --modules=part_msdos $dev - if [ $? -eq 0 ]; then - echo "Grub installed on hostdisk $BOOT_DEVICE" - fi - done else for dev in $BOOT_DEVICE; do GROOT=$($ROOTCMD grub-probe -tdrive -d $dev) diff --git a/fai/config/scripts/LAST/50-misc b/fai/config/scripts/LAST/50-misc index 3661551..c2d6b5c 100755 --- a/fai/config/scripts/LAST/50-misc +++ b/fai/config/scripts/LAST/50-misc @@ -75,7 +75,7 @@ setrel() { return fi - dists="jessie stretch buster xenial trusty" + dists="jessie stretch buster bullseye bookworm bionic xenial trusty" for d in $dists; do if grep -iq $d $target/etc/os-release; then release=$d diff --git a/fai/config/scripts/UBUNTU/91-misc b/fai/config/scripts/UBUNTU/91-misc new file mode 100755 index 0000000..0d1d6d8 --- /dev/null +++ b/fai/config/scripts/UBUNTU/91-misc @@ -0,0 +1,7 @@ +#! /bin/bash + +# disable the first login screen +$ROOTCMD dpkg-divert --local --rename --add /etc/xdg/autostart/gnome-initial-setup-first-login.desktop +$ROOTCMD dpkg-divert --local --rename --add /etc/xdg/autostart/gnome-initial-setup-copy-worker.desktop +$ROOTCMD deluser --system gnome-initial-setup +$ROOTCMD dpkg-reconfigure keyboard-configuration