<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>invisiblethreat</title>
    <description></description>
    <link>https://invisiblethreat.ca/</link>
    <atom:link href="https://invisiblethreat.ca/feed.xml" rel="self" type="application/rss+xml" />
    <pubDate>Fri, 06 Nov 2026 20:29:57 +0000</pubDate>
    <lastBuildDate>Fri, 06 Nov 2026 20:29:57 +0000</lastBuildDate>
    <generator>Jekyll v3.10.0</generator>
    
      <item>
        <title>dd</title>
        <description>&lt;h1 id=&quot;overview--of-dd&quot;&gt;Overview  of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd&lt;/code&gt;&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;This is a forum post that I found 10-15 years ago. The content is not mine-
I’ve been carting it around in different formats formats for all this time. It
deserves to be seen by all. There are some edits for clarity and grammar, but
the substance remains the same.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The basic command is structured as follows:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=&amp;lt;source&amp;gt; of=&amp;lt;target&amp;gt; bs=&amp;lt;byte size&amp;gt; skip= seek= conv=&amp;lt;conversion&amp;gt;
#&quot;USUALLY&quot; some power of 2, not less than 512 bytes
# ie, 512, 1024, 2048, 4096, 8192, 16384, but can be ANY reasonable number
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;ul&gt;
  &lt;li&gt;Source is the data being read&lt;/li&gt;
  &lt;li&gt;Target is where the data gets written.&lt;/li&gt;
  &lt;li&gt;If you reverse the source and target, you can wipe out a lot of data. This feature has inspired the nickname &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd&lt;/code&gt; “Data Destroyer”.&lt;/li&gt;
  &lt;li&gt;Caution should be observed when using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd&lt;/code&gt; to copy encrypted partitions.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;make-swap-on-a-running-system&quot;&gt;Make swap on a running system&lt;/h2&gt;

&lt;p&gt;How to make a swap file, or another swap file on a running system&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/dev/zero of=/swapspace bs=4k count=250000
mkswap /swapspace
swapon /swapspace
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This can mitigate out of memory issues due to memory leaks on servers that can
not easily be rebooted.&lt;/p&gt;

&lt;h2 id=&quot;size-and-drives&quot;&gt;Size and drives&lt;/h2&gt;

&lt;p&gt;How to pick proper block size&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;time `dd` if=/dev/zero bs=1024 count=1000000 of=/home/sam/1Gb.file
time `dd` if=/dev/zero bs=2048 count=500000 of=/home/sam/1Gb.file
time `dd` if=/dev/zero bs=4096 count=250000 of=/home/sam/1Gb.file
time `dd` if=/dev/zero bs=8192 count=125000 of=/home/sam/1Gb.file
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This method can also be used as a drive benchmark, to find strengths and
weaknesses in hard drives&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;time `dd` if=/home/sam/1Gb.file bs=64k | `dd` of=/dev/null
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;time `dd` if=/dev/zero bs=1024 count=1000000 of=/home/sam/1Gb.file
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The output looks like this&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;1000000+0 records in
1000000+0 records out

real    2m17.951s
user    0m0.930s
sys 0m25.160s
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Your output may have different figures. The format is what I’m referring to. If
you play with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bs=&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;count=&lt;/code&gt;, always having them multiply out to the same
figure, you can calculate bytes/second like this: 1Gb/total seconds = Gb/s. You
only use the ‘real’ timing figure from above. You can get more realistic results
using a 3Gb file.&lt;/p&gt;

&lt;h2 id=&quot;how-to-rejuvenate-a-hard-drive---not-ssds&quot;&gt;How to rejuvenate a hard drive - &lt;em&gt;NOT SSDs&lt;/em&gt;&lt;/h2&gt;

&lt;p&gt;This will sometimes cure input/output errors experienced when using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd&lt;/code&gt;. Over
time the data on a drive, especially a drive that hasn’t been used for a year or
two grows into larger magnetic flux points than were originally recorded. This
makes it hard for the drive heads to decipher these magnetic flux points. This
results in read/write errors. Also, sometimes sector 1 goes bad resulting in a
useless drive. What you need to do is&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/dev/sda of=/dev/sda
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;to rejuvenate the drive. The process rewrites all the data on the drive in nice
tight magnetic patterns that can then be read properly. The procedure is
perfectly safe, and saves one a lot of money on HDDs.&lt;/p&gt;

&lt;h2 id=&quot;copying-disks-and-partitions&quot;&gt;Copying disks and partitions&lt;/h2&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/dev/sda2 of=/dev/sdb2 bs=4096 conv=notrunc,noerror
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sda2&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sdb2&lt;/code&gt; are partitions. You want to copy &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sda2&lt;/code&gt; to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sdb2&lt;/code&gt;. If &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sdb2&lt;/code&gt;
doesn’t exist, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd&lt;/code&gt; will start at the beginning of the disk, and create it. Be
careful with order of if and of. You can write a blank disk to a good disk if
you get confused. The only difference between a big partition and a small
partition, besides size, is the partition table. If you are copying &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sda&lt;/code&gt; to
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sdb&lt;/code&gt;, an entire drive with a single partition, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sdb&lt;/code&gt; being smaller than &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sda&lt;/code&gt;,
then you have to&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/dev/sda skip=2 of=/dev/sdb seek=2 bs=4k conv=noerror
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;skip&lt;/code&gt; skips input blocks at the beginning of the media (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sda&lt;/code&gt;). Seek skips over so
many blocks on the output media before writing (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sdb&lt;/code&gt;). By doing this, you leave
the first 4k bytes on each drive untouched. You don’t want to tell a drive it
is bigger than it really is by writing a partition table from a larger drive to
a smaller drive. The first 63 sectors of a drive are empty, except sector 1,
the MBR. If you are copying a smaller partition to a larger one, the larger
partition will read the correct size with:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;fdisk -l
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;df -h
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This is because &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;fdisk&lt;/code&gt; reads the partition table and df reads the format info.
If you &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd&lt;/code&gt; a smaller partition to a larger one the larger one will now be
formatted the same as the smaller one and there won’t be any space left on the
drive.The way around this is to build a partition image file.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=smaller_partition of=/home/sam/smaller_partition.img
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Mount the image like a drive using:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;mount -o loop /home/sam/smaller_partition.img /mnt/directory
cd /mnt/directory
cp -r * /mnt/larger_partition_already_partitioned_and_formatted_to_the_size_you_want
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cp&lt;/code&gt; has an -r switch for recursive copy. Now, if you are copying &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sda3&lt;/code&gt; to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sda2&lt;/code&gt;
, this is different. What you want to do is this:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/dev/sda3 of=/dev/sda2 bs=4096 conv=notrunc,noerror
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The very last part of the drive is usually zeroes. So, if you have room for the
data, and the zeroes get truncated that’s ok. Make an iso image of a CD:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/dev/hdc of=/home/sam/mycd.iso bs=2048 conv=notrunc
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This copies sector for sector. The result will be a hard disk image file of the
CD. You can mount the image with:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;mkdir /mnt/mycd
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;this line in fstab:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;/home/sam/mycd.iso /mnt/mycd iso9660 rw,user,noauto 0 0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Save fstab,&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;mount -o loop /mnt/mycd
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Then the file system will be viewable as files and directories in the directory&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;/mnt/mycd
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Copy a floppy disk:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/dev/fd0 of=/home/sam/floppy.image bs=2x80x18b conv=notrunc
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;or&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/dev/fd0 of=/home/sam/floppy.image conv=notrunc
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The 18b specifies 18 sectors of 512 bytes, the 2x multiplies the sector size by
the number of heads, and the 80x is for the cylinders–a total of 1474560 bytes.
This issues a single 1474560-byte read request to /dev/fd0 and a single 1474560
write request to&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;/home/sam/floppy.image
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This makes a hard drive image of the floppy, with bootable info intact. The
second example uses default “bs=” of 512, which is the sector size of a floppy.&lt;/p&gt;

&lt;h2 id=&quot;overwrite-with-devurandom&quot;&gt;Overwrite with /dev/urandom&lt;/h2&gt;

&lt;p&gt;If you’re concerned about spies with superconducting quantum-interference
detectors you can always add a “for” loop for government level secure disk
erasure: copy and paste the following two lines into a text editor.&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#!/bin/bash
for n in `seq 7`; do `dd` if=/dev/urandom of=/dev/sda bs=8b conv=notrunc; done
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now you have a shell script for seven passes of random characters over the
whole disk Do:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;chmod a+x &amp;lt;shellscriptfile&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;to make it executable.
To make a bootable USB thumb drive: Download 50 MB Debian based distro here:
http://sourceforge.net/projects/insert/
Plug in the thumb drive to a USB port. Do:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dmesg | tail
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Look where the new drive is, sdb, or something similar. Do:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/home/sam/insert.iso of=/dev/sdb ibs=4b obs=1b conv=notrunc,noerror
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now set the BIOS to USB boot, plug in the thumb drive, and boot the machine.
Copy just the MBR and boot sector of a floppy to hard drive image:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/dev/fd0 of=/home/sam/MBRboot.image bs=512 count=2
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;This copies the first 2 sectors of the floppy.
Cloning an entire hard disk:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/dev/sda of=/dev/sdb conv=notrunc,noerror
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;In this example, sda is the source. Sdb is the target. Do not reverse the intended
source and target. Surprisingly many people do. Notrunc means ‘do not truncate
the output file’. Noerror means to keep going if there is an error. Normally
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd&lt;/code&gt; stops at any error.
Copy MBR only of a hard drive:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/dev/sda of=/home/sam/MBR.image bs=446 count=1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This will copy the first 446 bytes of the hard drive to a file. If you haven’t
already guessed, reversing the objects of if and of, in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd&lt;/code&gt; command line
reverses the direction of the write.&lt;/p&gt;

&lt;h2 id=&quot;helix-and-dcfldd&quot;&gt;Helix and dcfldd&lt;/h2&gt;

&lt;p&gt;Wipe a hard drive of all data (you would want to boot from a cd to do this)
http://www.efense.com/helix
is a good boot cd. The helix boot environment contains the DoD version of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd&lt;/code&gt;
called &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dcfldd&lt;/code&gt;. It works the same way, but is has a progress bar.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dcfldd if=/dev/zero of=/dev/sda conv=notrunc
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This is useful for making the drive almost like new. Most drive have &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;0x0000ffh&lt;/code&gt;
written to every sector from the factory. Overwrite all the free space on a
partition (deleted files you don’t want recovered)&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/dev/urandom &amp;gt; fileconsumingallfreespace
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;When &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd&lt;/code&gt; says no room left on device, all the free space has been overwritten with random characters. Then, delete the big file.&lt;/p&gt;

&lt;h2 id=&quot;hexdumping-for-fun-and-profit&quot;&gt;Hexdumping for fun and profit&lt;/h2&gt;

&lt;p&gt;To view your virtual memory:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/proc/kcore | hexdump -C | less
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;use PgUp, PgDn, up arrow, down arrow to navigate in less. Less is my favorite
editor. Or I should say it would be my favorite editor if it allowed editing.
What filesystems are installed:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/proc/filesystems | hexdump -C | less
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;all loaded modules:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/proc/kallsyms | hexdump -C | less
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;interrupt table:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/proc/interrupts | hexdump -C | less
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;How many seconds has the system been up:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/proc/uptime | hexdump -C | less
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;partitions and sizes in kb:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/proc/partitions | hexdump -C | less
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Memory stats:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/proc/meminfo | hexdump -C | less
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;cloning-drives&quot;&gt;Cloning Drives&lt;/h2&gt;

&lt;p&gt;I put two identical drives in every one of my machines. Before I do anything
which might be disastrous, I do:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dcfldd if=/dev/sda of=/dev/sdb bs=4096 conv=notrunc,noerror
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;and copy my present working sda drive system to the sdb drive. If I wreck the
installation on sda, I just boot with the helix cd and:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dcfldd if=/dev/sdb of=/dev/sda bs=4096 conv=notrunc,noerror
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;and I get everything back exactly the same as before whatever boneheaded thing I
was trying to do didn’t work. You can really, really learn linux this way,
because you absolutely can’t wreck what you have an exact copy of. You also
might consider making the root partition separate from /home, and make /home
big enough to hold the root partition, plus more. Then you can do:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/dev/sda2 (root) of /home/sam/root.img bs=4096 conv=notrunc,noerror
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;To make a backup of root, and&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/home/sam/root.img of=/dev/sda2 (root) bs=4096 conv=notrunc,noerror
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;To write the image of root back to the root partition if you messed up and can’t
launch the X server anymore, or edited /etc/fstab and can’t figure out what you
did wrong. It only takes a few minutes to restore a 15 GB root partition from an
image file.&lt;/p&gt;

&lt;p&gt;To make a file of 100 random bytes:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/dev/urandom of=/home/sam/myrandom bs=100 count=1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;/dev/random produces only as many random bits as the entropy pool contains. This
yields quality randomness for kryptographic keys. If more random bytes are
required, the process stops until the entropy pool is refilled (waggling your
mouse helps). /dev/urandom does not have this restriction. If the user demands
more bits than currently in the entropy pool, it produces them using a pseudo
random number generator. Here, /dev/urandom is the Linux random byte device.
myrandom is a file. Write random data over a file before deleting it: first do a&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;ls -l
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;to find filesize.
In this case it is 3769&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;ls -l afile -rw------- ... 3769 Nov 2 13:41 &amp;lt;filename&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/dev/urandom of=afile bs=3769 count=1 conv=notrunc
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This will write random characters over the entire file.
Copy a disk partition to a file on a different partition.&lt;/p&gt;

&lt;p&gt;Warning!! Do not copy a partition to the same partition.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/dev/sdb2 of=/home/sam/partition.image bs=4096 conv=notrunc,noerror
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This will make a file that is an exact duplicate of the sdb2 partition. You can
substitue hdb, sda, hda, or whatever the disk is called. Or&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/dev/sdb2 ibs=4096 | gzip &amp;gt; partition.image.gz conv=noerror
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Makes a gzipped archive of the entire partition. To restore use:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; | gunzip &amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;for bzip2(slower,smaller), substitute bzip2 and bunzip2, and name the file&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;.bz2
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Restore a disk partition from an image file.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/home/sam/partition.image of=/dev/sdb2 bs=4096 conv=notrunc,noerror
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This way you can get a large hard drive and partition it so you can back up your root partition. If you mess up your root partition, you just boot from the helix cd and restore the image. To covert a file to all uppercase:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=filename of=filename conv=ucase
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Make a ramdrive:
The Linux kernel usually makes a number a ramdisks you can make into ramdrives.
You have to populate the drive with zeroes like so:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/dev/zero of=/dev/ram7 bs=1k count=16384
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Makes a 16 MB ramdisk full of zeroes.&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;mke2fs -m0 /dev/ram7 4096
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;puts a file system on the ramdisk turning it into a ramdrive. Watch this puppy
smoke.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;debian:/home/sam # hdparm -t /dev/ram7
/dev/ram7:
Timing buffered disk reads:   16 MB in  0.02 seconds = 913.92 MB/sec
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;You only to do the timing once because it’s cool. Make the drive again because
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;hdparm&lt;/code&gt; is a little hard on ramdrives. You can mount the ramdrive with:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;mkdir /mnt/mem
mount /dev/ram7 /mnt/mem
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now you can use the drive like a hard drive. This is particularly superb for
working on large documents or programming. You can copy the large file or
programming project to the ramdrive, which on my machine is at least 27 times
as fast as /dev/sda, and ever time you save the huge document, or need to do a
compile it’s like your machine is running on nitromethane. The only thing is the
ramdrive is volatile. If you lose power, or lock up the data on the ramdrive is
lost. Use a reliable machine during clear skies if you use a ramdrive.
Copy ram memory to a file:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/dev/mem of=/home/sam/mem.bin bs=1024
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The device&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;/dev/mem
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;is your system memory. You can actually copy any block or character device to a
file using dd. Memory capture on a fast system, with bs=1024 takes about 60
seconds, a 120 GB HDD about an hour, a CD to hard drive about 10 minutes, a
floppy to a hard drive about 2 minutes. With dd, your floppy drive images will
not change at all. If you have a bootable DOS diskette, and you save it to your
HDD as an image file, when you restore that image to another floppy it will be
bootable. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd&lt;/code&gt; will print to the terminal window if you omit the&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;of=/dev/output
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;part.&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/home/sam/myfile
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;will print the file myfile to the terminal window.
To search the system memory:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/dev/mem | hexdump -C | grep &apos;some-string-of-words-in-the-file-you-forgot-to-save-before-the-power-failed&apos;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If you need to cover your tracks quickly, put the following commands in a script to overwrite system ram with zeroes. Don’t try this for fun.&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;mkdir /mnt/mem
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;mount -t ramfs /dev/mem /mnt/mem
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/dev/zero &amp;gt; /mnt/mem/bigfile.file
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This will overwrite all unprotected memory structures with zeroes, and freeze
the machine so you have to reboot (Caution, this also prevents committment of
the file system journal and could trash the file system).
If you are just curious about what might be on you disk drive, or what an MBR
looks like, or maybe what is at the very end of your disk:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/dev/sda count=1 | hexdump -C
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Will show you sector 1, or the MBR. The bootstrap code and partition table are
in the MBR.&lt;/p&gt;

&lt;p&gt;To see the end of the disk you have to know the total number of sectors for the
disk, and the disk has to be set up with Maximum Addressable Sector equal to
Maximum Native Address. The helix CD has a utility to set this correctly. In the
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd&lt;/code&gt; command your seek value will be one less than MNA of the disk. For a 120 GB
Seagate SATA drives&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/dev/sda of=home/sam/myfile skip=234441646 default bs=512
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So this reads sector for sector, and writes the last sector to myfile. Even with
LBA addressing Disks still secretly are read in sectors, cylinders, and heads.
There are 63 sectors per cylinder, and 255 heads per cylinder. Then there is a
total cylinder count for the disk. You multiply out 512x63x255=bytes per
cylinder. 63x255=sectors per cylinder. With 234441647 total sectors, and 16065
sectors per cylinder, you get some trailing sectors which do not make up an
entire cylinder, 14593.317584812. This leaves you with 5102 sectors which cannot
be partitioned because to be in a partition you have to be a whole cylinder.
It’s like having part of a person. That doesn’t really count as a person. So,
what happens to these sectors? They become surplus sectors after the last
partition. You can’t ordinarily read in there with an operating system. But,
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd&lt;/code&gt; can. It is really a good idea to check for anything writing to surplus
sectors. For our Seagate 120 GB drive you subtract total
sectors(234441647)-(5102) which don’t make up a whole cylinder=234436545
partitionable sectors.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/dev/sda of=/home/sam/myfile skip=234436545
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This writes the last 5102 sectors to myfile. Launch midnight commander (mc) to
view the file. If there is something in there, you do not need it for anything.
In this case you would write over it with random characters:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/dev/urandom of=/dev/sda bs=512 seek=234436545
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Will overwrite the 5102 surplus sectors on our 120 GB Seagate drive.&lt;/p&gt;

&lt;p&gt;Block size:
One cylinder in LBA mode = 255 heads * 63 sectors per track = 16065 sectors =
16065 * 512 bytes = 16065b. The b means ‘* 512’. 32130b represents a two
cylinder block size. When using cylinder sized block sizes you never need to
worry about that last fraction of a block not being copied because partitions
are made of a whole number of cylinders. Partitions cannot contain partial
cylinders. One cylinder is 8,225,280 bytes.&lt;/p&gt;

&lt;p&gt;If you want to check out some random area of the disk:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/dev/sda of=/home/sam/myfile bs=4096 skip=2000 count=1000
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Will give you 8,000 sectors in myfile, after the first 16,000 sectors. You can
open that file with a hex editor, edit some of it, and write the edited part
back to disk:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/home/sam/myfile of=/dev/sda bs=4096 seek=2000 count=1000
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So there you got yourself a disk editor. It’s not the best, but it works.
You can make a boot floppy:With the&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;boot.img file
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;,
which is pretty easy to get. You just need a program that will literally start
writing at sector 1.
dd if=boot.img of=/dev/fd0 bs=1440k
This makes a bootable disk you can add stuff to. If you want to make a partition
image on another machine: on source machine:
Boot both machines with the helix CD just to be extra sure. Then,&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/dev/hda bs=16065b | netcat targethost-IP 1234
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;On target machine:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;netcat -l -p 1234 | `dd` of=/dev/hdc bs=16065b
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Netcat is a program, available by default, on almost every linux installation.
It is like a swiss army knife of networking. In the preceding example netcat and
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd&lt;/code&gt; are piped to one another. One of the functions of the linux kernel is to
make pipes. The pipe character looks like two little lines on top of one
another, both vertical. Here is how this command behaves: This byte size is a
cylinder. bs=16065b equals one cylinder on an LBA drive. The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd&lt;/code&gt; command is
piped to netcat, which takes as its arguments the IP address of the target(like
192.168.0.1, or any IP address with an open port) and what port you want to
use(1234).&lt;/p&gt;

&lt;p&gt;Alert!! Don’t hit enter yet. Hit enter on the target machine, hit enter on the
source machine.&lt;/p&gt;

&lt;p&gt;This is kind of how Norton Ghost works to image a drive to another machine.
Ok, say you want to find out if your girlfriend or wife is cheating on you,
having cyber whoopie, or just basically misbehaving with her computer. Even if
the computer is secured with a password you can boot with the:
http://www.efense.com/helix
CD and search the entire drive partition for text strings:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/dev/sda2 bs=16065 | hexdump -C | grep &apos;I really don&apos;t love him anymore.&apos;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Will search the whole drive partition for the text string specified between the
single quotes. Searching an entire disk partition several times can be quite
tedious. This particular command string prints the search results to the screen,
with the offset where it is located in the partition. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd&lt;/code&gt; works in the decimal
system. Disk offsets work in hexadecimal. Say you found that text string in your
partition at offset &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;0x020d0d90h&lt;/code&gt;. You convert that to decimal with one of the
many calculators found in Linux. This is decimal offset 34409872. Dividing by
512 per sector we get 67206.78125.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/dev/sda2 bs=16065 skip=2140 count=3 | less
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This will print to the screen so you don’t accidentally write a file over free
disk space, which may hold deleted files you want to search. With this method
you search all the deleted files, any chat activity, and emails. It works no
matter what security is being employed on the machine. It works with NTFS, ext2,
ext3, reiserfs, swap, and FAT partitions. But, it is illegal to use this method
on a computer you aren’t authorized to search. People can be sued, or imprisoned
for unauthorized searches. On a related note, you can write the system memory to
a CD. This is useful for documenting memory contents without contaminating the
HDD. I recommend using a CD-RW so you can practice a little. This doesn’t
involve &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd&lt;/code&gt;, but it’s cool.&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;cdrecord dev=ATAPI:0,1,0 -raw tsize=700000000 driveropts=burnfree /dev/mem
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;to find the cdwriter:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;cdrecord -scanbus=ATAPI
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd&lt;/code&gt; will not copy or erase an HPA or host protected area. If used properly &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd&lt;/code&gt; will erase a disk completely, but not as well as using the hardware secure erase, security erase unit command
This method records raw, so you have to do a:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/dev/hdd | less
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;to view the recorded memory. Searching the recorded memory is as above:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/dev/hdd | hexdump -C | grep &apos;string&apos;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;string is any ascii sequence, hex sequence (must be separated with a space: ‘
55&lt;space&gt;aa&lt;space&gt;09&apos; searches for the hex string &apos;55aa09&apos;),&lt;/space&gt;&lt;/space&gt;&lt;/p&gt;

