#! /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
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=
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
- # 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
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
# 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
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