# Crypt-swap started complaining after upgrade

## Zarhan

I'm using encrypted swap partition. After recent upgrade, I started getting this error on every boot:

mkswap: /dev/mapper/crypt-swap: warning: don't erase bootbits sectors

        on whole disk. Use -f to force.

I have this in my /etc/conf.d/dmcrypt:

swap=crypt-swap

source='/dev/sda5'

and it has worked before without any complaints. What's the sudden problem?

----------

## richard.scott

try downgrading udev and re-installing device mapper

----------

## Princess Nell

That is most likely not the problem. Cf. https://bugs.gentoo.org/show_bug.cgi?id=288270. I'm running the new udev and lvm2,

with the same kind of swap config, and don't see this problem.

 *Quote:*   

> 
> 
> Nov  9 18:34:16 localhost kernel: Adding 4016208k swap on /dev/mapper/crypt-swap.  Priority:-1 extents:1 across:4016208k
> 
> 

 

util-linux-2.16.1, lvm2-2.02.51-r1, udev-146-r1, cryptsetup-1.0.6-r2, gentoo-sources-2.6.30-r8.

----------

## Zarhan

Well, during the upgrade I had to remove device-mapper and install lvm2 (since upgrade would block and posts on the forums stated that device-mapper has been merged to lvm2). 

Mind you, the swap WORKS, it is active. It's just giving that (non-fatal) error during boot.

https://bugs.gentoo.org/show_bug.cgi?id=288270 is actually what I'm seeing.

----------

## Princess Nell

Actually, I do see this message. It shows up on the boot screen only, not in dmesg, that's how I missed it.

----------

## orange_juice

 *https://bugs.gentoo.org/show_bug.cgi?id=288270 wrote:*   

> /lib/rcscripts/addons/dm-crypt-start.sh should use “mkswap -f” to create
> 
> swap volumes. Currently, line 34 says:
> 
>    : ${pre_mount:='mkswap ${dev}'}
> ...

 

Thank you!

Kind regards,

orange_juice

----------

