PXE issues installing 20.04

Charles M chaslinux at gmail.com
Fri Mar 12 16:37:02 UTC 2021


We've been installing Xubuntu for several versions using a slight
modification of some of the same scripts. 20.04 seems to have
partially broken and I'm trying to narrow down the point of failure.

Here's an example of the lines in our default file under
/var/lib/tftboot/pxelinux.cfg/

LABEL autoinstall-cr-xubuntu-bionic-amd64
        kernel ubuntu/bionic/amd64/linux
        append vga=normal initrd=ubuntu/bionic/amd64/initrd.gz
locale=en_CA debian-installer/keymap=us netcfg/wireless_wep=
netcfg/choose_interface=eth0 netcfg/get_hostname=ubuntu
netcfg/get_domain=ourdomain.org
preseed/url=ftp://pacman/cfg/./ubuntu-xubuntu-bionic.cfg
console-setup/ask_detect=false net.ifnames=0 DEBCONF_DEBUG=3 --

LABEL autoinstall-cr-xubuntu-focal-amd64
        kernel ubuntu/focal/amd64/linux
        append vga=normal initrd=ubuntu/focal/amd64/initrd.gz
locale=en_CA debian-installer/keymap=us netcfg/wireless_wep=
netcfg/choose_interface=eth0 netcfg/get_hostname=ubuntu
netcfg/get_domain=ourdomain.org
preseed/url=ftp://pacman/cfg/./ubuntu-xubuntu-focal.cfg
console-setup/ask_detect=false net.ifnames=0 DEBCONF_DEBUG=3 --

Our bionic script works flawlessly and everything installs nicely.
Focal installs, but fails to install a bunch of software and leaves
some broken panel items as a result. ubuntu-xubuntu-focal.cfg exists:

### Include the config files that do the work:
d-i preseed/include string base-nopasswd.cfg cr-username.cfg
passwd.cfg src-ubuntu.cfg cfg-focal.cfg

tasksel tasksel/first multiselect xubuntu-desktop

# The first command installs OUTSIDE the target
# The second command does IN-TARGET processing
d-i preseed/late_command string \
  cd /target; \
  wget ftp://pacman.ourdomain.org/preseed-customize/install_more_packages.sh; \
    chmod a+x ./install_more_packages.sh; \
    ./install_more_packages.sh --distro=focal xubuntu multimedia dtp \
       games helpme \
       >> /var/log/install_more_packages.log 2>&1; \
    rm -f ./install_more_packages.sh; \
  cd /target; \
  wget ftp://pacman.ourdomain.org/preseed-customize/finishme.sh; \
    chmod a+x ./finishme.sh; \
    chroot ./ ./finishme.sh --multimedia --distro=focal \
    --autologin=lightdm --flavor=xubuntu \
    >> /var/log/finishme.log 2>&1; \
    rm -f ./finishme.sh

Again the version of this script for Bionic works (difference is
basically substituting --distro=focal for --distro=bionic). I feel
like install_more_packages.sh isn't running correctly on focal as this
is where some of the packages that are not getting installed are
referred to. Here's the install_more_packages script:

#!/bin/sh -xv
# (Darn it. This probably has BASHisms.)
# Install some packages OUTSIDE of the chroot, using apt-install.
# Based on scripts from: http://www.tylerlesmann.com/tag/preseed/
# Argument parsing via /usr/share/doc/utils-linux/examples/parse.bash.gz
# ======= FUNCTIONS ========
usage() {
cat << ENDOPTIONS
  usage: $progname --help
         $progname --distro=DISTRO PKG_CLASS [PKG_CLASS ...]
  -h,--help                       : this help
  -d,--distro                     : which distro (default "lucid").

  PKG_CLASS includes:
    multimedia     : playing multimedia formats
    lxde    : the Lubuntu (LXDE) environment
    xubuntu    : the Xubuntu (XFCE) environment
    games    : extra games (less violence, low-resource)
    games-semiviolent
            : extra games (some cartoon violence, low-resource)
    games-violent
            : games with gore and such (low-resource)
    audio    : sound/music creation
    dtp        : desktop publishing
    helpme      : remote help tools

  Games options do not overlap, so specify multiple types

ENDOPTIONS
}

# ======= GLOBALS ==========
SCRIPTURL=ftp://pacman/preseed-customize


progname=`basename $0`

# ======= PACKAGE CONSTANTS ========

# Software for LXDE (does not have OOo by default)
LXDE_PKG="lubuntu-desktop openoffice.org cups-bsd menu
openoffice.org-help-en-gb"

# Software for multimedia (non-distro dependent)
MULTIMEDIA_PKG="vlc flashplugin-nonfree msttcorefonts x-ttcidfont-conf \
gstreamer0.10-plugins-ugly"

# Needs partner repository enabled
MULTIMEDIA_PKG_TRUSTY="vlc adobe-flashplugin gstreamer0.10-plugins-ugly"
MULTIMEDIA_PKG_XENIAL="vlc gstreamer1.0-plugins-ugly tuxpaint"
MULTIMEDIA_PKG_FOCAL="vlc gstreamer1.0-plugins-ugly tuxpaint"


# Why don't these get installed?
EXTRA_PKG_XENIAL="ubuntu-standard w3m aptitude cheese darktable
dreamchess handbrake handbrake-cli winff"
EXTRA_PKG_FOCAL="ubuntu-standard w3m aptitude cheese darktable
dreamchess htop vlc winff"
MULTIMEDIA_PKG_UBUNTU="ubuntu-restricted-extras vlc blender \
tuxpaint"
XUBUNTU_PKG="libreoffice libreoffice-help-en-gb cups-bsd \
libreoffice-gtk inkscape chromium-browser \
ntp ntpdate aptitude"

