The lazy programmer scripts
scripts that work

Lazy speed up apt install on baremetal GitHub

On Ubuntu (Debian) installed on baremetal servers, the kernel upgrade might take tens of minutes or even hours to install.

The apt install might appear to be stuck, but in fact, it performs fsync() calls after each file.

Warning!: Make sure that when you perform the apt install, the server has a reliable power source, otherwise some files might not be persisted (synced) and you end up with a broken installation/upgrade.

This script has been tested on Ubuntu Server 18.04.

# just add force-unsafe-io to /etc/dpkg/dpkg.cfg
echo "force-unsafe-io" >> "/etc/dpkg/dpkg.cfg"

That's all, folks!

Written by kami on Thursday November 5, 2020
Permalink -

Leave a comment

comments powered by Disqus

« Lazy upgrade GitLab - Deploy Polygon (Matic) private RPC »