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...

https://forums.opensuse.org/showthread.php/503587-Slow-boot-What-is-quot-A-start-job-is-running-for-dev-disk-by-quot

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?

Screenshot

share|improve this question
    
You may want to clone your SSD and then you can knock yourself out :) (Try CloneZilla for this) – Grammargeek Dec 18 '15 at 20:51
    
Hah yeah, I guess I can do that. I'll wait till I'm back home from the holidays so I can move it to something where I have more space – cpd1 Dec 18 '15 at 21:04
    
I ended up fixing this. I don't think there was ever a swap if I go by Gparted. I ended up creating one and changing the entry in fstab. That worked and no more 90 second boot – cpd1 Dec 30 '15 at 17:38
    
if you solved your own problem, make your own answer and click the check to mark it as solved :) – Grammargeek Dec 30 '15 at 23:07
    
Makes sense...I've added it – cpd1 Dec 31 '15 at 1:56
up vote 58 down vote accepted

If you get "a start job started by dev-disk-by.." followed by a 90 second delay during each boot, complete the following steps:

  1. Install gparted using the Software Center
  2. Open gparted and see what partitions Ubuntu is currently using
  3. Edit the fstab file using the line below.

    sudo -H gedit /etc/fstab
    
  4. Find the device that you are not currently using

  5. Insert a # and a space at the beginning of that line comment it out.

  6. Reset, hope it works for you!

share|improve this answer
2  
Step by step instructions help everyone! thanks! – John Hall Jun 23 '16 at 1:29
    
I tagged yours as the answer since you gave the steps – cpd1 Aug 22 '16 at 11:47
    
To see what's happening during boot press F12 when ubuntu spash/loading screen is displayed. In my case there was swap partition currently removed, so I removed it from fstab too and now system boots in like 2 seconds! – PeterM Oct 11 '16 at 6:15
5  
+1... for those who can't find it in /etc/fstab, you can also check it out in /etc/crypttab - that was my case. – meta Jan 12 '17 at 12:44
1  
If it is a block id that changed, instead of commenting it out I prefer to fix the device id- Use lsblk -f to see what device is associate to what id and replace the id. – user1708042 Aug 29 '17 at 19:49

Looks like the issue was due to the fact that even though fstab had an entry for a swap, there actually wasn't one. I used GParted to resize the partition and created a new Swap. I then copied the UUID into the fstab file...

  1. I now have swap
  2. And boot is down to within seconds vs 90+ seconds
share|improve this answer
3  
I resized my main partition (deleting/recreating swap) and ran into this issue. I used 'sudo blkid' to list devices by UUID and than used the new UUID in /etc/fstab. – Brad Goss Feb 23 '16 at 23:10
    
@BradGoss thanks that fixes it! – JREAM Jun 11 '16 at 16:23

I hade 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 ment to be setup.

share|improve this answer
    
This is the correct answer! Thanks buddy. – CppChase Nov 21 '17 at 9:21

In my case, I had previously been using encrypted swap, and the startup job mentioned /dev/mapper/cryptswap1. To solve the problem I also had to remove the file /etc/crypttab, in addition to the steps described in the answer by William MacDonald.

share|improve this answer

My boot was slowed down because I swapped my drive and the UUID did not match. This caused Ubuntu to do a scan during boot.

I frequently swap drives around. If your mounts are always in the same place (like mine), you can just remove the UUID and place the direct path to prevent that scan error from happening...

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/sda1 /               ext4    errors=remount-ro 0       1
/dev/sda2 none            swap    sw              0       0
share|improve this answer
    
How would this suggestion speed up booting? Any reference? – Mostafa Ahangarha Jan 25 '17 at 18:53
    
I was answering his error question that caused the slow boot. I made my answer clearer. – Dan Jan 25 '17 at 19:31

You can skip the wait and go to your log-in screen directly by using 'Ctrl+c' and then work on the solution. Sometimes this will go on forever if not.

share|improve this answer
    
Is that literally Ctrl, the plus key and c? – muru Feb 27 '17 at 11:56
    
Yes, that's it :) – Ramon Suarez Feb 27 '17 at 12:01

I had the same problem when booting.

In my /etc/fstab file, my partitions where defined as /dev/sda1, /dev/sda2, etc., but when booting, several times appeared the message "A start job is running for dev-sdx" ("x" defines which unit or partition was affected).

To solve it, I changed the value of /dev/sdx by the UUID of the partition. To see the UUID, from terminal run lsblk -f. Then, copy the UUID of the affected partition and write it on /etc/fstab file, replacing /dev/sdax as follows: /dev/sda1 changes to UUID=xxxxxxxxxxxxxxxxxx.

It worked for me, I hope this info is useful.

share|improve this answer

When resizing or deleting partitions with gparted you often have to create a new swap partition.

It is then necessary to activate the swap via gparted after its creation (there is the command "Activate swap").

Furthermore you have to copy the new UUID into /etc/fstab to mount it otherwise at boot the OS will attempt to find it but in vain because the fstab file contains the UUID referring to the old swap. Gparted delivers the information for the UUID but you can easily run in terminal:

sudo blkid

to find it.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.