update to db59a1a2dd 2019-03-07
authorIan Kelling <iank@fsf.org>
Thu, 4 Jul 2019 01:12:52 +0000 (21:12 -0400)
committerIan Kelling <iank@fsf.org>
Thu, 4 Jul 2019 01:12:52 +0000 (21:12 -0400)
28 files changed:
fai/config/basefiles/mk-basefile
fai/config/class/20-hwdetect.sh
fai/config/class/50-host-classes
fai/config/class/60-misc
fai/config/class/DEBIAN.var
fai/config/class/UBUNTU.var
fai/config/class/example.profile
fai/config/debconf/CLOUD
fai/config/debconf/DEBIAN
fai/config/debconf/GERMAN
fai/config/files/etc/dhcp/dhcpd.conf/FAISERVER
fai/config/files/etc/fai/nfsroot.conf/FAISERVER
fai/config/files/etc/rc.local/FAISERVER
fai/config/hooks/instsoft.DEBIAN
fai/config/hooks/savelog.LAST.sh
fai/config/hooks/updatebase.UBUNTU
fai/config/package_config/FAISERVER
fai/config/package_config/UBUNTU
fai/config/package_config/XFCE
fai/config/package_config/XORG
fai/config/scripts/DEBIAN/10-rootpw
fai/config/scripts/DEBIAN/30-interface
fai/config/scripts/FAISERVER/10-conffiles
fai/config/scripts/GRUB_EFI/10-setup
fai/config/scripts/GRUB_PC/10-setup
fai/config/scripts/LAST/50-misc
fai/config/scripts/UBUNTU/90-apt
fai/config/scripts/UBUNTU/91-misc [new file with mode: 0755]

index 2fc0d2ace513f27ed08439c51521585a099ff107..deb12d4e59678407166e723095ec32e3fa0fc429 100755 (executable)
@@ -174,6 +174,7 @@ debgeneric() {
 
     dist=${DIST%%[0-9][0-9]}
     local exc="EXCLUDE_$dist"
+    [ -n "${!exc}" ] && exc="--exclude=${!exc}" || unset exc
     dist=${dist,,}
 
     check
@@ -182,7 +183,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
@@ -190,7 +191,7 @@ debgeneric() {
        else
             arch=i386
        fi
-       debootstrap --arch $arch --exclude=${!exc} $inc $dist $xtmp $mirror
+       debootstrap --arch $arch ${exc} $inc $dist $xtmp $mirror
     fi
     cleanup-deb
     tarit
index a928b54458b0171df65dcdb73ec948cd76d76eb1..510be75fcab28f78fd80b4fe21c753c5d62643cd 100755 (executable)
@@ -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
index fc89c1dd6709c8684df9b5ea07079c4eddaf2ed9..f0ba873de76081dc8e57e12fe0c3149c9d3d71c9 100755 (executable)
@@ -19,13 +19,13 @@ case $HOSTNAME in
         echo "FAIBASE CENTOS"   # you may want to add class XORG here
         ifclass I386 && echo CENTOS6_32  # AFAIK there's no 32bit C7
         ifclass AMD64 && echo CENTOS7_64
-        exit 0 ;; # CentOS does not use the GRUB class
+       ;;
     slchost)
         # Scientific Linux Cern, is very similar to CentOS. SLC should alsways use the class CENTOS
         echo "FAIBASE CENTOS SLC"  # you may want to add class XORG here
         ifclass I386 && echo SLC7_32
         ifclass AMD64 && echo SLC7_64
-        exit 0 ;; # CentOS/SLC does not use the GRUB class
+       ;;
     *)
         echo "FAIBASE DEBIAN DEMO" ;;
 esac
index 9733dcbd08565cae3e351164f1e76f3774f670e4..1c3b4fd7a7bff31e1a9ec0aaf63303c6d3ea8f7f 100755 (executable)
@@ -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
index b7146a799f059904b55ccfc44561486e2cf3c304..e9a275695156be45497decce5d88854dca64b1e2 100644 (file)
@@ -1,4 +1,4 @@
-release=stretch
+release=buster
 apt_cdn=http://deb.debian.org
 security_cdn=http://security.debian.org
 
