How to NOT install snapd / lxd with autoinstaller

Bug #1968199 reported by sascha arthur
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
subiquity
New
Undecided
Unassigned

Bug Description

Hello,

Noticed that using autoinstaller force installs lxd/snapd during the installation (at least in jammy it happens, maybe others affected as well).

Tried to remove it in a last step, but this seems to fail. Apt is not running properly because its chrooted.

How to prevent that lxd/snapd is installed into the target server?

I dont want to have the lxd / snapd interfaces and related stuff on my servers..

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

A minimal install does not have either of those (this is an option available in 21.10 and will be in jammy). Otherwise there's no very easy way to do this, perhaps "curtin in-target -t /target apt purge snapd" in a late-command will do it.

Revision history for this message
sascha arthur (sarthur) wrote :

curtin in-target -t /target /usr/bin/apt-get -y -q remove --purge snapd.

Fails with error code != 0:

Errors:
Stopping snap.lxd.activate.service
Stopping unit snap.lxd.activate.service
Running in chroot, ignoring command 'stop'
Waiting until unit snap.lxd.activate.service is stopped [attempt 1]
Running in chroot, ignoring command 'is-active'
Waiting until unit snap.lxd.activate.service is stopped [attempt 2]
Running in chroot, ignoring command 'is-active'
Waiting until unit snap.lxd.activate.service is stopped [attempt 3]
Running in chroot, ignoring command 'is-active'
Waiting until unit snap.lxd.activate.service is stopped [attempt 4]
Running in chroot, ignoring command 'is-active'
Waiting until unit snap.lxd.activate.service is stopped [attempt 5]

Even though it seems to be removed so its at least a workarround.

But i dont like things to return != 0

Any idea how to fix this? Maybe further curtin mapping? any params for apt?

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.