Encrypted Swap -- Loop Devices



I am having difficulty getting encrypted swap to enable on boot. Can anyone
offer any suggestions?

# <file system> <mount point> <type> <options> <dump> <pass>
/dev/hda2 none swap sw,loop=/dev/loop0,encryption=AES256
0 0

After boot /dev/loop exists but /dev/loop0 to /dev/loop7 do not exist.
# ls /dev/loo*
0
# swapon -a
swapon: unable to open loop device /dev/loop0

After I execute "losetup -a", /dev/loop0 to /dev/loop7 then exist
and "swapon -a" mounts the swap.

# losetup -a
# ls /dev/loo*
/dev/loop0 /dev/loop1 /dev/loop2 /dev/loop3 /dev/loop4 /dev/loop5 /dev/loop6 /dev/loop7

/dev/loop:
0
# swapon -a
Setting up swapspace version 1, size = 1077501 kB
no label, UUID=b9e78291-ebe5-41e9-8ed3-c65324260818

Sorry about not including boot error messages but I don't seem to be logging.
#more /var/log/boot
(Nothing has been logged yet.)
and the only reference to swap in /var/log/messages is its recreation after I
had scrubbed the partition.

May 10 22:54:32 localhost kernel: Adding 1052244k swap on /dev/loop0.
Priority:-1 extents:1 across:1052244k

Thankyou,
- Adam Wakerhauser


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: Auto enabling swap at boot up
    ... it on boot up without using specifying it in fstab file? ... You can always have a script call swapon, but what, ... foffl.sourceforge.net - Feeds OFFLine, an offline RSS/Atom aggregator ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • cant swapon second partition after swapoff, overwrite /dev/urandom, swapon
    ... I wanted to wipe my swap partitions, so I did swapoff /dev/sda7, then ... With swapon /dev/sda7, I get the following error message: ... I noticed afterward that mkswap made a swap that was considerably smaller ... Don't have the error message available. ...
    (Debian-User)
  • Re: Fedora Core 2 problems
    ... The real problem is that I can't get it to boot into the new kernel. ... Swap is only a secondary problem. ... >>modification to fstab but that didn't ... >if you can make swapon work, then you would know what to put into fstab ...
    (Fedora)
  • Re: Detached device and boot auto mount
    ... boot and there is no device in the rack, boot stops after automount detects that there is no hd in rack. ... have a swap partition available at boot? ... initscript to be run just after the normal script that runs swapon. ...
    (Debian-User)
  • Re: Debian install and swap
    ... partition for Linux swap. ... with swapon produces the error: ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ... Trouble? ...
    (Debian-User)