1

Hello i am working on some automation, and ran into an issue where ubuntu auto install still asks for a verification in middle of installation.

Even if a fully noninteractive autoinstall config is found, the server installer will ask for confirmation before writing to the disks unless autoinstall is present on the kernel command line. This is to make it harder to accidentally create a USB stick that will reformat a machine it is plugged into at boot. Many autoinstalls will be done via netboot, where the kernel command line is controlled by the netboot config – just remember to put autoinstall in there!

i came across this article, and in my config file i do have "autoinstall" like this:

#cloud-config
  autoinstall:
   version: 1

How do i put it on kernel command line ? or how do i write a netboot config ? i am a bit new to server administration and not familiar with most of the terms.

2 Answers 2

2

Note that this is a safeguard intended to help avoiding accidental wiping of systems, that are in use. I would argue though, that if you use the official Ubuntu installation media as is, and you provide the cloud-init autoinstall config via another iso, then this safeguard is overkill. Especially if no physical installation media is used, and the mounting of isos are not manual operations.

So if you are unable to append autoinstall to the kernel cmdline at boot, you can still overwrite the cmdline before it is checked by the autoinstall module like so:

#cloud-config
bootcmd:
  - cat /proc/cmdline > /tmp/cmdline
  - sed -i'' 's/$/ autoinstall/g' /tmp/cmdline
  - mount -n --bind -o ro /tmp/cmdline /proc/cmdline
autoinstall:
  version: 1

This utilizes the cloud-init bootcmd module to overwrite /proc/cmdline by mounting a modified file on top of it. The file contains the original cmdline content + autoinstall.

And as stated in the autoinstall documentation this will remove the "Continue with autoinstall? (yes|no)" prompt

To bypass this prompt, arrange for the argument autoinstall to be present on the kernel command line.

0

After some additional research, this double check is performed in order to prevent accidental installs when using physical media to install OS. To start fully automatic install one should use net-install over FTP or HTTP.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .