You are not logged in.

#1 2016-09-16 07:15:43

ThomasN
Member
Registered: 2016-02-03
Posts: 31

[SOLVED]Dependency failed for swap

Before installation, I created a partition for swap, using the instructions on the wiki. I use GPT, so it should be activated by systemd-gpt-auto-generator even without an entry in fstab, if I interpreted the wiki correctly.

However, when I run free -h, it shows a total swap space of 0B.

I then tried including an entry for the swap partition in fstab, first using PARTUUID, then again using device names. In both cases, I saw "dependency failed for swap" during boot (I don't see that without an fstab-entry) and free -h gives identical results.

When I manually activate swap, using mkswap and swapon, I do get a 2GB swap space, as expected.

How do I make the swap partition activate on boot?

Last edited by ThomasN (2016-09-16 09:41:47)

Offline

#2 2016-09-16 08:02:51

nahte
Member
From: /usr/temp
Registered: 2016-09-14
Posts: 39

Re: [SOLVED]Dependency failed for swap

https://wiki.archlinux.org/index.php/swap

What I would do is use software similar to gparted, shrink a partion. Then with the free space leave it.
Get out a usb with arch on it, select the free space: cgdisk /dev/sdX
then make that a swap file, swapon, + any following steps to create swap. Then reboot back into arch.

I don't know or even think this will work but there is a suggestion. Sorry if I am extremely incorrect.


60% of the time, I don't know what I'm doing all the time.

P.S. I'm new so everything I say is probably wrong.

Offline

#3 2016-09-16 09:08:15

onslow77
Member
Registered: 2014-09-21
Posts: 283

Re: [SOLVED]Dependency failed for swap

ThomasN wrote:

How do I make the swap partition activate on boot?

Read and follow the Arch "Swap" Wiki.

Please do not be a Help Vampire!

Do not hesitate to ask If there is any part of the wiki you do not understand.

Best regards
Martin

Last edited by onslow77 (2016-09-16 09:10:49)

Offline

#4 2016-09-16 09:25:17

ThomasN
Member
Registered: 2016-02-03
Posts: 31

Re: [SOLVED]Dependency failed for swap

onslow77 wrote:
ThomasN wrote:

How do I make the swap partition activate on boot?

Read and follow the Arch "Swap" Wiki.

Please do not be a Help Vampire!

Do not hesitate to ask If there is any part of the wiki you do not understand.

Best regards
Martin

I already followed the instructions in the wiki, I'm sorry if I didn't make this clear in my original post.

If I understand the wiki correctly systemd-gpt-auto-generator should find the (GPT) swap partition and activate swap automatically.

When that didn't work (I ended up with 0B total swap space), I tried the other method described in the wiki: an fstab entry for the swap partition. I first tried it with PARTUUID, then with device names, but both times I got "dependency failed for swap" during boot.

What am I doing wrong?

Edit: Nahte, thanks for your reply. If I understand correctly, the method you describe is to create a swap partition. I already did that before installing. Do you think re-creating the swap partition would help?

Last edited by ThomasN (2016-09-16 09:28:51)

Offline

#5 2016-09-16 09:41:13

ThomasN
Member
Registered: 2016-02-03
Posts: 31

Re: [SOLVED]Dependency failed for swap

I rebooted and checked again. Swap is working fine now (without a fstab entry). I'm not sure what fixed it, but I'll mark this  thread as solved anyway.

Edit: and sorry for wasting time with this

Last edited by ThomasN (2016-09-16 10:22:23)

Offline

#6 2016-09-16 09:50:18

nahte
Member
From: /usr/temp
Registered: 2016-09-14
Posts: 39

Re: [SOLVED]Dependency failed for swap

Sorry I misunderstood your issue. I interpreted it as you installed arch with a failed swap and wanted to activate it. My thoughts were as followed in my previous comment. Anyway as this is solved I don't want to keep bumping this thread, so I advice us both not to comment on this again (don't want the admins telling us off). I'm glad your problem was solved smile


60% of the time, I don't know what I'm doing all the time.

P.S. I'm new so everything I say is probably wrong.

Offline

Board footer

Powered by FluxBB