index f45c3ce3caf38e3d2255b21642e0073d624159e9..5948df4712ffac3563991e177182d4952651981f 100644 (file)
@@ -1 +1,2 @@
-ubuntudist=xenial
+ubuntumirror=http://archive.ubuntu.com
+ubuntudist=bionic
index 75ff37fe4d84f99b88301b32fb0bca0c957ea2ae..70a940ec76902c5a2fe0ef4c5dd62f91ebc4cdc5 100644 (file)
@@ -34,12 +34,12 @@ downloaded from the internet.
 Classes: INSTALL FAIBASE CENTOS CENTOS7_64 XORG
 
 Name: Ubuntu
-Description: Ubuntu 16.04 desktop installation
+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 XENIAL XENIAL64 XORG
+Classes: INSTALL FAIBASE DEMO DEBIAN UBUNTU BIONIC BIONIC64 XORG
 
 Name: Inventory
 Description: Show hardware info
index a5ab74d3694b5956fd019caf5e677c7e4ad08a56..e3614d637af01762d0c19fa7057b1ab698d12877 100644 (file)
@@ -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
index e9dc3c1df659ef4cce070810ad52e244c5f3bf66..1e14af7eb9c807a549d1ffec8bed6cf3ad91bf1d 100644 (file)
@@ -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
index a1fbc278b0973aae6b64576b56dd0ffbf192e496..cca0416a57e21b3f44c9c15b9e3b7f512342f389 100644 (file)
@@ -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
index 55784e2d289b8f86ee856f4aaaff2f68171d4df4..b0343cc04e01c022626d0eee21a58480b8f79b46 100644 (file)
@@ -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;
index 9e192c69ec68bf62d1a4ef8f8dc7ad3b11c55593..dfa5c1fbcc37129e12ca12475643ebdbff62140b 100644 (file)
@@ -1,7 +1,7 @@
 # For a detailed description see nfsroot.conf(5)
 
 # "<suite> <mirror>" 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
index 8710678a1991c0e1c8dc575e15754dd6b4307d25..e70fae952205b7e5689cd19881a7e745060faa04 100755 (executable)
@@ -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
index ebf7d8ac9ef28831efb4fbda4bd2793ddd884625..35ac3064f48afe0b4848f917bec04f1353705a8e 100755 (executable)
@@ -11,7 +11,6 @@ ainsl -a  /etc/ucf.conf "^conf_force_conffold=YES"
 
 # 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
 
index e77b9becd77e774c105420ce8b5dc97a70175fb6..dd922ba3528879c489cae3629d968aba1f639410 100755 (executable)
@@ -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
index dadaa48693fef04a7db9d4b6f712e644980fcd1c..00ba4370821a963370640cbf6062f0385fce85de 100755 (executable)
@@ -4,12 +4,7 @@
 
 cat <<EOM > $target/etc/apt/sources.list
 # external mirror
-deb MIRRORURL $ubuntudist main restricted universe multiverse
-deb MIRRORURL $ubuntudist-updates main restricted universe multiverse
-deb MIRRORURL $ubuntudist-security main restricted universe multiverse
+deb $ubuntumirror/ubuntu $ubuntudist main restricted universe multiverse
+deb $ubuntumirror/ubuntu $ubuntudist-updates main restricted universe multiverse
+deb $ubuntumirror/ubuntu $ubuntudist-security main restricted universe multiverse
 EOM
