Impossible to make a minized install with a full automatic install and the YAML user-data file

Bug #1974201 reported by Francois Lafont
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
subiquity
Fix Committed
Undecided
Unassigned

Bug Description

Hi,

In fact, I have 2 points.

1. I have made a full automatic install of Ubuntu 22.04 via the ISO ubuntu-22.04-live-server-amd64.iso (sha256 == 84aeaf7823c8c61baa0ae862d0a06b03409394800000b3235854a6b38eb4856f). I'm talking about the install via the YAML "user-data" file set in the boot command (with the arguments "autoinstall ds=nocloud-net;seedfrom=http://..." etc). If I'm not mistaken, by this way, it's just impossible to make a "minimized" install (no key available in user-data file to do this). Of course, it's possible via an _interactive_ install where I can choose the option "Ubuntu Server (minimized)".

Could you add a key in user-data file to be able to make a "minimized" install?

2. In my humble opinion, the "minimized" install of Ubuntu should be more minimal. For instance snapd is installed (personally not used at all in my VM servers), git (same remark) etc. Below, I show you my "purge-useless-packages" post-install script I use to create my VM templates. For an administrator, it's not a problem to install packages if required, _after_ the installation (for instance via Ansible etc).

Could you make the "minimized" install more minimal, or, better, add a kind of "minimal" install option ("minimal" < "minimized"), callable in the "user-data file" (cf previous point)?

Thx for your help.

PS: just for the example, here is my "purge-useless-packages" post-install script I use to create my VM templates (in vmware):

----------------------------------
#!/bin/sh

export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
export LC_ALL='C'
set -ue

useless_packages='
alsa-topology-conf
alsa-ucm-conf
apparmor
apport
apport-symptoms
at
bc
bcache-tools
bolt
btrfs-progs
byobu
cloud-initramfs-copymods
cloud-initramfs-dyn-netconf
cryptsetup
cryptsetup-bin
cryptsetup-initramfs
cryptsetup-run
curl
dbus-user-session
dconf-gsettings-backend
dconf-service
dirmngr
eatmydata
ethtool
finalrd
fonts-ubuntu-console
fwupd
fwupd-signed
gawk
gdisk
gir1.2-packagekitglib-1.0
git
git-man
gnupg
gnupg-l10n
gnupg-utils
gpg
gpg-agent
gpgconf
gpgsm
gpg-wks-client
gpg-wks-server
gsettings-desktop-schemas
htop
kpartx
landscape-common
lxd-agent-loader
mdadm
motd-news-config
multipath-tools
open-iscsi
overlayroot
packagekit
packagekit-tools
pastebinit
patch
pinentry-curses
policykit-1
pollinate
python3-apport
python3-automat
python3-click
python3-colorama
python3-constantly
python3-debconf
python3-debian
python3-entrypoints
python3-hamcrest
python3-httplib2
python3-hyperlink
python3-incremental
python3-keyring
python3-launchpadlib
python3-lazr.restfulclient
python3-lazr.uri
python3-newt
python3-openssl
python3-pexpect
python3-problem-report
python3-ptyprocess
python3-pyasn1
python3-pyasn1-modules
python3-requests-unixsocket
python3-secretstorage
python3-service-identity
python3-simplejson
python3-software-properties
python3-systemd
python3-twisted
python3-wadllib
python3-zope.interface
run-one
sbsigntool
screen
secureboot-db
sg3-utils
sg3-utils-udev
snapd
software-properties-common
sosreport
sound-theme-freedesktop
squashfs-tools
thermald
thin-provisioning-tools
tmux
tpm-udev
udisks2
unattended-upgrades
update-notifier-common
upower
usbmuxd
vim
vim-runtime
xfsprogs
zerofree
'

export DEBIAN_FRONTEND="noninteractive"

apt-get update

# Number of Physical Volumes LVM.
n_pv=$(pvs | wc -l)

if [ "$n_pv" = 0 ]
then
    apt-get -y -q purge $(echo $useless_packages) "lvm2"
else
    apt-get -y -q purge $(echo $useless_packages)
fi

# After that, lot of lib* packages can be removed.
apt-get -y --purge autoremove

exit 0
----------------------------------

After the execution of this script I have 298 packages installed:

~# dpkg -l | grep -c ^ii
298

Tags: fr-2399
Dan Bungert (dbungert)
tags: added: fr-2399
Revision history for this message
Olivier Gayot (ogayot) wrote :
Changed in subiquity:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.