Linux – VirtualBox Very Slow Boot Time

bootlinuxlubuntuvirtualbox

I have a VirtualBox machine running Lubuntu 15.04 with an excessively slow boot time (1:30+). It does not have the VirtualBox guest additions installed.

The problem started when I had completely run out of virtual space on the VM. I used VBoxManage <VDI file> --resize <10 GB> to resize the disk, and then used a gparted live cd to reconfigure the partitions. I set it up such that there were only two partitions(/dev/sda1 and /dev/sda2 respectively), with the first being an ext4 filesystem, and the second being a 1GiB linux-swap partition.

After that, the VM would boot correctly, but very slow.

This image shows a message with some timer.

The problem is that it is waiting for the timer to hit 1:30 to continue booting.

What does the message mean and how do I fix it?


For future readers:
I solved this problem by running the below procedures:

  1. sudo mkswap /dev/sda2 (this outputs a new UUID)

  2. sudo swapon /dev/sda2

  3. sudo leafpad /etc/fstab

    • Replace the swap UUID with the new one
  4. sudo update-grub (ensure no old UUIDs are laying around)

Best Answer

After some googling I have found this forum thread about similar problem. The solution proposed is to format swap partition:

sudo swapoff /dev/sdXY
sudo mkswap /dev/sdXY
sudo swapon /dev/sdXY

(substitute sdXY with your swap partition name, eg. sda2)