with apologies

Wipeout

Richard Mortier · December 17, 2018 · #tech #linux #old

I recently decided to go through some old PCs and hard disks (yes, actual spinning bits of metal) and recycle or simply junk them. I figured I should wipe them properly first, and given that they had been installed with a range of OSs, setup a bootable USB stick so that I could boot and wipe in one easy motion.

Installing Alpine

After installing Alpine as above:

You can then configure storage as you see fit; it seems I once did probably using sudo:

apk add lvm2 git bash xfsprogs
pvcreate /dev/sd[bc] # create persistent volumes group
vgextend vg0 /dev/sdb # assign storage devices to volume group
vgextend vg0 /dev/sdc #
lvcreate --name lv_home --size 60G vg0 # create logical volume `lv_home`
mkfs.xfs /dev/vg0/lv_home # format `lv_home` using XFS
lvcreate --name lv_backup --size 60G vg0 # create logical volume `lv_backup`
mkfs.xfs /dev/vg0/lv_backup # format `lv_backup` using XFS

# create `/etc/fstab` to match the above configuration
cat >>/etc/fstab <<EOF
/dev/vg0/lv_home	/home	xfs	defaults	0 0
/dev/vg0/lv_backup	/backup	xfs	defaults	0 0
EOF
mount -a -v # mount everything, verbosely