[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#414309: cannot configure encrypted volume if stray swap exists



reassign 414309 partman-crypto
thanks

Hi Stephen,

Thanks for your bug report.

On Sat, Mar 10, 2007 at 03:03:20PM -0500, Stephen Gildea wrote:
> In the "Partition disks" step, using the "Manual" partitioning method,
> I cannot configure encrypted volumes.
> 
> I create a partition, for use as a physical volume for encryption.
> When I try to "Configure encrypted volumes", I get the error screen
> "Unsafe swap space detected" and cannot proceed.
> 
> The error screen suggests running swapoff.  I press Alt-F2 RET and
> type "swapoff -a" to the shell there; it does not help.  (But it
> should, yes?  Is this another bug?)

Sounds like another bug. The normal swapoff in util-linux looks at
/proc/swaps when called with -a and deconfigures all swap devices
listed therein. I'll need to check what busybox swapoff does.

> It also works to, in the partitioner, edit the swap partition on the
> other disk and set its "Use as" field to "do not use".  It took me a
> while to figure this out, and I feel this step should not be
> necessary.

I don't think we can skip this step if we still want to
automatically configure existing swap partitions on the system,
but I agree that it should be easier to handle.

What we could try: Find out how much normal memory is available
and whether the system really needs the swap space, then, if 
possible, offer to deconfigure the swap partitions automatically.
This change is too big to happen before etch is released, but 
definitely something I'll look at afterwards.

If the above should turn out to be impossible or too much work,
I'll try to improve the error template to mention that one can set
the "Use as" field rather than switch to a different VT and use 
swapoff to deconfigure it manually. (This is post-etch as well)

> If I select "Guided partitioning" and ask for "Guided - encrypted
> LVM", it works fine.  Somehow this method gets rid of the unwanted
> swap device.

I would guess that this is because guided partitioning doesn't
try to automatically setup existing swap partitions, but I'm not 
sure about that.

cheers,
Max



Reply to: