14

I've recently deleted a partition around 8GB in size. This partition was located after the main partition, but seems to not be critical as I can still boot the OS and run all the applications.

The boot process now takes an extra two-minutes to complete, displaying the following messages:

Gave up waiting for suspend/resume device
/dev/sda4: clean, .../... files .../... blocks
[ ***] A start job is running for dev-disk-by\.....\....\... .device
Dependencies failed!

My question is:

What was this second partition, and how can restore or recreate it?

  • Do you see any errors or warnings when the OS starts? If there are no messages at all then maybe your kernel boots with quiet and splash options. Temporarily edit the GRUB entry and boot without these options. Pay attention especially to messages that stall and the ones directly after. – Kamil Maciorowski Apr 30 '17 at 0:27
  • @KamilMaciorowski Added kernel messages – samdd Apr 30 '17 at 0:36
  • "Gave up waiting for suspend/resume device" – this makes me think there's a problem with swap partition (but it wouldn't explain missing ntfs-3g). Check if your system uses swap, run swapon. Next run swapon -a and observe. It may complain. The partition you deleted might have been your swap partition. – Kamil Maciorowski Apr 30 '17 at 0:47
  • @KamilMaciorowski Thanks, it seems to have been the swap partition, swapon: cannot find the device for UUID=3fd1.., attempting to re-create it now. Additionally I've ran the installer for ntfs-3g, and it detects my NTFS partitions. Thanks for your help – samdd Apr 30 '17 at 0:53
22

I just encountered that same error message on Debian and a similar boot delay, with a slight variation: I knew that I had just voluntarily deleted my swap partition, and didn't plan to recreate it.

The partition was no longer listed in /etc/fstab but the delay persisted. Nothing in /etc/initramfs-tools/conf.d/resume (Thanks @KamilMaciorowski for the hint).

The key was to figure out that the initial RAM disk is "compiled", and in some case (like this), must be regenerated. Solution: sudo update-initramfs -u.

|improve this answer|||||
  • In my case, /etc/initramfs-tools/conf.d/resume contained an old UID reference for the swap. . update-initramfs -u solved the matter. thanks. – G Cab Aug 8 '18 at 12:39
  • In my case, the above answer hinted me that my recently formated+encrypted (with veracrypt) partition probably failed to mount and all I had to do was sudo nano /etc/fstab and then comment-out (prefix with a #) the line referring to the partition I encrypted. – maninak Feb 10 '19 at 19:57
9

Because of the message

Gave up waiting for suspend/resume device

I suspect a problem with your swap partition. Check if your system uses swap by running swapon. Next run swapon -a and observe the output. It may complain with cannot find the device message. If so, you will know you should recreate your swap partiton.

The procedure:

Refer to a previous question: How do I restore a swap partition I deleted?

  1. Modify your partition table with fdisk, gdisk, gparted or another equivalent tool. Recreate the partition entry. The partition type should be 0x82 Linux swap.
  2. Set the partition up with mkswap.
  3. Modify your /etc/fstab accordingly (the previous output from swapon -a should tell you which entry you need to change in case you're not sure).
  4. Important: Replace the UUID in /etc/initramfs-tools/conf.d/resume, with that used in the above step.
  5. Run update-initramfs -u.
|improve this answer|||||
1

In my case, the boot message looked like this. The swap partition was deleted.

Gave up waiting for suspend/resume device
/dev/sda4 ... ...

[***] A start job is running for dev-disk-by\...\...\...\.device
...
...
...

First, look at the content of your fstab file, cat /etc/fstab will return this kind of output

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda4 during installation
UUID=8c1977eb-ac90-426b-bc9b-a7fb2ec8d760 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda3 during installation
UUID=00fd67-123DE-4b98-aa17-2d4025aed54 none            swap    sw              0       0
/dev/sr0        /media/cdrom0   udf,iso9660 user,noauto     0       0

Then you notice , "swap was on /dev/sdax during installation".

Recreate the deleted partition (fdisk or Gparted for instance), then use this command to find the new uuid of the partition.

ls -l /dev/disk/by-uuid/

This outputs:

total 0
lrwxrwxrwx 1 root root 10 févr. 19 07:18 00151dcd-2bf5-4b98-aa17-8f40ef4cfd86 -> ../../sda4
lrwxrwxrwx 1 root root 10 févr. 19 07:18 6C5A1AC45A1A8B4A -> ../../sda2
lrwxrwxrwx 1 root root 10 févr. 19 07:18 8c1977eb-ac90-426b-bc9b-a7fb2ec8d760 -> ../../sda3
lrwxrwxrwx 1 root root 10 févr. 19 07:18 C064106664106188 -> ../../sda1

Update your fstab with the correct uuid that were displayed by the last command by copy/pasting the adequate uuid of the swap in the fstab file. Then reboot, It should correct the problem.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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