Ubuntu/Debian: swapoff when using disks

Use swapoff to ensure swap partitions are not mounted prior to
'sgdisk --zap-all'

Signed-off-by: Scott G. Ainsworth <scott@ainsworth.us>
Signed-off-by: Richard Laager <rlaager@wiktel.com>
[Applied the change to Debian Buster; removed Ubuntu 16.04 and 18.04.]
This commit is contained in:
Scott G. Ainsworth
2021-10-25 13:51:54 -04:00
committed by Richard Laager
parent 1f2ff88863
commit f2cda9dad5
3 changed files with 12 additions and 0 deletions

View File

@@ -291,6 +291,10 @@ Step 2: Disk Formatting
#. If you are re-using a disk, clear it as necessary:
Ensure swap partitions are not in use::
swapoff --all
If the disk was previously used in an MD array::
apt install --yes mdadm