Software & AppsOperating SystemLinux

How To Fix Slow Boot Due to “A Start Job is Running for Dev-Disk-By” Error in Ubuntu

Ubuntu 15

If you’re an Ubuntu user and your system is taking a lot of time to boot, displaying a message like “A start job is running for dev-disk-by…”, then this article is for you. We will guide you through a step-by-step process to troubleshoot and resolve this issue.

Understanding the Issue

The message “A start job is running for dev-disk-by…” indicates that the system is trying to mount a disk or partition specified in the /etc/fstab file, but it is unable to do so. This could be due to a variety of reasons such as a missing disk, a changed UUID, or incorrect entries in the /etc/fstab file.

Prerequisites

Before we start, you need to have GParted installed on your system. If not, you can install it using the Software Center or by running the following command in the terminal:

sudo apt-get install gparted

Step 1: Checking the Partitions

Open GParted and check the partitions that Ubuntu is currently using. Make a note of the UUIDs of these partitions as they will be needed later.

Step 2: Editing the /etc/fstab File

The /etc/fstab file is a system configuration file that contains all the disks and partitions that need to be mounted at boot time. You can edit this file using the following command:

sudo -H gedit /etc/fstab

Here, sudo is used to run the command with root privileges, -H sets the HOME environment variable to the home directory of the target user (root, in this case), and gedit is a text editor.

Step 3: Commenting Out Unused Devices

If there is a device that you are not currently using, comment it out by adding a # and a space at the beginning of the line. This will prevent the system from trying to mount it at boot time.

Step 4: Setting Timeout for External Devices

If you have an external device configured to automount, add x-systemd.device-timeout=1ms to the options for that device in the /etc/fstab file. For example:

/dev/sdg1 /media/backup jfs nofail,x-systemd.device-timeout=1ms 0 0

Here, /dev/sdg1 is the device, /media/backup is the mount point, jfs is the file system type, nofail allows the system to boot even if this mount point is not present, and x-systemd.device-timeout=1ms sets the timeout for the device to 1 millisecond.

Step 5: Saving the Changes

After making the changes, save the /etc/fstab file. It is also a good idea to make a backup of this file before editing it. You can test the file by running mount -a to check for any syntax errors.

Step 6: Rebooting the System

Reboot your system and the start job should no longer appear. If it does, you may need to update the UUIDs in the /etc/fstab file. You can use the sudo blkid command to find the new UUIDs and replace them in the file.

Conclusion

In this article, we explained how to fix the slow boot issue due to “A start job is running for dev-disk-by…” error in Ubuntu. We hope this guide was helpful and you were able to speed up your system’s boot time. Remember to always make backups before making any changes to important system files. If you have any questions, feel free to ask in the comments section.

How do I install GParted on Ubuntu?

To install GParted on Ubuntu, you can use the Software Center or run the command sudo apt-get install gparted in the terminal.

How do I open GParted?

Once GParted is installed, you can open it by searching for "GParted" in the applications menu or by running the command gparted in the terminal.

How do I edit the /etc/fstab file?

You can edit the /etc/fstab file by running the command sudo -H gedit /etc/fstab in the terminal. This will open the file in the gedit text editor with root privileges.

How do I comment out a device in the /etc/fstab file?

To comment out a device in the /etc/fstab file, add a # and a space at the beginning of the line that corresponds to that device. This will disable the system from trying to mount it at boot time.

How do I set a timeout for an external device in the /etc/fstab file?

To set a timeout for an external device in the /etc/fstab file, add x-systemd.device-timeout=1ms to the options for that device. Make sure to specify the correct device, mount point, file system type, and any other necessary options.

How do I check for syntax errors in the /etc/fstab file?

After making changes to the /etc/fstab file, you can check for syntax errors by running the command mount -a in the terminal. This will attempt to mount all the devices and partitions listed in the file and report any errors.

How do I update the UUIDs in the /etc/fstab file?

To update the UUIDs in the /etc/fstab file, you can use the sudo blkid command to find the new UUIDs of the devices or partitions. Then, replace the old UUIDs in the file with the new ones. Make sure to save the changes before rebooting the system.

Leave a Comment

Your email address will not be published. Required fields are marked *