-
-# determine a fast mirror for Ubuntu
-list=$(curl -s http://mirrors.ubuntu.com/mirrors.txt)
-mirror=$(netselect $list | awk '{print $2}')
-sed -i -e "s#MIRRORURL#$mirror#" $target/etc/apt/sources.list
index b26cdd921464445de124ae8b01df50e9396cddf5..25672c8f4f6cd2431f71cbcd6bd4fa2d320d8edb 100644 (file)
@@ -10,4 +10,4 @@ apt-cacher-ng
 nscd psmisc
 bind9 dnsutils
 iptables-persistent
-emacs25-nox
+zile
index 79a6b3cf48a653b4b40695a24b88c491569d380d..47e9e73eeeeaa04977e34e5bcb411b9c81bf3ec2 100644 (file)
@@ -12,7 +12,9 @@ memtest86+
 PACKAGES install GRUB_PC
 grub-pc
 
-PACKAGES install XORG
-ubuntu-desktop
-ubuntu-standard
+PACKAGES install
 ubuntu-minimal
+ubuntu-server
+
+PACKAGES install GERMAN
+language-pack-gnome-de
index 28cade9428660e0535f99fd8cdbd703cceb25681..2e878d3726ad8ad6d6e0783bfc92cdbf896183da 100644 (file)
@@ -3,3 +3,4 @@ xfce4 # base system
 xfce4-goodies # additional tools
 lightdm
 firefox-esr
+network-manager-gnome
index 5859084adb887d2c45bd8d9f18ac799efd7f1eb0..2dd9d0ba84eabdd282007729bb9665078a378ae9 100644 (file)
@@ -5,3 +5,8 @@ xscreensaver
 xscreensaver-gl
 xterm
 desktop-base
+
+PACKAGES install UBUNTU
+ubuntu-server-
+ubuntu-standard
+ubuntu-desktop
index 7a7f6177a30e398311f8b1659f61114487947767..bb77d1a30f5fe0eb2df8dc43d5abbfc8b80dcdb3 100755 (executable)
@@ -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
index c994ce9af7ace079a263bed48d3cae631b536ea9..34c98e81aa5591b790912bf64a26b1dd84d4f625 100755 (executable)
@@ -1,20 +1,62 @@
 #! /bin/bash
 
-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
@@ -30,32 +72,43 @@ 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 [ -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)
+        iface_stanza lo loopback > $target/etc/network/interfaces.d/lo
 
-    cat > $target/etc/network/interfaces <<-EOF
-       # generated by FAI
-       auto lo $NIC1
-       iface lo inet loopback
-       iface $NIC1 inet dhcp
-EOF
-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 [ -n "$NIC1" -a ! -f $target/etc/NetworkManager/NetworkManager.conf ]; then
+            iface_stanza $NIC1 $METHOD > $target/etc/network/interfaces.d/$NIC1
+        fi
+    else
+        (
+            iface_stanza lo loopback
+            iface_stanza $NIC1 $METHOD
+        ) > $target/etc/network/interfaces
     fi
-fi
+
+    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
+    ;;
+esac
 
 # here fcopy is mostly used, when installing a client for running in a
 # different subnet than during the installation
index 812003ba3aeee29788f680bdb2fef45f22474556..578255f8fc8a4d58098f9367891309df2f2e2302 100755 (executable)
@@ -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"
index 3e610ad5af0456afe41231f1407c825a968a449b..f586ba1ebd0a915723fd905db96334d103d9ca04 100755 (executable)
@@ -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"
index c19d4fa0438cf5b8633afabb4961c62486bc5dba..55632754b2eab15de9759def493baa7c2d38ae80 100755 (executable)
@@ -27,6 +27,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
@@ -36,13 +41,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
-    $ROOTCMD grub-install --no-floppy --modules=part_msdos $BOOT_DEVICE
-    if [ $? -eq 0 ]; then
-        echo "Grub installed on hostdisk $BOOT_DEVICE"
-    fi
-
 else
     $ROOTCMD grub-install --no-floppy "$GROOT"
     if [ $? -eq 0 ]; then
index a85fd141805b07ca101b405602593b75719d823d..eebb3792e3922e684b96be6af9d841a162d7bc3d 100755 (executable)
@@ -72,7 +72,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
index f08a23dbab3686f28e736f5a71a169232bda705b..15ac4bb7bfd60a8fc20a635f1cedd9525417f55d 100755 (executable)
@@ -14,12 +14,7 @@ grep -q "external mirror" $target/etc/apt/sources.list && exit 0
 
 cat <<EOM > $target/etc/apt/sources.list
 # external mirror
-deb MIRRORURL $ubuntudist main restricted universe multiverse
-deb MIRRORURL $ubuntudist-updates main restricted universe multiverse
-deb MIRRORURL $ubuntudist-security main restricted universe multiverse
+deb $ubuntumirror/ubuntu $ubuntudist main restricted universe multiverse
+deb $ubuntumirror/ubuntu $ubuntudist-updates main restricted universe multiverse
+deb $ubuntumirror/ubuntu $ubuntudist-security main restricted universe multiverse
 EOM
-
-# determine a fast mirror for Ubuntu
-list=$(curl -s http://mirrors.ubuntu.com/mirrors.txt)
-mirror=$(netselect $list | awk '{print $2}')
-sed -i -e "s#MIRRORURL#$mirror#" $target/etc/apt/sources.list
diff --git a/fai/config/scripts/UBUNTU/91-misc b/fai/config/scripts/UBUNTU/91-misc
new file mode 100755 (executable)
index 0000000..0d1d6d8
--- /dev/null
@@ -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