Thicket data repository for the EEG
1{
2 "id": "https://mort.io/blog/wipeout/",
3 "title": "Wipeout",
4 "link": "https://mort.io/blog/wipeout/",
5 "updated": "2018-12-17T00:00:00",
6 "published": "2018-12-17T00:00:00",
7 "summary": "<p>I recently decided to go through some old PCs and hard disks (yes, actual\nspinning bits of metal) and recycle or simply junk them. I figured I should wipe\nthem properly first, and given that they had been installed with a range of OSs,\nsetup a bootable USB stick so that I could boot and wipe in one easy motion.</p>\n<ul>\n<li>Download <a href=\"https://alpinelinux.org/downloads/\">Alpine Linux</a> <a href=\"https://dl-cdn.alpinelinux.org/alpine/v3.8/releases/x86_64/alpine-extended-3.8.1-x86_64.iso\">3.8.1\nISO</a>\n– I had only <code>x86_64</code> machines, YMMV obviously</li>\n<li>Write this to a USB stick using <code>dd</code> (on Linux), or <a href=\"https://etcher.balena.io/\">Balena\nEtcher</a> on Windows</li>\n<li>Insert the stick and boot the machine after making any necessary BIOS changes</li>\n<li>If the machine has been unbooted for too long or (as one of mine) has a flat\nCMOS clock battery so cannot retain time across reboots, set the time\n<ul>\n<li>manually: <code>date --set=\"20181217\"</code></li>\n<li>automatically: <code>setup-alpine</code> to start configuring things, then <code>CTRL-C</code>\nafter network setup, and execute <code>setup-ntp</code></li>\n</ul>\n</li>\n<li>Then <code>setup-alpine; apk add coreutils</code></li>\n<li>Finally, <code>shred --verbose /dev/sdXN</code> where <code>X</code> is the device id and <code>N</code> the\npartition number (eg., <code>/dev/sda2</code>), or <code>shred --verbose -n1 /dev/sdXN</code> if\nyou’re using a modern disk (apparently) and only want one pass of random data</li>\n</ul>\n<h2><a href=\"https://mort.io/blog/wipeout/#installing-alpine\">Installing Alpine</a></h2>\n<p>After installing Alpine as above:</p>\n<ul>\n<li><code>adduser mort</code></li>\n<li>create <code>~mort/.ssh/authorized_keys</code> containing you preferred public key, and\nset permissions (<code>chmod 600 ~mort/.ssh/authorized_keys</code>)</li>\n<li><code>apk add sudo</code> and then <code>visudo</code> to allow members of group <code>sudo</code> to <code>sudo</code></li>\n<li>add <code>mort</code> to group <code>sudo</code></li>\n<li>logout and then back in</li>\n</ul>\n<p>You can then configure storage as you see fit; it seems I once did probably\nusing <code>sudo</code>:</p>\n<pre><code><span><span><span>apk</span></span><span> add lvm2 git bash xfsprogs</span>\n</span><span><span><span>pvcreate</span></span><span> /dev/sd<span>[</span>bc<span>]</span> <span><span>#</span></span><span> create persistent volumes group</span><span>\n</span></span></span><span><span><span>vgextend</span></span><span> vg0 /dev/sdb <span><span>#</span></span><span> assign storage devices to volume group</span><span>\n</span></span></span><span><span><span>vgextend</span></span><span> vg0 /dev/sdc <span><span>#</span></span><span>\n</span></span></span><span><span><span>lvcreate</span></span><span><span><span> --</span>name</span> lv_home<span><span> --</span>size</span> 60G vg0 <span><span>#</span></span><span> create logical volume `lv_home`</span><span>\n</span></span></span><span><span><span>mkfs.xfs</span></span><span> /dev/vg0/lv_home <span><span>#</span></span><span> format `lv_home` using XFS</span><span>\n</span></span></span><span><span><span>lvcreate</span></span><span><span><span> --</span>name</span> lv_backup<span><span> --</span>size</span> 60G vg0 <span><span>#</span></span><span> create logical volume `lv_backup`</span><span>\n</span></span></span><span><span><span>mkfs.xfs</span></span><span> /dev/vg0/lv_backup <span><span>#</span></span><span> format `lv_backup` using XFS</span><span>\n</span></span></span><span>\n</span><span><span><span>#</span></span><span> create `/etc/fstab` to match the above configuration</span><span>\n</span></span><span><span><span>cat</span></span><span> <span>>></span>/etc/fstab <span><span><<</span><span>EOF</span></span><span>\n</span></span></span><span><span><span>/dev/vg0/lv_home\t/home\txfs\tdefaults\t0 0\n</span></span></span><span><span><span>/dev/vg0/lv_backup\t/backup\txfs\tdefaults\t0 0\n</span></span></span><span><span><span><span>EOF</span></span></span>\n</span><span><span><span>mount</span></span><span><span><span> -</span>a</span><span><span> -</span>v <span><span>#</span></span><span> mount everything, verbosely</span><span>\n</span></span></span></span></code></pre>",
8 "content": "<p>I recently decided to go through some old PCs and hard disks (yes, actual\nspinning bits of metal) and recycle or simply junk them. I figured I should wipe\nthem properly first, and given that they had been installed with a range of OSs,\nsetup a bootable USB stick so that I could boot and wipe in one easy motion.</p>\n<ul>\n<li>Download <a href=\"https://alpinelinux.org/downloads/\">Alpine Linux</a> <a href=\"https://dl-cdn.alpinelinux.org/alpine/v3.8/releases/x86_64/alpine-extended-3.8.1-x86_64.iso\">3.8.1\nISO</a>\n– I had only <code>x86_64</code> machines, YMMV obviously</li>\n<li>Write this to a USB stick using <code>dd</code> (on Linux), or <a href=\"https://etcher.balena.io/\">Balena\nEtcher</a> on Windows</li>\n<li>Insert the stick and boot the machine after making any necessary BIOS changes</li>\n<li>If the machine has been unbooted for too long or (as one of mine) has a flat\nCMOS clock battery so cannot retain time across reboots, set the time\n<ul>\n<li>manually: <code>date --set=\"20181217\"</code></li>\n<li>automatically: <code>setup-alpine</code> to start configuring things, then <code>CTRL-C</code>\nafter network setup, and execute <code>setup-ntp</code></li>\n</ul>\n</li>\n<li>Then <code>setup-alpine; apk add coreutils</code></li>\n<li>Finally, <code>shred --verbose /dev/sdXN</code> where <code>X</code> is the device id and <code>N</code> the\npartition number (eg., <code>/dev/sda2</code>), or <code>shred --verbose -n1 /dev/sdXN</code> if\nyou’re using a modern disk (apparently) and only want one pass of random data</li>\n</ul>\n<h2><a href=\"https://mort.io/blog/wipeout/#installing-alpine\">Installing Alpine</a></h2>\n<p>After installing Alpine as above:</p>\n<ul>\n<li><code>adduser mort</code></li>\n<li>create <code>~mort/.ssh/authorized_keys</code> containing you preferred public key, and\nset permissions (<code>chmod 600 ~mort/.ssh/authorized_keys</code>)</li>\n<li><code>apk add sudo</code> and then <code>visudo</code> to allow members of group <code>sudo</code> to <code>sudo</code></li>\n<li>add <code>mort</code> to group <code>sudo</code></li>\n<li>logout and then back in</li>\n</ul>\n<p>You can then configure storage as you see fit; it seems I once did probably\nusing <code>sudo</code>:</p>\n<pre><code><span><span><span>apk</span></span><span> add lvm2 git bash xfsprogs</span>\n</span><span><span><span>pvcreate</span></span><span> /dev/sd<span>[</span>bc<span>]</span> <span><span>#</span></span><span> create persistent volumes group</span><span>\n</span></span></span><span><span><span>vgextend</span></span><span> vg0 /dev/sdb <span><span>#</span></span><span> assign storage devices to volume group</span><span>\n</span></span></span><span><span><span>vgextend</span></span><span> vg0 /dev/sdc <span><span>#</span></span><span>\n</span></span></span><span><span><span>lvcreate</span></span><span><span><span> --</span>name</span> lv_home<span><span> --</span>size</span> 60G vg0 <span><span>#</span></span><span> create logical volume `lv_home`</span><span>\n</span></span></span><span><span><span>mkfs.xfs</span></span><span> /dev/vg0/lv_home <span><span>#</span></span><span> format `lv_home` using XFS</span><span>\n</span></span></span><span><span><span>lvcreate</span></span><span><span><span> --</span>name</span> lv_backup<span><span> --</span>size</span> 60G vg0 <span><span>#</span></span><span> create logical volume `lv_backup`</span><span>\n</span></span></span><span><span><span>mkfs.xfs</span></span><span> /dev/vg0/lv_backup <span><span>#</span></span><span> format `lv_backup` using XFS</span><span>\n</span></span></span><span>\n</span><span><span><span>#</span></span><span> create `/etc/fstab` to match the above configuration</span><span>\n</span></span><span><span><span>cat</span></span><span> <span>>></span>/etc/fstab <span><span><<</span><span>EOF</span></span><span>\n</span></span></span><span><span><span>/dev/vg0/lv_home\t/home\txfs\tdefaults\t0 0\n</span></span></span><span><span><span>/dev/vg0/lv_backup\t/backup\txfs\tdefaults\t0 0\n</span></span></span><span><span><span><span>EOF</span></span></span>\n</span><span><span><span>mount</span></span><span><span><span> -</span>a</span><span><span> -</span>v <span><span>#</span></span><span> mount everything, verbosely</span><span>\n</span></span></span></span></code></pre>",
9 "content_type": "html",
10 "author": {
11 "name": "Unknown",
12 "email": null,
13 "uri": null
14 },
15 "categories": [],
16 "source": "https://mort.io/atom.xml"
17}