Experiments with sswap(1), srm(1), wipe(1), gdisk(8), lsblk and gpart(8)
Date: Fri, 27 Aug 2021 14:59:27 UTC
On 27/08/2021 12:22, Graham Perrin wrote:
> … sswap(1) to securely delete whatever might be there. …
I took an opportunity to experiment with some of the other utilities
that were recently installed by security/secure_delete and
security/wipe. All new to me.
With reference to the attached file, a few points of interest. Some of
it's PEBKAM, I don't mind sharing my mistakes.
I'll report what might be an obscure bug in lsblk.
----
Line 5, misuse of srm – `srm -lv /dev/da0p3` – was followed by peculiar
output from a run of lsblk. No surprise there.
Lines 131–139, gdisk should have added freebsd-swap at /dev/da0p3, I
ignored the suggestion to remove the hard disk drive ("Warning: The
kernel may continue to use old or deleted partitions."), gpart then
showed nothing (free space) where da0p3 was expected.
Line 152, I used gpart to add freebsd-swap at da0p3.
Lines 288–297, gdisk should have deleted /dev/da0p3, I ignored the
suggestion to remove the drive, lsblk showed da0p3 still present.
Lines 301–359, tail of /var/log/messages whilst I disconnected then
reconnected the multi-purpose dock in which the drive was seated.
Line 375, with nothing in the SD card reader at da0, lsblk showed
freebsd-swap.
Lines 379–383, with the hard disk drive at da4, lsblk showed nothing
(free space) between da4p2 and da4p4 – the preceding deletion by gdisk
was a success.
Lines 418–430, gdisk succesfully added freebsd-swap at /dev/da4p3 – the
partition was detected by lsblk _without_ the need to disconnect then
reconnect the dock.
----
I disconnected then reconnected the dock, lsblk continues to show what I
might describe as a 'ghost' where truly there's nothing in the SD card
reader at da0.
da0, where previously there was the hard disk drive on the JMicron USB
to ATA/ATAPI bridge.