Package Details: mkinitcpio-openswap 0.1.0-3

Git Clone URL: (read-only, click to copy)
Package Base: mkinitcpio-openswap
Description: mkinitcpio hook to open swap at boot time
Upstream URL:
Licenses: unknown
Submitter: ahphaw5S
Maintainer: ahphaw5S
Last Packager: ahphaw5S
Votes: 24
Popularity: 2.01
First Submitted: 2015-06-01 14:05 (UTC)
Last Updated: 2017-10-27 14:56 (UTC)

Latest Comments

jrmrjnck commented on 2017-11-06 00:08 (UTC)

/openswap.conf is the correct path. This package has already been updated with the fix. Make sure you update/reinstall the mkinicpio-openswap package (which will automatically rebuild the initramfs), rather than just update the hook file on your filesystem.

diogobaeder commented on 2017-11-05 23:53 (UTC)

Sorry, forgot to mention: I already tried changing "/openswap.conf" to "/etc/openswap.conf", inside the hook config, and it didn't work (not sure why). Is there any command I need to run after changing this path in the hook config?

diogobaeder commented on 2017-11-05 23:51 (UTC)

Hi guys, It's broken for me as well, I'm using the latest version as of this writing (0.1.0-3), together with mkinitcpio-busybox 1.27.2-1, and the only way I can get my laptop to boot is to either remove the openswap hook from /etc/mkinitcpio.conf or downgrade mkinitcpio-busybox. Now, to be fair, I'm not sure if it's an issue with busybox or openswap, but the latest versions of them are not talking well to each other. Cheers, Diogo

commented on 2017-10-23 05:52 (UTC)

Bug report:

commented on 2017-10-23 05:42 (UTC)

This is a bug in busybox: ~ % busybox sh # touch test.conf # source test.conf sh: source: test.conf: not found # source ./test.conf # I will report the bug upstream.

jrmrjnck commented on 2017-10-22 21:26 (UTC)

Editing the openswap.conf path in the hook worked for me. danieldk, did you root cause what changed in mkinicpio/busybox that broke this?

hussam commented on 2017-10-22 15:22 (UTC)

danieldk: ok, thank you for explaining.

commented on 2017-10-22 15:15 (UTC)

hussam: because in the (cpio) ramdisk openswap.conf is stored in /. See or lsinitcpio /boot/initramfs-linux.img | grep openswap.conf

hussam commented on 2017-10-22 13:27 (UTC)

Hi. Sorry in advance for the ignorant question but why does the patch in the bug tracker say: - source openswap.conf + source /openswap.conf instead of: - source openswap.conf + source /etc/openswap.conf?

commented on 2017-10-22 13:25 (UTC)

This does not belong in the bugtracker, I misinterpreted the 'community' in the 'community packages'. So, I will post the report here instead: Since the mkinitcpio-busybox update to 1.27.2-1 (I think), openswap fails with the error line 17: openswap.conf: not found Sourcing openswap.conf with an absolute path in the hook solves this on my system.

commented on 2017-10-22 13:20 (UTC)

There seems to be a problem with this package and the latest mkinitcpio-busybox update:

ahphaw5S commented on 2017-10-16 12:43 (UTC) (edited on 2017-10-16 12:43 (UTC) by ahphaw5S)

thanks! Forgot to commit that one.

spsf64 commented on 2017-10-16 12:01 (UTC)

@ahphaw5s you did not update .SRCINFO, still at 0.1.0-1 (not -2)

ahphaw5S commented on 2017-10-14 14:24 (UTC)

@dreieck, thanks! I have added the $cryptsetup_options to the part you have mentioned. Let me know if you have any further problems.

dreieck commented on 2017-10-14 13:37 (UTC) (edited on 2017-10-14 13:40 (UTC) by dreieck)

There is an error: This hook cannot open a password protected (i.e. no keyfile) LUKS swap device. In /usr/lib/initcpio/hooks/openswap, there is $miscellaneous resp. $cryptsetup_options missing after "cryptsetup open" in the if-part where no keyfile is present. Please add!

ahphaw5S commented on 2017-03-16 09:14 (UTC)

@diogobaeder, as far as I understand sd-encrypt is a hook to open the root partition. The openswap simply runs cryptsetup command with some options to open swap _after_ the root partition is mounted. So I think that these things are independent of each other and it should also work with sd-encrypt hook too. Let me know if I am mistaked somewhere.

diogobaeder commented on 2017-03-16 00:36 (UTC) (edited on 2017-03-16 08:33 (UTC) by diogobaeder)

Hi guys, any ideas if this works for systemd as well - i.e., sd-encrypt? Or just plain udev + encrypt? [EDIT] Sorry, nevermind, I opted by just using the normal encrypt hook and not use systemd in initramfs. Just tested the package, and it works like a charm, my computer can now hibernate to encrypted SWAP. Yay! Great job, guys! :-)

jrmrjnck commented on 2017-03-07 03:22 (UTC)

Thank you for maintaining this package. It worked perfectly for me.

ahphaw5S commented on 2016-12-06 09:35 (UTC) (edited on 2016-12-06 10:14 (UTC) by ahphaw5S)

Thank you! I have merge your changes. Let me know if I have missed something.

f4bio commented on 2016-12-06 02:00 (UTC)

are you the original author? any way to submit pull requests? I've changed some lines so the mount command uses --options, to allow the keyfile to be on a btrfs (or any other) subvolume. see:

hussam commented on 2016-10-21 12:31 (UTC)

Hi. Thank you for creating this package. I have been looking for something like this.

ahphaw5S commented on 2015-06-01 14:16 (UTC)

For more information see