Slow boot - "a start job is running for dev-disk-by..."
I don't recall when the issue started to occur but it's likely when I moved my VMWare Ubuntu image to an external SSD so that I can use the OS on any of my PCs. There aren't many links on Google about the issue but the ones that appear talk about fstab
. For example, Slow boot - What is "A start job is running for dev-disk-by..." ? - OpenSUSE Forum.
Mentions having to delete the swap partition and creating it again.
I can try to do this with Gparted but my main concern is losing my current set up in Ubuntu as I'm not entirely sure what will happen if I mess with swap as suggested in the thread. Anyone able to help?
If you get
A start job is running for dev-disk-by...
followed by a 90 second delay during each boot, complete the following steps:
-
Install GParted using the Software Center
-
Open GParted and see what partitions Ubuntu is currently using
-
Edit the fstab file using the line below.
sudo -H gedit /etc/fstab
-
If you have a device that you are not currently using, insert a
#
and a space at the beginning of that line comment it out. -
If you have an external device configured to automount (usually with a
nofail
option in it), add this to the option to the device:x-systemd.device-timeout=1ms
. This sets the wait time of the device to be mounted on boot time to 1ms of the default 90 seconds. Example:
/dev/sdg1 /media/backup jfs nofail,x-systemd.device-timeout=1ms 0 0
-
Save the fstab file (it would be nice to save a backup beforehand). Test your fstab file by running
mount -a
. If any syntax error occurs, it would be shown by this command. -
Reboot and the start job shouldn't appear again.
I had the same issue after resizing my primary partition on my VM since gparted live forced me to delete & reinitialize my swap to do so. That caused a new UUID to be set that didn't match the fstab file.
To avoid the issue, in /etc/fstab
you can either
Replace the swap UUID with the new one (run
sudo blkid
to find it) after the primary partition resizing.Or, comment out the swap partition before (or after) the primary partition resizing.
I would recommend the former since it is the way the OS is meant to be setup.