# More games
GAMES_PKG="freeciv-client-gtk atanks lbreakout2 lincity-ng \
crimson lgeneral heroes glob2 hedgewars pixbros supertux \
frozen-bubble freedroid freedroidrpg tmw wesnoth"
GAMES_NONVIOLENT_NOACCEL="lbreakout2 frozen-bubble \
  supertuxkart xmoto mirrormagic enigma neverball neverputt gtans \
  lincity-ng numptyphysics aisleriot"
GAMES_SEMIVIOLENT_NOACCEL="hedgewars wesnoth tumiki-fighters mu-cade \
  glob2 powermanga kobodeluxe seahorse-adventures supertux"
GAMES_VIOLENT_NOACCEL="xevil"
GAMES_NONVIOLENT_ACCEL="minetest ri-li"
GAMES_VIOLENT_ACCEL="alien-arena"

HELPME_PKG="x11vnc zenity sshpass"

# More art (music included)
# Will this break in Hardy because GIMP and Inkscape get
# installed by default?
AUDIO_PKG="hydrogen hydrogen-drumkits audacity"
DTP_PKG="gimp inkscape scribus"


# Which software do I install? This should be space-separated.
extra_pkg=""

set_multimedia="false"

# ======= PARSE ARGS =========

# Long arguments only!
optionlist=`getopt -o hd: \
  --long help,distro: \
     -n $progname \
  -- "$@"`

# We need a distro and at least 1 package
if [ ${#@} -lt  2 ]
then
  usage
  exit 1
fi

# Reset args (does this kill my tree directory?)
# They say the quotation marks are very important
eval set -- "$optionlist"


while [ $1 != "--" ]; do
  case "$1" in
      -h|--help) usage; exit 0;;
      -d|--distro) distro=$2 ; shift 2 ;;
  esac
done

# Get rid of "--"
shift

# Now read packages to install

while [ $# -gt 0 ]
do
  case "$1" in
    multimedia) set_multimedia="true"; shift ;;
    lxde) extra_pkg="$extra_pkg $LXDE_PKG"; shift ;;
    games) extra_pkg="$extra_pkg $GAMES_NONVIOLENT_NOACCEL"; shift ;;
    games-semiviolent) extra_pkg="$extra_pkg
$GAMES_SEMIVIOLENT_NOACCEL"; shift ;;
    games-violent) extra_pkg="$extra_pkg $GAMES_VIOLENT_NOACCEL"; shift ;;
    audio) extra_pkg="$extra_pkg $AUDIO_PKG"; shift ;;
    dtp) extra_pkg="$extra_pkg $DTP_PKG"; shift ;;
    helpme) extra_pkg="$extra_pkg $HELPME_PKG"; shift ;;
    xubuntu) extra_pkg="$extra_pkg $XUBUNTU_PKG"; shift ;;
  esac
done
# ------ MAIN PROGRAM ---------
# I get lots of stuff here
cd /tmp
#---- Mark DVD CSS for inclusion
if [ $set_multimedia == "true" ]
then
  echo "Marking DVD playback for installation"
  if ([ $distro == "lenny" ] || [ $distro == "hardy" ])
  then
    extra_pkg="$extra_pkg libdvdread3"
  elif ([ $distro == "trusty" ] || [ $distro == "precise" ])
  then
    extra_pkg="$extra_pkg libdvdread4"
  elif ([ $distro == "xenial" ])
  then
    extra_pkg="$extra_pkg libdvdread4 libdvdcss2"
  elif ([ $distro == "focal" ])
  then
    extra_pkg="$extra_pkg libdvdread7 libdvdcss2"
  fi
  echo "Selecting multimedia components"

  if ([ $distro == "hardy" ] || [ $distro == "lucid" ])
  then
    extra_pkg="$extra_pkg $MULTIMEDIA_PKG_UBUNTU"
  elif ([ $distro == "trusty" ])
  then
    extra_pkg="$extra_pkg $MULTIMEDIA_PKG_TRUSTY"
  elif ([ $distro == "xenial" ])
  then
    extra_pkg="$extra_pkg $MULTIMEDIA_PKG_XENIAL"
  elif ([ $distro == "focal" ])
  then
    extra_pkg="$extra_pkg $MULTIMEDIA_PKG_FOCAL"
  else
    extra_pkg="$extra_pkg $MULTIMEDIA_PKG"
  fi
fi # configure $multimedia

# Install distro-specific packages
if ([ $distro == "xenial" ])
then
    extra_pkg="$extra_pkg $EXTRA_PKG_XENIAL"
elif ([ $distro == "focal" ])
then
    extra_pkg="$extra_pkg $EXTRA_PKG_FOCAL"
fi

echo ""
echo "INSTALLING MORE PACKAGES: $extra_pkg"
echo ""

#---- Actually install some packages
if [ -n "$extra_pkg" ]
then
  echo "Running apt-install $extra_pkg"
  apt-install $extra_pkg
  snap install $extra_pkg
fi
echo ""
#----
echo "PACKAGES INSTALLED??"

VLC for example is one of the packages that don't get installed.
Because we're still supporting people with some older versions of
Xubuntu we sort of want to keep using the existing infrastructure, but
has Subiquity replaced the debian-installer? There must be a simpler
way?

Thanks,

Charles




More information about the ubuntu-users mailing list