I ran into some issues this morning setting up a Xenial box via Vagrant. On boot, /var/lib/dpkg was totally locked with nothing I knew to link it to in ps aux. I’ve created a fairly novel solution; my point today was to learn about something new.
You should have a basic familiarity with the Linux CLI. If you don’t know what systemd is, that’s not a big deal. Skip to my take on a full solution if you’d like, but make sure to read the disclaimer first.