7

I frequently install Ubuntu on VMs running under Proxmox or VMware. Every time the installer gets to curtin command in-target and stays there for at least half an hour, sometimes much longer. The Ubuntu installer at this point gives an option to "Cancel update and reboot", but if that is chosen it then sits unchanging for about the same time that just leaving it to complete does.

I'm in a major network data center with ten gigabit connectivity, so the problem isn't slow local networking. I can shortcut the issue by resetting the VM, and if I do so then once it boots I can then install all the updates in a fraction of the time using apt update and apt upgrade, however I'm wary of using tricks like that on what will be production systems.

I've tried Googling and searching here for anything explaining why this stage of the Ubuntu installer takes so long, but I haven't found anything specific, although I have found a recommendation to not have any NICs on the system while installing and only add them post-install as a way to speed things up.

What is this curtin command in-target stage of the Ubuntu installer, why does it take so long, and are there any drawbacks to just pressing the reset button and then using apt update and apt upgrade post-boot instead?

karel
  • 122,292
  • 133
  • 301
  • 332

2 Answers2

9

The "curtin command in-target" stage of the Ubuntu installer is responsible for configuring the system after the base packages have been installed. This includes setting up the network, configuring user accounts, and installing any additional packages that have been selected by the user in the Ubuntu installer options.

Your computer has 10 gigabyte network connectivity which rules out a long delay due downloading and installing additional packages. The long delay after the Ubuntu installer gets to curtin command in-target may be caused by two other factors:

  • The Ubuntu installer configuring the entire operating system, not just a few individual settings.
  • The Ubuntu installer is running on an Ubuntu live USB which is not as fast as a fully installed OS.

In addition to the aforementioned try using VirtIO network adapters instead of E1000 if you are using Proxmox, and try using the VMware Paravirtual SCSI Controller instead of the LSI Logic SCSI Controller if you are using VMware.

If none of the above suggestions work it is best to let the curtin command in-target stage complete normally unless you are having serious problems.

karel
  • 122,292
  • 133
  • 301
  • 332
1

As far as I can tell, this slow behaviour during "curtin comman in-target" also happens on bare metal and on a non-network install. I'm installing Ubuntu Server 24.04 from an 128 GB USB 3.1 pen drive on a 2013 Mac Pro. If I switch to the detailed log view during installation, all the "unpacking ... over ..." log messages seem to appear exceptionally slowly. It seems that in this stage of the installation updates are installed, which for some reason unknown to me takes a long time. Everything before this point went smoothly, it just took the whole installation process about 5-10 minutes to get to this stage.

Mirko Klemm
  • 111
  • 2