mkswap: zap bootbits
/dev/sdb1 originally initialized by cryptsetup:
and OLD mkswap:
# vol_id /dev/sdb1 | grep TYPE
ID_FS_TYPE=swap
# blkid -s TYPE /dev/sdb1
/dev/sdb1: TYPE="crypt_LUKS"
So, we have two different *valid* signatures on the device now!
NEW mkswap:
# blkid -s TYPE /dev/sdb1
/dev/sdb1: TYPE="swap"
# /lib/udev/vol_id /dev/sdb1 | grep TYPE
ID_FS_TYPE=swap
the bootbits (first 1024 bytes) was erased.
We shouldn't zap disk labels (BSD, SUN, ...) and boot loaders (on whole
disk):
# mkswap /dev/sdb2
mkswap: /dev/sdb2: warning: don't erase bootbits sectors
(BSD partition table detected). Use -f to force.
Setting up swapspace version 1, size = 4348 KiB
no label, UUID=
69d87cef-71ac-4fb0-a689-
ce3e930dea17
# mkswap /dev/sdb
mkswap: /dev/sdb: warning: don't erase bootbits sectors
on whole disk. Use -f to force.
Setting up swapspace version 1, size = 8188 KiB
no label, UUID=
97757ad7-8a84-43d9-bcb4-
16fefd93a2ac
Signed-off-by: Karel Zak <kzak@redhat.com>