Hi. I've been getting the following message during startup
A start job is running for dev-disk-by\x2dlabel-swapspace.device
It just sort of hangs there for quite a while, then eventually finishes booting up. Then, once I'm booted up, the swap is off and I have to turn it on manually via swapon.
It's sort of a pain in the butt. Anyone know what's up?
I guess this isn't a very common problem. I can't seem to find anything about this on google.
I don't think this is a good fix, but I just changed the fstab entry
LABEL=swapspace swap swap defaults 0 0 #or whatever label your swap has
/dev/sda5 swap swap defaults 0 0 #or whatever partition your swap is on
and it seems to boot up fine now.
Last edited by Pacopag (2013-04-22 18:55:03)
Thank you, this helped me. I was having a similar issue, using a UUID for my swapfile. Changing it from:
UUID=7db28ed4-aa17-4ec0-9619-853e11510ecf none swap defaults 0 0
/swapfile none swap defaults 0 0
I have this problem also with non-swap partitions. It doesn't seem to prolong startup, but if I reboot soon after boot I get "A start job is running" messages blocking the reboot. Looking at my fstab, for example this line causes the problem:
UUID=<UUID> /media/usb ext4 rw,relatime,data=ordered,user,nofail 0 2
Adding a "noauto" "fixes" it.
Does anyone know what that "A start job" is?
Is the problem resolved if you change the UUID to the corresponding device (e.g. /dev/sdb1)? In your case I'm not sure if it would work because, at least on my system, usb devices can get assigned to sdb1 on one mount then the same device might be sdc1 on the next, etc.
Last edited by Pacopag (2013-05-14 17:47:24)
The unreliable assignments (sdb becomes sdc and vice versa) have been the reason I switched to UUIDs. I also tried LABELs but that didn't resolve the problem. I tried to disable various start jobs (laptop-mode, preload and others) but failed to find the perpetrator.
I'm curious why you have an fstab entry for usb device (maybe the device is for something other than mass storage?) Have you tried udiskie or gvfs to automount?
I didn't use auto-mounting initially, therefore I put some disks in my fstab. If I remember correctly, I didn't remove the entries when I noticed the drives would be auto-mounted where they were manually mounted before. I liked that. I guess those auto-mounters can be configured to use /media/<label> but I haven't bothered (yet).
At least we know that the problem can occur with swap and data partitions regardless whether they are mounted by label or by UUID.
Last edited by Markus00000 (2013-05-14 18:14:02)
I think udiskie does mount to /media/<label>.
I like gvfs because it will detect the volume and list it in some file managers, but it won't mount the volume until it you click it.
What file manager do you use?
Last edited by Pacopag (2013-05-14 18:30:31)
I think we should keep this thread on-topic to make it easier to read for others with the same problem. Sorry, if your questions are relevant to the start job problem and I just fail to see it. If so, keep asking.
(Occasionally I use Thunar or ranger. If you have further questions, feel free to use the "Email" link to ask. I'm looking into udiskie right now, thanks a lot for the hint!)
Indeed. You're right.
I hope udiskie does the trick for you.
I fixed this problem by changing the UUID that was generated in my /etc/fstab by the correct one.
I know my hard disk is /dev/sda. So I ask parted to show me the swap partition:
# sudo parted /dev/sda print free | grep swap
2 xxx xxx xxx xxx linux-swap(v1)
This means my swap partition is /dev/sda2. I check its UUID:
# ls -l /dev/disk/by-uuid | grep sda2
..... xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -> ../../sda2
So that is my correct swap partition UUID. I changed that in /etc/fstab. It seems to be generated wrongly during the Arch Linux installation (generated using "genfstab -U -p /mnt >> /mnt/etc/fstab"). Maybe someone could file a bug report after digging a bit more. Now it works, and no more boot delay, and "swapon -s" reports the swap space.
Last edited by koutheir (2014-01-26 20:42:20)
Are you using a swapfile or a swap partition? systemd should be able to find and activate swap partitions on its own.
I went across that same problem after editing my fstab file.
Here what has solved the issue for me : taking out a line describing how to mount an external drive that was unconnected at boot time.
The thing is, now I have to find a way to still mount it the way I want next time I plug it in.
I think the only problem is the change of UUID of your disks/swapfile.
My situation is: I use "genfstab -U -p /mnt >> /mnt/etc/fstab" to generate a raw fstab file. My /dev/sda2 was used as swap at that time. Then after installing the OS, I delete and reformat my /dev/sda2, and put my /home directory on it.(Don't ask me why, just for fun. Knowledge comes from ZheTeng. =.= )I add new info about my /home to the fstab file. Then the problem occurs.
The key point is that after reformatting my /dev/sda2 disk, its UUID changed. However, the fstab file still use its former UUID, which caused the problem.
Way to do: use `lsblk -f` to view the new UUID and modify them to be correct ones in the fstab file.