You are not logged in.

#1 2012-09-08 07:16:28

flix
Member
Registered: 2012-09-08
Posts: 6

Creation of swap space broken with systemd

Hi,

after switching to systemd the automatic creation of my swap space is not working anymore. Configuration is as follows:

cat /etc/fstab
cat /etc/fstab
#
# /etc/fstab: static file system information
#
# <file system>                    <dir>        <type>    <options>            <dump>    <pass>
devpts                        /dev/pts    devpts    defaults            0    0
shm                                   /dev/shm    tmpfs    nodev,nosuid            0    0
tmpfs                        /tmp        tmpfs    nodev,nosuid            0    0
/dev/mapper/root                /        ext4    defaults            0    1
UUID=9699832d-5522-4fd1-8a8d-4baf9ac8ca5f    /boot        ext4    defaults            0    1
#/dev/mapper/swap                none        swap    defaults            0    0
UUID=7fef77b7-2c8f-4dca-8246-cd873c47536    none        swap    defaults            0    0

journalctl gives me:

Sep 08 09:11:17 x200 systemd[1]: Job dev-disk-by\x2duuid-7fef77b7\x2d2c8f\x2d4dca\x2d8246\x2dcd873c47536.device/start timed out.
Sep 08 09:11:17 x200 systemd[1]: Job dev-disk-by\x2duuid-7fef77b7\x2d2c8f\x2d4dca\x2d8246\x2dcd873c47536.swap/start failed with result 'dependency'.
Sep 08 09:11:17 x200 systemd[1]: Job dev-disk-by\x2duuid-7fef77b7\x2d2c8f\x2d4dca\x2d8246\x2dcd873c47536.device/start failed with result 'timeout'.

Any hints?

Last edited by flix (2012-09-08 07:16:57)

Offline

#2 2012-09-08 07:50:01

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: Creation of swap space broken with systemd

Check if the UUID from the fstab is right:

$ lsblk -f

If it's not, maybe see: https://wiki.archlinux.org/index.php/Fstab#Swap_UUID

Last edited by DSpider (2012-09-08 07:50:16)


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#3 2012-09-20 08:27:45

flix
Member
Registered: 2012-09-08
Posts: 6

Re: Creation of swap space broken with systemd

If I reassign a new UUID with mkswap and enable it its running fine. Unfortunately the UUID gets lost after reboot and so the problem above still occurs.

Last edited by flix (2012-09-20 08:28:03)

Offline

#4 2012-09-20 08:43:49

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: Creation of swap space broken with systemd

The UUID doesn't "get" lost. Especially not after a reboot.

Use gparted to delete the swap partition and create a new one in its place then.

# pacman -S gparted
# gparted

"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#5 2012-09-20 14:28:30

flix
Member
Registered: 2012-09-08
Posts: 6

Re: Creation of swap space broken with systemd

Its still not running. Here are some more details:

/etc/fstab

/dev/mapper/swap                none        swap    defaults            0    0

/etc/crypttab

swap        /dev/disk/by-uuid/833b82f9-d066-4b65-bb87-8dce9e3e54b1    /dev/urandom    swap

mkswap -U 833b82f9-d066-4b65-bb87-8dce9e3e54b1 /dev/sda2

Setting up swapspace version 1, size = 2000088 KiB
no label, UUID=833b82f9-d066-4b65-bb87-8dce9e3e54b1

swapon -a
free -m

-/+ buffers/cache:        690       3162
Swap:         1953          0       1953

lsblk -f

NAME            FSTYPE      LABEL UUID                                 MOUNTPOINT
sda                                                                   
├─sda1          ext4              9699832d-5522-4fd1-8a8d-4baf9ac8ca5f /boot
├─sda2          swap              833b82f9-d066-4b65-bb87-8dce9e3e54b1
│ └─swap (dm-1) swap              cf2e8450-c336-4159-b639-287149f7437b [SWAP]
└─sda3          crypto_LUKS       82783208-96fe-4f88-a373-021d1aea7238
  └─root (dm-0) ext4        root  a5557a2a-0987-4814-b73d-bbc01d354d5b /

After reboot lsblk -f shows the following:

NAME            FSTYPE      LABEL UUID                                 MOUNTPOINT
sda                                                                   
├─sda1          ext4              9699832d-5522-4fd1-8a8d-4baf9ac8ca5f /boot
├─sda2                                                                 
└─sda3          crypto_LUKS       82783208-96fe-4f88-a373-021d1aea7238
  └─root (dm-0) ext4        root  a5557a2a-0987-4814-b73d-bbc01d354d5b /

Offline

Board footer

Powered by FluxBB