Package Details: mkinitcpio-openswap 0.1.0-3

Git Clone URL: https://aur.archlinux.org/mkinitcpio-openswap.git (read-only, click to copy)
Package Base: mkinitcpio-openswap
Description: mkinitcpio hook to open swap at boot time
Upstream URL: https://aur.archlinux.org/packages/mkinitcpio-openswap/
Licenses: unknown
Submitter: ahphaw5S
Maintainer: ahphaw5S
Last Packager: ahphaw5S
Votes: 25
Popularity: 0.033412
First Submitted: 2015-06-01 14:05 (UTC)
Last Updated: 2017-10-27 14:56 (UTC)

Dependencies (1)

Required by (0)

Sources (3)

Latest Comments

1 2 3 Next › Last »

ostheer commented on 2025-05-25 17:54 (UTC) (edited on 2025-05-25 21:19 (UTC) by ostheer)

This works. However, I'm using native ZFS encryption for my root fs. Now, I get prompted twice at boot for a password (first for swap, then for root).

I only need my swap open in initramfs when resuming from hibernation (on a clean boot, it gets opened through crypttab and keyfile on root). On a clean boot, I can just enter an empty (incorrect) password 3 times, swap gets skipped, system boots and opens swap just fine. However, each incorrect password takes time.

Is there any way to conditionally open the swap, only when EFI reports a hibernation image?

Something like this would work (except I don't know how to implement the actual conditional, I can imagine probing the HibernateLocation EFI var somehow):

run_hook () {
    if SOMETHING; then
        return 0
    fi

    ...  # Original hook
}

jpwhiting commented on 2023-10-06 18:21 (UTC)

Shouldn't the license be 'MIT' instead of 'unknown'? The LICENSE file is MIT...

<deleted-account> commented on 2023-06-26 18:38 (UTC)

What is crypt_swap_name and what am I supposed to type ther? Label? /dev/ fromcryptab? /dev/mapper/ from fstab? I understand it's 20 iq question and I'm mentally challenged, but I tried everything.

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

<deleted-account> commented on 2017-10-23 05:52 (UTC)

Bug report: https://bugs.busybox.net/show_bug.cgi?id=10446

<deleted-account> 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.