&lt;p&gt;list:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&apos;[[:alnum:]]&apos; any alphanumeric characters
&apos;[[:alpha:]]&apos; any alpha character
&apos;[[:digit:]]&apos; any numeric character
&apos;[[:blank:]]&apos; tabs and spaces
&apos;[[:lower:]]&apos; any lower case alpha characters
&apos;[[:upper:]]&apos; any uppercase alpha character
&apos;[[:cntrl:]]&apos; ASCII characters 000 thru 037, and 177 octal
&apos;[[:graph:]]&apos; [:alnum:] and [:punct:]
&apos;[[:punct:]]&apos; any punctuation character ` ! &apos; # $ % &apos; ( ) * + - . / : ; &amp;lt; = &amp;gt; ? @ [ \ ] ^ _ { | } ~
&apos;[[:space:]]&apos; tab, newline, vertical tab, form feed, carriage return, and space &apos;[[:xdigit:]]&apos; any hex
digit ranges(&apos;[a-d]&apos; = any, or all abcd, &apos;[0-9]&apos; = any, or all 0123456789)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;You can back up your MBR:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/dev/sda of=mbr.bin count=1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Put this on a floppy you make with:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=boot.img of=/dev/fd0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Along with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd&lt;/code&gt;. Boot from the floppy and&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=mbr.bin of=/dev/sda count=1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Will restore the MBR. I back up all my floppies to HDD. Floppies don’t last
forever, so I do&lt;/p&gt;

&lt;p&gt;Here is a command line to read your BIOS, and interfaces&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/dev/mem bs=1k skip=768 count=256 2&amp;gt;/dev/null | strings -n 8
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;dd-variants&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd&lt;/code&gt; Variants&lt;/h3&gt;

&lt;p&gt;There is a variation of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd&lt;/code&gt; for rescuing data off defective media, such as a
hard drive with some bad sectors. It is called dd_rescue. It is available here&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;http://www.garloff.de/kurt/linux/ddrescue/&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Department of Defense implementation of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd&lt;/code&gt; is called &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dcfldd&lt;/code&gt;, and has some
features like a progress monitor so you can time your trips to get coffee.&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;http://dcfldd.sourceforge.net/&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sdd is useful when input block size is different than output block size, and
will succeed in some instances &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd&lt;/code&gt; fails.&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;http://linux.maruhn.com/sec/sdd.html&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is one of the best links on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd&lt;/code&gt; I haven’t written&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;http://www.softpanorama.org/Tools/dd.shtml&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;sigusr1-notifications-to-stderr&quot;&gt;SIGUSR1 Notifications to STDERR&lt;/h3&gt;

&lt;p&gt;Note that sending a SIGUSR1 signal to a running ‘dd’ process makes it
print to standard error the number of records read and written so far,
then to resume copying.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ `dd` if=/dev/zero of=/dev/null&amp;amp; pid=$!
              $ kill -USR1 $pid; sleep 1; kill $pid

              10899206+0 records in 10899206+0 records out
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;BLOCKS and BYTES may be followed by the following multiplicative suffixes: c 1, w 2, b 512, kB 1000, K 1024, MB 1000&lt;em&gt;1000, M 1024&lt;/em&gt;1024, GB 1000&lt;em&gt;1000&lt;/em&gt;1000, G 1024&lt;em&gt;1024&lt;/em&gt;1024
So,&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/dev/sda of=/dev/sdb bs=1GB
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Will use one gigabyte block sizes.
bs=4b would give &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd&lt;/code&gt; a block size of 4 disk sectors. 1 sector=512 bytes.
bs=4k would indicate &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd&lt;/code&gt; use a 4 kilobyte block size. I have found bs=4k to be the fastest for copying disk drives on a modern machine.&lt;/p&gt;

&lt;p&gt;===== Operands =====
Specifies the input path. Standard input is the default.&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;if=file
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Specifies the output path.
Standard output is the default.&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;of=file
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Skip this many blocks in the output file.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;seek=blocks
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Specifies the input block size in n bytes (default is 512).&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;ibs=n
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Specifies the output block size in n bytes (default is 512).&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;obs=n
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If no conversion other than is specified, each input block is copied to the output as a single block without aggregating short blocks.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sync, noerror, and, notrunc
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Specifies the conversion block size for block and unblock in bytes by n (default is 0). If cbs= is omitted or given a value of 0, using the following produces unspecified results.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;cbs=n
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This option is used only if ASCII or EBCDIC conversion is specified.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;block or unblock
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;operands, the input is handled as described for the unblock operand except that characters are converted to ASCII before the trailing SPACE characters are
deleted.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;ascii and asciib
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;operands, the input is handled as described for the block operand except that the characters are converted to EBCDIC or IBM EBCDIC after the trailing SPACE characters are added.&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;ebcdic, ebcdicb, ibm, and ibmb
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Copies and concatenates n input files before terminating (makes sense only where input is a magnetic tape or similar device).&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;files=n
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Skips n input blocks (using the specified input block size) before starting to copy. On seekable files, the implementation reads the blocks or seeks past them. On non-seekable files, the blocks are read and the data is discarded.&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;skip=n
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Seeks n blocks from beginning of input file before copying (appropriate for disk files, where skip can be incredibly slow).&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;iseek=n
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Seeks n blocks from beginning of output file before copying.&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;oseek=n
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Skips n blocks (using the specified output block size) from beginning of output file before copying. On non-seekable files, existing blocks are read and space from the current end-of-file to the specified offset, if any, is filled with null bytes. On seekable files, the implementation seeks to the specified offset or reads the blocks as described for non-seekable files.&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;seek=n
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Copies only n input blocks.&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;count=n
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Copying options [,value. . . ] Where values are comma-separated symbols from the following list:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;conv=value
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Tells &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd&lt;/code&gt; not to abbreviate blocks of all zero value, or multiple adjacent blocks of zeroes, with five asterisks (when you want to maintain size) Do not use notrunc for copying a larger volume to a smaller volume. Without&lt;/p&gt;

&lt;p&gt;Do not truncate the output file.&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;conv=notrunc
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Converts EBCDIC to ASCII.&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;ascii
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Converts EBCDIC to ASCII using BSD-compatible character translations.&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;asciib
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Converts ASCII to EBCDIC. If converting fixed-length ASCII records without NEWLINEs, sets up a pipeline with&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;ebcdic
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;===== break4 =====&lt;/p&gt;

&lt;p&gt;Slightly different map of ASCII to EBCDIC using BSD-compatible character
translations. If converting fixed-length ASCII records without NEWLINEs, sets up
a pipeline with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd conv=unblock&lt;/code&gt; beforehand. The
ascii (or asciib), ebcdic (or ebcdicb), and ibm (or ibmb)
values are mutually exclusive. block Treats the input as a sequence of
NEWLINE-terminated or EOF-terminated variable-length records independent of the
input block boundaries. Each record is converted to a record with a fixed length
specified by the conversion block size. Any NEWLINE character is removed from the
input line. SPACE characters are appended to lines that are shorter than their
conversion block size to fill the block. Lines that are longer than the
conversion block size are truncated to the largest number of characters that
will fit into that size. The number of truncated lines is reported. unblock
Converts fixed-length records to variable length. Reads a number of bytes equal
to the conversion block size (or the number of bytes remaining in the input, if
less than the conversion block size), delete all trailing SPACE characters, and
append a NEWLINE character. The block and unblock values are mutually exclusive.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;lcase
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Maps upper-case characters specified by the LC_CTYPE keyword tolower to the
corresponding lower-case character. Characters for which no mapping is specified
are not modified by this conversion.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;ucase
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Maps lower-case characters specified by the LC_CTYPE keyword toupper to the
corresponding upper-case character. Characters for which no mapping is specified
are not modified by this conversion. The lcase and ucase symbols are mutually
exclusive.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;swab
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Swaps every pair of input bytes. If the current input record is an odd number of
bytes, the last byte in the input record is ignored.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;noerror
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Does not stop processing on an input error. When an input error occurs, a
diagnostic message is written on standard error, followed by the current input
and output block counts in the same format as used at completion. If the&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sync
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;conversion is specified, the missing input is replaced with null bytes and
processed normally. Otherwise, the input block will be omitted from the output.
notrunc Does not truncate the output file. Preserves blocks in the output file
not explicitly written by this invocation of dd. (See also the preceding
operand.)&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;of=file
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sync
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Pads every input block to the size of the ibs= buffer, appending null bytes. (If
either block or unblock is also specified, appends SPACE characters, rather than
null bytes.)&lt;/p&gt;

&lt;p&gt;ENVIRONMENT VARIABLES&lt;/p&gt;

&lt;p&gt;The following environment variables affect the messages and errors messages of
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;LANG
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Provide a default value for the internationalisation variables that are unset
or null. If&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;LANG
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;is unset or null, the corresponding value from the implementation-dependent
default locale will be used. If any of the internationalization variables
contains an invalid setting, the utility will behave as if none of the variables
had been defined.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;LC_ALL
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If set to a non-empty string value, override the values of all the other
internationalisation variables.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;LC_CTYPE
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Determine the locale for the interpretation of sequences of bytes of text data
as characters (for example, single- as opposed to multi-byte characters in
arguments and input files), the classification of characters as upper- or
lower-case, and the mapping of characters from one case to the other.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;LC_MESSAGES
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Determine the locale that should be used to affect the format and contents of
diagnostic messages written to standard error and informative messages written
to standard output.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;NLSPATH
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Determine the location of message catalogues for the processing of LC_MESSAGES.
it is acknowledged by the author that:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/dev/urandom bs=100 count=1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Is faster than&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/dev/urandom bs=1 count=100
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;With urandom it is possible to read a byte size of 100. With &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/dev/random&lt;/code&gt; you
need to do &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bs=1&lt;/code&gt;. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;urandom&lt;/code&gt; does not have this restriction.&lt;/p&gt;

&lt;p&gt;The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;conv=notrunc&lt;/code&gt; part of the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd&lt;/code&gt; command line is to prevent the output file
from being trucated. The way &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd&lt;/code&gt; behaves is not intuitive. You would think if
you copy a hard drive that &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd&lt;/code&gt; would copy the whole hard drive, but it doesn’t.
It will stop when it gets to all unused sectors, and truncate the copy. For
forensic analysis this is unsuitable, as the MD5sum of the working image must be
the same as the original. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;notrunc&lt;/code&gt; is a good conversion for copying things.&lt;/p&gt;

&lt;p&gt;Although they are part of the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd&lt;/code&gt; command, I didn’t really cover skip or seek.
Seek means to skip that many ouput sized blocks before writing anything. Seek
means to skip that many input sized blocks before reading. For instance, if you
are copying a HDD, and the drives have different MBR’s. Then you don’t want to
read, or write on the first sector. bs defaults to 512 bytes.&lt;/p&gt;

&lt;p&gt;512 bytes is the size of one sector on a hard drive. Partition tables are
written to the MBR. Different drives have different geometries. Modern drives
are all 63 sectors per cylinder with 255 heads. LBA addressing reads all drives
this way. Therefore, partition tables are interchangable between modern drives.
This is only true if the total cylinder count is less on the source than it is
on the target drive. If the source drive contains a partition which will make
the smaller target drive think it has more cylinders that it really does, this
will interfere with making a proper target image. This why, unless the target
drive is bigger than the source, I do not copy the entire drive. But, if you
wish to partition the target first, and skip the MBR on both drives, you can
still have a smaller target than source drive. Here is the command to skip the
MBR, thereby keeping intact different disk geometries.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dd if=/dev/sda of=/dev/sdb seek=1 skip=1 conv=notrunc,noerror.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;When &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd&lt;/code&gt; gets the MAS, or maximum addressable sector on the target, it will
stop. Whatever there was room for will be there.&lt;/p&gt;

&lt;p&gt;It should further be noted that &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dd&lt;/code&gt; is a bitstream duplicator. It copies bit
for bit, regardless of file system, or anything else.&lt;/p&gt;
</description>
        <pubDate>Fri, 06 Nov 2026 00:00:00 +0000</pubDate>
        <link>https://invisiblethreat.ca/tools/2026/11/06/dd-again/</link>
        <guid isPermaLink="true">https://invisiblethreat.ca/tools/2026/11/06/dd-again/</guid>
        
        <category>dd</category>
        
        <category>cli</category>
        
        <category>tools</category>
        
        
        <category>tools</category>
        
      </item>
    
      <item>
        <title>Bypassing Synology&apos;s 32K NFS Block Size Limit with systemd</title>
        <description>&lt;p&gt;The Synology DSM GUI caps NFS read/write packet size at 32K. For a fileserver doing large sequential transfers — media files, backups, VM disk images — that’s leaving throughput on the table. The kernel supports up to 1MB block sizes, and the GUI limit is purely artificial.&lt;/p&gt;

&lt;p&gt;This post documents how to push past it on DSM 7, which uses &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;systemd&lt;/code&gt; under the hood.&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;what-the-setting-actually-controls&quot;&gt;What the setting actually controls&lt;/h2&gt;

&lt;p&gt;The NFS block size (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rsize&lt;/code&gt;/&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;wsize&lt;/code&gt;) determines how much data the client and server exchange in a single NFS operation. Larger blocks mean fewer round trips for the same transfer, which matters most for large sequential reads and writes over a local network.&lt;/p&gt;

&lt;p&gt;The server-side maximum is controlled by a kernel procfs entry:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;/proc/fs/nfsd/max_block_size
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The DSM GUI writes a value into this at boot, but caps it at 32768 (32K). The kernel itself supports 1048576 (1MB).&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;why-you-cant-just-echo-a-value-at-boot&quot;&gt;Why you can’t just echo a value at boot&lt;/h2&gt;

&lt;p&gt;The obvious approach — write &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;1048576&lt;/code&gt; to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;max_block_size&lt;/code&gt; at startup — hits two problems:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem 1:&lt;/strong&gt; Once &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;nfsd&lt;/code&gt; threads are running, the file is locked:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;# echo 1048576 &amp;gt; /proc/fs/nfsd/max_block_size
-ash: echo: write error: Device or resource busy
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Problem 2:&lt;/strong&gt; Even if you write before &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;nfsd&lt;/code&gt; starts, DSM’s NFS service resets the value during its own initialization. The kernel calculates a default block size based on available RAM when &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rpc.nfsd&lt;/code&gt; starts, and that write clobbers yours.&lt;/p&gt;

&lt;p&gt;The window you need is: &lt;strong&gt;after &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/proc/fs/nfsd&lt;/code&gt; is mounted, but before &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;nfsd&lt;/code&gt; threads spawn.&lt;/strong&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;how-dsm-7-starts-nfs&quot;&gt;How DSM 7 starts NFS&lt;/h2&gt;

&lt;p&gt;DSM 7 uses systemd. The NFS startup sequence involves three units:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;proc-fs-nfsd.service   →   [your hook goes here]   →   nfs-server.service
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;proc-fs-nfsd.service&lt;/code&gt; mounts the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;nfsd&lt;/code&gt; filesystem at &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/proc/fs/nfsd&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;nfs-server.service&lt;/code&gt; calls &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/usr/syno/lib/systemd/scripts/nfsd.sh start&lt;/code&gt;, which runs &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rpc.nfsd&lt;/code&gt; and spawns the kernel threads&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;nfs-server.service&lt;/code&gt; runs, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;max_block_size&lt;/code&gt; is locked. You need to write your value between these two units.&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;the-fix&quot;&gt;The fix&lt;/h2&gt;

&lt;p&gt;Create a systemd drop-in unit that slots between &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;proc-fs-nfsd.service&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;nfs-server.service&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;cat&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; /etc/systemd/system/nfs-blocksize.service &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;sh&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;EOF&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;&apos;
[Unit]
Description=Set nfsd max_block_size before NFS server starts
After=proc-fs-nfsd.service
Before=nfs-server.service
Requires=proc-fs-nfsd.service

[Service]
Type=oneshot
ExecStart=/bin/sh -c &apos;echo 1048576 &amp;gt; /proc/fs/nfsd/max_block_size&apos;
RemainAfterExit=yes

[Install]
WantedBy=nfs-server.service
&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;EOF
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Enable it:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;systemctl &lt;span class=&quot;nb&quot;&gt;enable &lt;/span&gt;nfs-blocksize.service
systemctl daemon-reload
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Verify the ordering was picked up:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;systemctl show nfs-server.service | &lt;span class=&quot;nb&quot;&gt;grep&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-i&lt;/span&gt; after
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;You should see &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;nfs-blocksize.service&lt;/code&gt; in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;After=&lt;/code&gt; chain for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;nfs-server.service&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Reboot, then confirm:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;cat&lt;/span&gt; /proc/fs/nfsd/max_block_size
&lt;span class=&quot;c&quot;&gt;# 1048576&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;client-side&quot;&gt;Client side&lt;/h2&gt;

&lt;p&gt;The server-side change only sets the ceiling. Clients still need to request larger block sizes at mount time. On Linux clients, update &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/etc/fstab&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;nas:/volume1/share  /mnt/nas  nfs  rsize=1048576,wsize=1048576,vers=4  0  0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Or test before making it permanent:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;mount &lt;span class=&quot;nt&quot;&gt;-t&lt;/span&gt; nfs &lt;span class=&quot;nt&quot;&gt;-o&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;rsize&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;1048576,wsize&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;1048576,vers&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;4 nas:/volume1/share /mnt/nas
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Verify what was negotiated after mounting:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;nfsstat &lt;span class=&quot;nt&quot;&gt;-m&lt;/span&gt; | &lt;span class=&quot;nb&quot;&gt;grep &lt;/span&gt;rsize
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;notes&quot;&gt;Notes&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;This survives reboots. The systemd unit is persistent.&lt;/li&gt;
  &lt;li&gt;DSM updates may overwrite files in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/usr/lib/systemd/system/&lt;/code&gt; but should leave &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/etc/systemd/system/&lt;/code&gt; alone. If an update breaks it, just re-run &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;systemctl enable nfs-blocksize.service &amp;amp;&amp;amp; systemctl daemon-reload&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;If you’re using NFSv4 exclusively (likely on a modern Linux-only homelab), you only need port &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;2049/tcp&lt;/code&gt; open in your firewall. The additional ports required by NFSv3 (mountd, statd, lockd) are not needed.&lt;/li&gt;
  &lt;li&gt;The DS918+ ships with 4GB of RAM. The kernel’s default block size calculation targets 1MB on machines with that much memory, but DSM’s NFS init script overrides it. This fix restores what the kernel would have chosen anyway.&lt;/li&gt;
&lt;/ul&gt;
</description>
        <pubDate>Wed, 18 Mar 2026 00:00:00 +0000</pubDate>
        <link>https://invisiblethreat.ca/technology/2026/03/18/synology-nfs-blocksize/</link>
        <guid isPermaLink="true">https://invisiblethreat.ca/technology/2026/03/18/synology-nfs-blocksize/</guid>
        
        <category>synology</category>
        
        <category>nfs</category>
        
        
        <category>technology</category>
        
      </item>
    
      <item>
        <title>Something big/small/other is happening.</title>
        <description>&lt;h1 id=&quot;whats-coming&quot;&gt;What’s coming?&lt;/h1&gt;

&lt;p&gt;There’s a back and forth in technology on whether the current AI cycle is all
hype, or a true revolution that is just at the bottom of an exponential curve.
It seems that, like in so many things, a nuanced position is not a popular one.
I think that more than “back and forth” there are are actually three camps that
compose the current balance of the tech world: AI maximalists, AI doomers, and
AI doubters.&lt;/p&gt;

&lt;h2 id=&quot;the-perspectives-at-play&quot;&gt;The Perspectives at Play&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Maximalist view: &lt;a href=&quot;https://shumer.dev/something-big-is-happening&quot;&gt;Something Big is Happening&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Doubter view: &lt;a href=&quot;https://podcasts.apple.com/us/podcast/better-offline/id1730587238?i=1000749543323&quot;&gt;Better Offline: No, Something Big Isn’t Coming&lt;/a&gt;, Ed Zitron of “Where’s Your Ed At”&lt;/li&gt;
  &lt;li&gt;Doomer view: &lt;a href=&quot;https://www.theatlantic.com/technology/archive/2025/08/ai-doomers-chatbots-resurgence/683952/&quot;&gt;The AI Doomers Are Getting Doomier&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;It’s cool to hate on AI view: &lt;a href=&quot;https://x.com/johnpalmer/status/2021966462198460849&quot;&gt;Something Small is Happening&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;the-ai-maximalists&quot;&gt;The AI Maximalists&lt;/h3&gt;

&lt;blockquote&gt;
  &lt;p&gt;This is going to change everything forever.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The “maxi” is all in, all of the time. Maybe they were early, maybe not. Maybe
they missed out on other trends and want to be here first. They are true
believers in what the technology can do and won’t shut up about it.&lt;/p&gt;

&lt;h3 id=&quot;the-ai-doomers&quot;&gt;The AI Doomers&lt;/h3&gt;

&lt;blockquote&gt;
  &lt;p&gt;I hope they put us in the nice part of the human zoo.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A negative-biased version of the “maxi” that believes in the potential, but sees
the outcomes in an almost exclusively negative light. It’s not clear to me if
this group thinks a lack of safety is the issue, or that it’s simply inevitable.&lt;/p&gt;

&lt;h3 id=&quot;the-ai-doubters&quot;&gt;The AI Doubters&lt;/h3&gt;

&lt;blockquote&gt;
  &lt;p&gt;It’s all hype just like the dot-com crash.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I will admit to finding this group the most frustrating and least informed. They
seem to relish mathematical tasks like counting the letter “r” in “strawberry”
and getting to a “look how stupid this thing is!” as quickly as possible.&lt;/p&gt;

&lt;h3 id=&quot;the-ai-hater-bonus&quot;&gt;The AI Hater (Bonus!)&lt;/h3&gt;

&lt;blockquote&gt;
  &lt;p&gt;I went offline before it was cool.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Basically a snotty vegan barista that judges you harshly for your life choices,
but for AI. This is something that I’m trying to engage less with(and be less of
a part of) as I age. I acknowledge that it exists as a perspective, but I just
don’t find it interesting and won’t devote time to it.&lt;/p&gt;

&lt;h2 id=&quot;where-im-atfor-now&quot;&gt;Where I’m At(for now)&lt;/h2&gt;

&lt;p&gt;Presuming that my opinion is worth the bits to get it to your screen, here’s
what I’m thinking about the personas:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;The maximalists are overselling, but not by large degree. Sure, Matt Shumer is
talking exclusively in a way that benefits himself, but that doesn’t make him
wrong. The failure to acknowledge the externalities is aggravating.  Timelines
are up for debate, but given my last several weeks, I think that I’m, reluctantly, in this camp.&lt;/li&gt;
  &lt;li&gt;The doomers love a good spiral. See the panic over Moltbook and the failure
how easy it was to manufacture a story out of the content there.&lt;/li&gt;
  &lt;li&gt;The doubters are judging fish on their ability to climb trees. I think that
they have largely formed opinions on older models, if they’ve tried them at all.
Some of the most ardent critics seem to have adopted “AI Luddite” personas when
models exponentially improving. I’m not sure what is to be gained by being
closed minded to the fact that every lab is trying to improve all of the time.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;things-im-keeping-in-mind&quot;&gt;Things I’m Keeping in Mind&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;The models today are the worst they will ever be barring some training that
goes wrong. Expect improvements on an ongoing basis.&lt;/li&gt;
  &lt;li&gt;From my experience, using AI to get to discrete values is their best use.&lt;/li&gt;
  &lt;li&gt;Replit, as a business, has been replaced by models improving, and projects
like &lt;a href=&quot;https://github.github.com/spec-kit/&quot;&gt;Spec Kit&lt;/a&gt; in a matter of months.
Maybe I’m just late to this?&lt;/li&gt;
  &lt;li&gt;SaaS is in for a world of hurt- especially offerings full of bloat and
distractions. These are going to see the cost on a per seat basis drop. Buyers
are going to have huge amounts of leverage over pricing when they only use 1/3
of the features offered&lt;/li&gt;
  &lt;li&gt;Tired: putting AI in your product. Wired: enabling AI to interact with your
product. The value isn’t in summaries of your data within the platform it’s
housed in, but rather, combining it with disparate data easily. Trying to lock
folks in to a platform will only encourage them to attempt to exit more quickly.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;what-ive-built&quot;&gt;What I’ve Built&lt;/h2&gt;

&lt;p&gt;In the last week, the things I’ve managed to build with minimal effort:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;App to ingest backup reports that were previously emails(and mostly
ignored)&lt;/li&gt;
  &lt;li&gt;App to replace Google’s BigQuery console.&lt;/li&gt;
  &lt;li&gt;App to map, pivot, and merge data from vastly different systems of record&lt;/li&gt;
  &lt;li&gt;App to speed read. Based on Rapid Serial Visual Presentation(RSVP).
Currently attaining 800 WPM on a consistent basis&lt;/li&gt;
  &lt;li&gt;App for home maintenance that can leverage check-ins triggered by NFC tags&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;going-forward&quot;&gt;Going Forward&lt;/h2&gt;

&lt;p&gt;I mostly agree with Shumer that pure coding is solved. Knowing the application
of techniques and understanding the problems that you’re trying to solve really
well is the most value you can have in the day-to-day. Reducing yourself to a
“spec engineer” feels like the best way to be replaced.&lt;/p&gt;

&lt;h4 id=&quot;posse-note&quot;&gt;POSSE Note&lt;/h4&gt;

&lt;p&gt;I own my own content. I subscribe to POSSE: Publish on Own Site, Syndicate
Everywhere. The original location of this content is
&lt;a href=&quot;https://invisiblethreat.ca&quot;&gt;invisiblethreat.ca&lt;/a&gt;.&lt;/p&gt;
</description>
        <pubDate>Wed, 18 Feb 2026 00:00:00 +0000</pubDate>
        <link>https://invisiblethreat.ca/technology/2026/02/18/something-something-is-happening/</link>
        <guid isPermaLink="true">https://invisiblethreat.ca/technology/2026/02/18/something-something-is-happening/</guid>
        
        <category>ai</category>
        
        <category>llm</category>
        
        <category>future</category>
        
        
        <category>technology</category>
        
      </item>
    
      <item>
        <title>Per-domain resolvers in macOS</title>
        <description>&lt;h1 id=&quot;macos-dns-and-you&quot;&gt;macOS, DNS, and you&lt;/h1&gt;

&lt;p&gt;First things first: I don’t fully understand the DNS resolution scheme that
Apple has dreamed up in macOS. Furthermore, I don’t really want to- I just want
things to work in a manner that let’s me get on with my life.&lt;/p&gt;

&lt;h2 id=&quot;the-problem&quot;&gt;The Problem&lt;/h2&gt;

&lt;p&gt;I run a fairly extensive home lab, with lots of projects and resources. I also
run the private DNS suffix &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.lan&lt;/code&gt; to access all of these resources. I make
regular use of these resources for work. This comes into direct conflict with
our access control system for work. If I have the ACL software active, my
resolver address is replaced and I’m unable to access my lab via hostnames.&lt;/p&gt;

&lt;p&gt;However, this isn’t an outright block, I can still resolve things if I specify
the nameserver that I want to use. With this knowledge, I set out to fix access
to my internal hosts. It did not go well. Multiple calls with our ACL provider,
and lots of tampering with things in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/etc/resolv.conf&lt;/code&gt; I was no further ahead.
Deploying &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dnsmasq&lt;/code&gt; via &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;brew&lt;/code&gt; for conditional upstream DNS resolution suffered
from the same issues of being run over when the ACL software was active.&lt;/p&gt;

&lt;p&gt;I eventually stumbled across &lt;a href=&quot;https://medium.com/@jamieeduncan/i-recently-moved-to-a-macbook-for-my-primary-work-laptop-7c704dbaff59&quot;&gt;this article from 2019&lt;/a&gt; about this same thing. I’m not a huge fan of Medium, and the paywall model, so here’s the gist of the solution and a handy script to help you out!&lt;/p&gt;

&lt;h2 id=&quot;the-solution&quot;&gt;The solution&lt;/h2&gt;

&lt;p&gt;The solution is available via &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/etc/resolver/&amp;lt;Private Namespace&amp;gt;&lt;/code&gt;. In my case,
my internal DNS is using the suffix &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.lan&lt;/code&gt;. &lt;em&gt;Edit: this works for any arbitrary
domain or subdomain. You could employ the same solution for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;foo.bar.com&lt;/code&gt; or
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bar.com&lt;/code&gt; and all requests that match the namespace will be routed to that
resolver.&lt;/em&gt;&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sudo mkdir -p /etc/resolver/lan

# 172.18.0.2 is my internal pihole instance, which has an upstream rule that
# points to my authoritative internal DNS server. There are some shell nuances
# about redirection that mean you need to actually either be root, or fully wrap
# the `echo` call in a subshell call to sudo.

echo &quot;nameserver 172.18.0.2&quot; &amp;gt;&amp;gt; /etc/resolver/lan
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;To verify that you now have a private namespace resolver, use the following
command:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;scutil --dns

# ... many other results ...

resolver #10
  domain   : lan
  nameserver[0] : 172.18.0.2
  flags    : Request A records
  reach    : 0x00000002 (Reachable)

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;As an aside &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dig&lt;/code&gt;/&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;host&lt;/code&gt; are using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/etc/resolv.conf&lt;/code&gt; which makes
troubleshooting difficult. Make sure that you’re using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dscacheutil -q host -a
name&lt;/code&gt; instead.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;# will use /etc/reslov.conf, which is contains the ACL resolver address
dig pihole.lan +short

# using the resolution chain from scutil --dns
dscacheutil -q host -a name pihole.lan
name: pihole.lan
ip_address: 172.18.0.2
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;That’s it! It’s done!&lt;/p&gt;

&lt;h2 id=&quot;a-script&quot;&gt;A script&lt;/h2&gt;

&lt;p&gt;This script is the quickest path to a resolution(!). Enjoy!&lt;/p&gt;

&lt;div class=&quot;language-shell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;#!/bin/bash&lt;/span&gt;

&lt;span class=&quot;nv&quot;&gt;RES_PATH&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;/etc/resolver
&lt;span class=&quot;nv&quot;&gt;ZONE&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$1&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;NS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$2&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[[&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-z&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-z&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;]]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;then
  &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Usage: &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$0&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; &amp;lt;zone&amp;gt; &amp;lt;nameserver IP address&amp;gt;&quot;&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;exit &lt;/span&gt;1
&lt;span class=&quot;k&quot;&gt;fi&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# Don&apos;t clobber an existing configuration&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-e&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$RES_PATH&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$1&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;then
  &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;RESOLVER&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cat&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$RES_PATH&lt;/span&gt;/&lt;span class=&quot;nv&quot;&gt;$1&lt;/span&gt;| &lt;span class=&quot;nb&quot;&gt;awk&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;{print $2}&apos;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$1&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; already has a custom resolver at &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$RES_PATH&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$1&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; using &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$RESOLVER&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;exit &lt;/span&gt;1
&lt;span class=&quot;k&quot;&gt;fi&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# I forget if this exists in a clean install, so make sure it exists&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-d&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$RES_PATH&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;then
  &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;sudo mkdir&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-p&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$RES_PATH&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;fi&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# make the file&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo touch&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$RES_PATH&lt;/span&gt;/&lt;span class=&quot;nv&quot;&gt;$1&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# this needs to be encapsulated because redirection is a shell function of the&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# current UID&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;bash &lt;span class=&quot;nt&quot;&gt;-c&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;echo &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;nameserver &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$2&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; &amp;gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$RES_PATH&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$1&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# verify that things have worked&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;RESOLVER&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cat&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$RES_PATH&lt;/span&gt;/&lt;span class=&quot;nv&quot;&gt;$1&lt;/span&gt;| &lt;span class=&quot;nb&quot;&gt;awk&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;{print $2}&apos;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$1&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; now has a custom resolver at &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$RES_PATH&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$1&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; using &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$RESOLVER&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;
scutil &lt;span class=&quot;nt&quot;&gt;--dns&lt;/span&gt; |grep &lt;span class=&quot;nt&quot;&gt;-B1&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-A3&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
</description>
        <pubDate>Sat, 12 Apr 2025 00:00:00 +0000</pubDate>
        <link>https://invisiblethreat.ca/technology/2025/04/12/macos-resolvers/</link>
        <guid isPermaLink="true">https://invisiblethreat.ca/technology/2025/04/12/macos-resolvers/</guid>
        
        <category>macos</category>
        
        <category>technology</category>
        
        <category>dns</category>
        
        
        <category>technology</category>
        
      </item>
    
      <item>
        <title>Exim, ZDI, and the casualties</title>
        <description>&lt;h1 id=&quot;three-months-later--a-reflection&quot;&gt;Three months later- a reflection&lt;/h1&gt;

&lt;p&gt;I didn’t want to immediately post about the mess that was the “Exim VS ZDI” to
give myself some time to see if I still felt the same way given the initial mess
that was created. I still do feel the same way:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Everybody lost.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2 id=&quot;zdi-lost&quot;&gt;ZDI Lost&lt;/h2&gt;

&lt;p&gt;ZDI is supposed to be a professional disclosure organization. Nothing in the
mailing list logs shows professionalism. There are most likely private
communications that will never see the light of day, but again, this is their
business. They are owned, now, by TrendMicro, and most likely have competing
interests of being a disclosure organization, and providing value of some sort
to Trend.&lt;/p&gt;

&lt;h2 id=&quot;security-people-lost&quot;&gt;Security People Lost&lt;/h2&gt;

&lt;p&gt;A late week disclosure on vulnerabilities with incomplete information is a
terrible place to exist. Many questions and few answers just sets people’s time
on fire. Thanks for nothing, ZDI. Given the extremely protracted timelines,
would it have killed ZDI to hold this until the following Monday or Tuesday? All
it does is raise questions around their motivations and the desired end results
of “helping” VS “getting press”.&lt;/p&gt;

&lt;h2 id=&quot;the-exim-project-lost&quot;&gt;The Exim Project Lost&lt;/h2&gt;

&lt;p&gt;I feel like the Exim project, and their users, were the biggest losers out of
all parties. The project was cavalier with the userbase’s trust in the project
and ability to interact with ZDI. They failed to find a way to move forward with
ZDI, at the expense of the reputation of the project’s reputation and the trust
from the users. In reality, if cPanel was not distributing Exim, there would be
far less fanfare around this software.&lt;/p&gt;
</description>
        <pubDate>Tue, 02 Jan 2024 00:00:00 +0000</pubDate>
        <link>https://invisiblethreat.ca/general/2024/01/02/exim/</link>
        <guid isPermaLink="true">https://invisiblethreat.ca/general/2024/01/02/exim/</guid>
        
        <category>disclosure</category>
        
        <category>zdi</category>
        
        <category>exim</category>
        
        <category>users</category>
        
        
        <category>general</category>
        
      </item>
    
      <item>
        <title>AI Regulation</title>
        <description>&lt;h1 id=&quot;ai-regulation&quot;&gt;AI Regulation&lt;/h1&gt;

&lt;p&gt;All of the advancements in generative AI has led to somewhat of a natural
consequence: governments want to get involved. Yay. Of these, the US government
is the one that is able to exert the most influence due to the concentration of
tech giants within its sphere of influence.&lt;/p&gt;

&lt;p&gt;Of note, Sam Altman at OpenAI seems to be in favour of this regulation. My
feeling is that he is attempting be a participant in creating a regulatory moat
for keeping new entrants out of the market by creating barriers for any would-be
competitors.&lt;/p&gt;

&lt;p&gt;The coziness between the largest AI companies and the US government feels very
wrong to me in multiple ways:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;influence and pressure flowing from government to companies&lt;/li&gt;
  &lt;li&gt;internal safeties and biases propagating forward within companies creates a feedback loop of priors that will diminish future probabilistic outcomes.&lt;/li&gt;
  &lt;li&gt;combining the above two items can create paternalistic outcomes that don’t
serve citizens, but rather the interests of those in power&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;americentrism-and-a-failure-to-understand-the-internet&quot;&gt;Americentrism and a failure to understand the internet&lt;/h2&gt;

&lt;p&gt;In hearing all of the talks of regulation from the US government, it really
makes me wonder if anyone within it understands how AI models are trained,
distributed or otherwise used. During that last sentence, I downloaded a model
with 7 billion parameters that runs on my laptop. It’s mine now, forever.&lt;/p&gt;

&lt;p&gt;I’m Canadian, and who is the US government to tell me how act or what to do with
this technology? If I was to build something, would I have to submit to the US
government to do business in the US? Will US-based companies flee to less
restrictive locales? Will this stifle new entrants to the market, with eventual
lessening of competition, and ultimately, innovation?&lt;/p&gt;

&lt;h2 id=&quot;chaotic-actors&quot;&gt;Chaotic actors&lt;/h2&gt;

&lt;p&gt;Did you know that information classified as “top secret” by the US government
that’s leaked to the public creates a real problem for people that hold
clearances? Even though the information is “public” they’ve never been cleared
to view it and it can jeopardize their clearance renewal if they do so.&lt;/p&gt;

&lt;p&gt;Let’s now apply a similar treatment to AI in the US, and any regulatory
framework that companies must reside within. If a foreign entity(company,
country, whatever…) trains or gives a way a &lt;em&gt;vastly&lt;/em&gt; superior model that
companies in the US are forbidden from using, what then? Do they get left
behind? Do they leave the US? Does the government abandon their policies and
tactics(I think we know that this is a non-starter)?&lt;/p&gt;

&lt;p&gt;I can understand with the interest in being seen to be doing something, but at
the same time, I really don’t know how this doesn’t promote incentives around
being headquartered in an innovation-friendly country.&lt;/p&gt;

&lt;h2 id=&quot;information-wants-to-be-free&quot;&gt;Information wants to be free&lt;/h2&gt;

&lt;p&gt;I’m not sure if this is the answer, but I feel that it’s at least &lt;em&gt;something&lt;/em&gt;:
as many open source models as possible. A ubiquity of technology that becomes
anti-fragile to the whims of any one regulator and the ability to easily switch
out models and carry on as you were. Don’t code to a company’s or model’s API,
use an abstraction framework that allows flexibility. This allow for flexibility
and the ability to protect your work, and in the case of paid products, prevent
a hostage situation.&lt;/p&gt;

&lt;p&gt;The pace of innovation is often at odds with regulation, and in the case of AI,
the lack of consideration of second and third order consequences will have an
impact of some magnitude. The current pandering to hysteria around AI is
short-sighted and will lead to outcomes, some predictable, and some not, that
could be avoided.&lt;/p&gt;

</description>
        <pubDate>Tue, 02 Jan 2024 00:00:00 +0000</pubDate>
        <link>https://invisiblethreat.ca/general/2024/01/02/ai-regulation/</link>
        <guid isPermaLink="true">https://invisiblethreat.ca/general/2024/01/02/ai-regulation/</guid>
        
        <category>ai</category>
        
        <category>regulation</category>
        
        <category>americentrism</category>
        
        
        <category>general</category>
        
      </item>
    
      <item>
        <title>Infinity hurts my head</title>
        <description>&lt;h1 id=&quot;infinity-makes-me-question-precision-and-measurement&quot;&gt;Infinity makes me question precision and measurement&lt;/h1&gt;

&lt;p&gt;There is something deeply unsettling to be about the concept of infinity. I’ll
just talk about it in the concept of numbers, not in terms of space, because
that’s its own thing, even if it’s related.&lt;/p&gt;

&lt;p&gt;When conducting interviews for junior candidates, I often give a Body Mass
Index(BMI) challenge. It’s not a particularly hard thing to program, nor is BMI
that great of a measure health for various reasons, but sometimes it leads into
an interesting place.&lt;/p&gt;

&lt;h2 id=&quot;the-bmi-range&quot;&gt;The BMI Range&lt;/h2&gt;

&lt;p&gt;The BMI range is as follows:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;less than 18.5 is underweight&lt;/li&gt;
  &lt;li&gt;18.5 to 25 is ideal&lt;/li&gt;
  &lt;li&gt;greater than 25 and less than 30 is overweight&lt;/li&gt;
  &lt;li&gt;30 and over is overweight
… mostly. You see, in most of the scales, the values published use tenths of a
number, and they have gaps. For instance, this is what the CDC publishes:&lt;/li&gt;
  &lt;li&gt;less than 18.5 is underweight&lt;/li&gt;
  &lt;li&gt;18.5 to 24.9 is ideal&lt;/li&gt;
  &lt;li&gt;25 to 29.9 is overweight&lt;/li&gt;
  &lt;li&gt;30 and over is obese
This looks harmless and reasonable, right? Let me now mess with you.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;the-gaps&quot;&gt;The gaps&lt;/h2&gt;

&lt;p&gt;So, here it is, while you can say that the distance between 24.9 and 25 is one
tenth numerically, in terms of the values that can take place between those two
points is infinite. There is infinite precision to be measured between these
points, even if we lack the instruments to make the measurements. If you have
24.9, with the 9s repeating millions of times, there’s still an infinite range
or precision between that last 9 and the next whole number of 25.&lt;/p&gt;

&lt;p&gt;That’s it. In the physical world, it seems that everything is an approximation,
because actually being able to measure to infinite precision is impossible.&lt;/p&gt;
</description>
        <pubDate>Sat, 19 Nov 2022 00:00:00 +0000</pubDate>
        <link>https://invisiblethreat.ca/general/2022/11/19/infinity/</link>
        <guid isPermaLink="true">https://invisiblethreat.ca/general/2022/11/19/infinity/</guid>
        
        <category>learning</category>
        
        <category>infinity</category>
        
        
        <category>general</category>
        
      </item>
    
      <item>
        <title>2021- The year in review</title>
        <description>&lt;h1 id=&quot;another-year-in-the-books&quot;&gt;Another year in the books…&lt;/h1&gt;

&lt;p&gt;There are a few things that I was able to accomplish in 2021 that I’d like to
talk about, and probably a few others that should be mentioned. The things that
I’ll choose to omit are most likely gross failures to even get a project
started, so it may get kicked ahead to 2022. Maybe.&lt;/p&gt;

&lt;h2 id=&quot;my-internal-conflict&quot;&gt;My Internal Conflict&lt;/h2&gt;

&lt;p&gt;There are not enough hours in the day for me to learn all the things that are
interesting to me. I also find that as a specialize more and more at work, the
more that I want to branch out into other technical realms in order to be more
well rounded. It serves two purposes: I love learning, and I also love to be
self-sufficient. During the year I did find a few places where I could align
some of my technical learning goals with work goals, which was nice. Some of the
things that I wasn’t able to justify for work-purposes are getting rolled over
to 2022, but I haven’t decided on an approach just yet.&lt;/p&gt;

&lt;p&gt;My biggest challenge to learning new technical skills outside of work is the
allocation of time. Spending extra hours in front of a computer after I’m done
work for the day is done can sometimes be a real drain, and I don’t feel like
I’m unplugging. It also interferes with other things that are just as important
to me, like jiu jitsu and mountain biking. I don’t know how to balance it all.
I’ve also found that if I attempt to do technical learning first thing in the
morning, that it quickly leads to me starting work early, which has yet to
result in me walking away from the computer any earlier at the end of the day.
Maybe I have boundary issues? Working on a distributed team that has a -5h to
+4h spread means that there’s always something going on, or someone to chat with
about something that we can improve. Maybe time management should be at the top
of my list for 2022.&lt;/p&gt;

&lt;h3 id=&quot;start-stop-continue-but-in-a-different-order&quot;&gt;Start, Stop, Continue, but in a different order.&lt;/h3&gt;

&lt;p&gt;I find the “start, stop, continue” feedback process the most actionable sort of
way to think about moving forward, but I’ve never applied it to personal
development, so here we go.&lt;/p&gt;

&lt;h3 id=&quot;stop&quot;&gt;Stop&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Using R. I started using R in 2017 when I needed programmatic graphs and it
  fit the bill. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ggplot2&lt;/code&gt; can make some beautiful graphs. My main issue is
  that the &lt;em&gt;I&lt;/em&gt; find the language completely arcane. Between the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;tidyverse&lt;/code&gt;,
  CRAN, and the standard language itself, there’s just too much variety. Too
  many calling conventions, arbitrary naming and syntax conventions , and and
  general lack of uniformity. RStudio is nice, but I find a lot of the tooling
  weak, and the error messages terse enough that I’d never attempt to code
  without access to the internet.&lt;/li&gt;
  &lt;li&gt;Complaining about JavaScript(on the front-end). I haven’t denied the utility
  of JS on the front-end, but I have willfully ignored it as something that
  I’m not willing to spend time learning. I maintain that NodeJS, while
  enormously popular, is a mistake.&lt;/li&gt;
  &lt;li&gt;Saying “yes” to all requests. The ability to be versatile doesn’t always mean
  that you should actually be versatile. The more things that you take on, the
  more obligations and interruptions you accumulate. This can become
  antithetical to deep work and learning.&lt;/li&gt;
  &lt;li&gt;Arguing on technical solutions. If I’m not the person doing the work, all I
  can do is offer my perspective and supporting evidence. If I’m not the one
  implementing, this needs to get to “disagree on the implementation, but
  agree that it’s the path forward”.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;continue&quot;&gt;Continue&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Improving at &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;vim&lt;/code&gt;, more specifically &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;nvim&lt;/code&gt;. I overhauled my &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.vimrc&lt;/code&gt; to be
  an &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;init.vim&lt;/code&gt; in the last few months as part of the exercise and have really
  enjoyed taking the time to attempt to master some of the core features. I’ve
  been using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;vim&lt;/code&gt; for 15 years, and was still using arrows, and many other
  rookie methods. Leaning motions has been great, and I’m finally starting to
  really unlock the power of the “editing first” principles. I’ve been doing
  Python development for smaller projects exclusively in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;vim&lt;/code&gt; and I hope to
  move my Go development into &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;vim&lt;/code&gt; as well.&lt;/li&gt;
  &lt;li&gt;Learning/relearning Python. I dabbled in Python 2.5ish days and it really felt
  like a more structured version of shell(this is an oversimplification, but
  that was my impression at the time). Watching the train-wreck of the 2 to 3
  migration(and the Perl 5 to 6… um, whatever that has turned in to) let me
  put it on the shelf as a “I’ll get back to this at some point” item. I knew
  that web frameworks had popped up, and that the push to Python 3 had picked
  up steam. In coming back in the last year, thing like type checking, and
  overall tooling seem to have really come along. The potential removal of GIL
  is also an exciting possibility moving forward.&lt;/li&gt;
  &lt;li&gt;Learning more abstractions in Go. I’ve spent a bit of time learning
  &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;interface{}&lt;/code&gt;, however, I don’t really find myself using it in projects.
  Generics landing in Go 1.18 mean that there will be more abstractions
  showing up in code bases, and knowing what’s going on will be very useful.&lt;/li&gt;
  &lt;li&gt;Improving SQL. The last year has had me write some queries that went beyond my
  initial comfort, and some were certainly killed by the DB engine for being
  abusive. Refining queries, and really understanding sub-queries and making
  results sets smaller earlier via constraints seems like an easy win. I’ve
  also had to translate queries to other engines that don’t support all of the
  features that I’m used to which has been interesting. Knowing when something
  is specific to an engine will also be important going forward.&lt;/li&gt;
  &lt;li&gt;Knowledge synthesis. I started very deliberate leaning for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;vim&lt;/code&gt; and the
  results have been quite good. I plan to expand the technique into other
  technical realms.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;start&quot;&gt;Start&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Learn some JavaScript. This is only for front-end work(see above comments for
  thoughts on Node). It seems that Next.js is quite popular, and when I ask
  front end devs what framework they’d pick if they were able to start over
  today, and Next.js is almost always the answer. I’ve been doing all sorts of
  work from data generation/collection, to APIs to expose the information, but
  I’ve never done a modern front end to display the results. My last serious
  front end used PHP and tables for layout.&lt;/li&gt;
  &lt;li&gt;Get comfortable with pointers in C. I understand C just fine until folks break
  out multiple levels of indirection with pointers. It’s no wonder that
  dangling pointers and “use after free” bugs are a thing. Sadly it’s outside
  of my current skills to be effective in that area. Also, it’s a good bridge
  to being able to better understand assembly languages and other outputs from
  reverse engineering.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;onward&quot;&gt;Onward&lt;/h2&gt;

&lt;p&gt;Taking the time to reflect on my technical goals for the upcoming year should
help me direct my focus. It also gives me a reference for what I thought was
important to me if these things fail to materialize. Capturing information is
the first step, reviewing and reflecting on it at a later date may actually be
the much more powerful part of the equation.&lt;/p&gt;
</description>
        <pubDate>Sun, 26 Dec 2021 00:00:00 +0000</pubDate>
        <link>https://invisiblethreat.ca/general/2021/12/26/year-in-review/</link>
        <guid isPermaLink="true">https://invisiblethreat.ca/general/2021/12/26/year-in-review/</guid>
        
        <category>learning</category>
        
        <category>tools</category>
        
        
        <category>general</category>
        
      </item>
    
      <item>
        <title>VSCode, GOOS, and you.</title>
        <description>&lt;h2 id=&quot;update-2021-12-26&quot;&gt;&lt;em&gt;Update: 2021-12-26&lt;/em&gt;&lt;/h2&gt;

&lt;p&gt;After being off on a Python adventure for a few months, I had to refactor some
Go code. All of the issues came back. I was incensed. I deleted everything
related to VSCode. Rather than use any of my old configuration, I started from
scratch. I installed all my plugins by hand, and reconfigured &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;settings.json&lt;/code&gt; by
hand. It &lt;em&gt;seems&lt;/em&gt; that there were incompatible settings in my &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;settings.json&lt;/code&gt;
that caused &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;go pls&lt;/code&gt; and the Go plugin in VSCode to spiral out of control. I
haven’t had time to fully debug the exact issue, but everything now works as
expected. I generally dislike “scorched earth” debugging, as it often stops when
things “work” without getting all the way to root cause analysis. In this case,
“working” is good enough and I’ve moved on with my life.&lt;/p&gt;

&lt;h2 id=&quot;vscode--gopls-friends-or-foes&quot;&gt;VSCode &amp;amp; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gopls&lt;/code&gt;: friends or foes?&lt;/h2&gt;

&lt;p&gt;I’ve had issues with VSCode and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gopls&lt;/code&gt; on macOS since it’s been a thing. I was
really excited about it at first, and then the problems started coming:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;unresponsiveness&lt;/li&gt;
  &lt;li&gt;no imports&lt;/li&gt;
  &lt;li&gt;no code hints&lt;/li&gt;
  &lt;li&gt;no IntelliSense&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This generally made the language server not worth using to me, and I reverted to
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;goimports&lt;/code&gt; and friends. I had the feeling of always knowing that a day would
come when the language server would be foisted upon me and I’d have limited
options of what to do about it.&lt;/p&gt;

&lt;p&gt;When leaving my last job I took the time to drag my &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;settings.json&lt;/code&gt; along with
me, just in case, but I tried a fresh install. Things just worked and life was
great. I didn’t give another thought to it, because I had no need to. This all
changed when I found out that I’d be targeting Windows on a project- everything
went sideways.&lt;/p&gt;

&lt;p&gt;The error was opaque and I was back to the above list of issues, minus the
unresponsiveness because most things just weren’t loading. Even the smallest
thing, like not knowing how many return values a function had ground my coding
to a halt. I then truly realized how heavily I depended on the Go toolchain to
help me get to workable code.&lt;/p&gt;

&lt;p&gt;Does this scream “I have a cross-compile issue when starting the language
server?”. It sure didn’t to me.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/code-error.png&quot; alt=&quot;terse error message&quot; /&gt;&lt;/p&gt;

&lt;p&gt;That message didn’t return useful search results, so the debugging continued. On
a whim I tried &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;GOOS=windows code .&lt;/code&gt; and everything was magical. Things just
worked.&lt;/p&gt;

&lt;p&gt;So it seems when dealing with build constrained packages, there needs to be
something that happens when the above situation occurs.&lt;/p&gt;

&lt;p&gt;I ended up testing workspace settings and all was revealed. It feels like there
should be a much more friendly way of getting to this solution through some sort
of detection, but I ended up scripting a solution instead.&lt;/p&gt;

&lt;div class=&quot;language-shell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;#!/bin/bash&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-d&lt;/span&gt; .vscode &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;then
  &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;.vscode directory exists- refusing to overwrite.&quot;&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;exit &lt;/span&gt;1
&lt;span class=&quot;k&quot;&gt;fi

&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;mkdir&lt;/span&gt; .vscode

&lt;span class=&quot;nb&quot;&gt;cat&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;EOT&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt; &amp;gt; .vscode/settings.json
{
    &quot;go.toolsEnvVars&quot;: {
        &quot;GOOS&quot;: &quot;windows&quot;
    }
}
&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;EOT
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

</description>
        <pubDate>Tue, 21 Sep 2021 22:47:19 +0000</pubDate>
        <link>https://invisiblethreat.ca/books/2021/09/21/vscode-goos/</link>
        <guid isPermaLink="true">https://invisiblethreat.ca/books/2021/09/21/vscode-goos/</guid>
        
        <category>golang</category>
        
        <category>goos</category>
        
        <category>vscode</category>
        
        <category>windows</category>
        
        <category>darwin</category>
        
        
        <category>books</category>
        
      </item>
    
      <item>
        <title>Limitless Book review</title>
        <description>&lt;h2 id=&quot;tldr-910&quot;&gt;tl;dr 9/10&lt;/h2&gt;

&lt;p&gt;If you pick up a single skill from the book it will improve your learning
forever. The return on investment is hard ignore.&lt;/p&gt;

&lt;h2 id=&quot;overview&quot;&gt;Overview&lt;/h2&gt;

&lt;p&gt;Limitless is a book on learning by Jim Kwik. It breaks down the components of
learning, and the different modes and strategies of the components. Since
learning is multi-faceted, it makes sense that there are improvements in several
areas that can be leveraged in concert to show fairly large(multiplicative)
result.&lt;/p&gt;

&lt;p&gt;My initial interest was around being able to enhance my reading abilities, as I
seem to have accumulated a rather large backlog of books around my home- each
now lingering in various states of completion, some with, shamefully, spines the
still creak and crack when opened. This had turned into guilt. I’ve been
building a list of new books that I want to read(ending of the gold standard,
physical performance, data science), but the unread pile has been haunting me.
Reading a book that would help me to learn, retain, and potentially help me read
faster seemed like the right investment before tackling the backlog.&lt;/p&gt;

&lt;h2 id=&quot;some-notes-on-notes&quot;&gt;Some notes on Notes&lt;/h2&gt;

&lt;p&gt;Note-taking is covered in this book, but I think it(and lots of other folks)
somewhat miss something that I feel is really foundational to
non-fiction/learning note-taking: &lt;em&gt;take your notes on a sheet of paper&lt;/em&gt;.  This
has several benefits in my opinion:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Brevity. You write what matters and can refer to the text if you need to expand.&lt;/li&gt;
  &lt;li&gt;Underlining/highlighting goes away. I remember seeing textbooks in university that looks like someone had soaked them with a glow stick. It also reduces “capture fatigue” of deciding when to start and stop. It also is influenced by/influences brevity&lt;/li&gt;
  &lt;li&gt;Your words. This allows for context that matters to you. It also allows for ideation on concepts that matter to you, and the takeaway of a sheet of paper.&lt;/li&gt;
  &lt;li&gt;Easy review. You now have a single sheet of paper that makes for quick review. I use giant graph paper folded into four to give me a pamphlet, which I also use as a bookmark.&lt;/li&gt;
  &lt;li&gt;A place to do exercises if needed. There were some reading speed exercises in Limitless that are now incorporated into my notes.&lt;/li&gt;
  &lt;li&gt;Simple review! All of your notes in one place- you don’t have to scan the book for your underlines/notes/etc.&lt;/li&gt;
  &lt;li&gt;Portable. A single sheet/pamphlet/whatever VS an entire book.&lt;/li&gt;
  &lt;li&gt;Loan the book, keep your notes. You also don’t bias another reader with what you think is important. Also, for some reason, writing in books feels wrong to me, like a desecration. Maybe it’s from the years of public school and knowing that books often needed to last decades?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;review&quot;&gt;Review&lt;/h2&gt;

&lt;p&gt;The book has autobiographical components, which are used to illustrate how
learning skills are not fixed and can be improved. This is a powerful message,
however I feel that the story gets repeated/tagged too many times for the
purpose of the book. Other than this relatively minor complaint, I found the
book to be very valuable. For me the most valuable sections were on all in Part
4:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Focus&lt;/li&gt;
  &lt;li&gt;Study&lt;/li&gt;
  &lt;li&gt;Memory&lt;/li&gt;
  &lt;li&gt;Speed reading&lt;/li&gt;
  &lt;li&gt;Thinking(if you haven’t read other books on mental models, this is a good introduction, but I’d recommend The Great Mental Models: General Thinking Concepts as a much more complete introduction)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;focus&quot;&gt;Focus&lt;/h3&gt;

&lt;p&gt;‘Focus’ is something we’re told to do, but not taught to do. At the most basic
form it is targeted meditation for the task at hand. It’s about noting/pushing
out interfering thoughts and staying on task.&lt;/p&gt;

&lt;h3 id=&quot;study&quot;&gt;Study&lt;/h3&gt;

&lt;p&gt;‘Study’ is another thing that we’re told to do, but not taught to do. This
section was a bit more involved that I initially expected. There are things that
are incorporated that I wasn’t expecting either: posture, scents, and baroque
music. Some of the more traditional parts are: spaced repetition and active
recall.&lt;/p&gt;

&lt;h3 id=&quot;memory&quot;&gt;Memory&lt;/h3&gt;

&lt;p&gt;There were exercises in this section that really demonstrated the value in
imagery as it impacts recall. Building vivid stories around things that you need
to remember had me immediately improve my score from a 5/10 to a 10/10. I was
also able to very easily obtain a 10/10 reversing the order as things weren’t
strictly placed, but were in a form that I found much more accessible. To this
day I still struggle slightly with alphabetization, and often find myself
running trough the list in my head to do comparisons, and always in the forward
order. I often think of the comedy sketch where someone is pulled over for a
roadside sobriety test and are asked to recite the alphabet backwards. The
payoff to the sketch is “I couldn’t do that even if I was sober”. It gives me
irrational anxiety as I know that I couldn’t recite the alphabet in reverse.
Furthermore, I know that it’s a waste of time to learn it in reverse, yet the
irrational anxiety persists!&lt;/p&gt;

&lt;p&gt;The concepts of ‘primacy’ and ‘recency’ are covered as the points that most
often facilitate recall. A time block of about 25 minutes is recommended. If
this sounds like a Pomodoro interval to you, that’s because it is.&lt;/p&gt;

&lt;h3 id=&quot;speed-reading&quot;&gt;Speed Reading&lt;/h3&gt;

&lt;p&gt;There’s a lot of information in this space, and lots of conflict. Personally I
found this very valuable, and this is the main reason the book bubbled to the
top of my list. If I can consume faster and retain the same(or more), then the
book becomes a very high leverage item for all future reading and learning.&lt;/p&gt;

&lt;p&gt;I have known since grade school that I read faster than the general population,
but had no real concept of what the general rates are, or where I was in
relation to those numbers. There was an exercise in the book to baseline, some
techniques presented, and then a retest. For me, it gave the following results:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;My initial words-per-minute(WPM) was 378. Population average is 150-200.&lt;/li&gt;
  &lt;li&gt;Post exercises and retesting was 726 WPM. With a little rounding up, that’s 2x, 1.92x if you want to be pedantic about things.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I find it hard to ignore this gain, in a matter of minutes, with relatively
little practice. Committing to regimented practice seems like it had the
potential to push things even further. Almost all of my gains came from using a
visual leader in the form of my finger. The other concept that I feel that will
take time to develop is widening of peripheral vision to chunk words. The
example given in the book is ‘report card’. ‘Report’ has a meaning, as does
‘card’, and when combined, there’s a different meaning- if you’re not chunking
‘report card’ as a single item, there’s processing overhead of pattern
recognition, and the time to access the meaning.&lt;/p&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;Get the book, take the notes, do the exercises. Improve the skills that improve
all other knowledge acquisition pursuits&lt;/p&gt;

&lt;h2 id=&quot;post-script-update-2021-06-01&quot;&gt;Post Script (Update 2021-06-01)&lt;/h2&gt;

&lt;p&gt;The construction of my books was pretty shoddy. The spine was twisted and seemed
partially delaminated. I’m not sure if this was due to, or the cause of, the
covers bowing away from the pages. Maybe it was just this run, or maybe it was
the company that did the binding.&lt;/p&gt;
</description>
        <pubDate>Mon, 31 May 2021 22:47:19 +0000</pubDate>
        <link>https://invisiblethreat.ca/books/2021/05/31/limitless/</link>
        <guid isPermaLink="true">https://invisiblethreat.ca/books/2021/05/31/limitless/</guid>
        
        <category>learning</category>
        
        <category>reading</category>
        
        <category>memory</category>
        
        <category>tools</category>
        
        
        <category>books</category>
        
      </item>
    
  </channel>
</rss>
