I have set up a custom installation CD based on Debian/Ubuntu. It completely automates the installation apart from asking for the hostname and the system account's password. All was working as expected until just recently when a dialog asking to confirm a restart of services popped up, just like that shown in this question. However I'm using preseed files.

I know one could specifically give an answer to that specific package, but it's a fairly generic question that could apply to many other packages and I don't want to have to keep changing the preseed file each time.

Setting DEBIAN_FRONTEND=noninteractive on the kernel boot line stopped it alright but also stopped it prompting the user for the hostname and password (which is what I would expect to happen to be honest).

Is there a way of doing the equivalent of DEBIAN_FRONTEND=noninteractive and apt-get install -y in a preseed file at a specific point during the installation process so that such dialogs are suppressed from then on in (like after asking the questions and before the main block of packages get installed)?

  • Try adding debconf debconf/frontend select Noninteractive to your preseed file.
    – Christo
    Feb 14 '20 at 8:16
  • @Christo Thank you for your comment but unfortunately that made no difference. In the end I relented to adding: d-i libraries/restart-without-asking boolean true and d-i libssl1.1/restart-services ssh, which suppressed the dialog. However the second statement is too specific and so this isn't really an answer, just a work around. Is there a generic way of saying restart any service that needs it? Feb 14 '20 at 14:01
  • @Tony Cooper right now I need to add d-i libpam0g/restart-services string cron as second option instead of your parameter. Definitely feels brittle.
    – MKesper
    Feb 2 at 8:22

To sum up on Tony Cooper's comments and the overall change that worked for me:

d-i libraries/restart-without-asking boolean true
d-i libpam0g/restart-services string cron

are the lines are added and both were needed in order to skip the libpam0g prompt. Too bad there isn't any more general solution as debconf debconf/frontend select Noninteractive by itself didn't help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.