Skip to main content

The millennium-files

If I understand things correctly Millennium and The X-files coexist in the same weird universe.

However, as I'm suffering through the third and final season of Millennium I noticed that in the episode Human Essence when Agent Emma Hollis is passing down an apartment building hallway, from within the first apartment in the hall we can hear a television set, with the volume cranked up to max. As Emma prepares to knock we can hear Agent Scully scream from inside,

"Mulder! Do we have it? Do we have the kill switch?!?"

Needless to say, the resident was immersed in watching one of my favorite The X-Files episode Kill Switch written by William Gibson and Tom Maddox

This really confused me. Googling on this I found that there seems to be a lot of more or less obvious references to X-files in Millenium, many of which I apparently slept through.

I don't know if this is worth pondering but it's at least a fun bit of mindfucking trivia.

Mount LUKS encrypted SD card at boot up

This is a note-to-self and robbery from HOWTO: Automatically Unlock LUKS Encrypted Drives With A Keyfile by Stephan Jau.

My libreboot x200 has a 250GB SSD and it sometimes feels a little bit too small and I had a 64GB SD card lying around and decided to try to set it up a semi-permanent second storage with these goals in mind:

  • LUKS/dm-crypt encrypted.

  • Auto mount at boot.

The idea

We encrypt the SD card with a key file that lives in the encrypted primary volume-group so during boot up we first decrypt the root file system and then the SD card.

In hindsight maybe I should have extended the primary root volume group using LVM instead but let's get started!

Delete any partitions

Since we are dealing with a smallish SD card I see no point of having partitions.

# fdisk /dev/sdX

Then 'd' (repeatedly) to delete any partitions followed by 'w' to write the changes.

Create 4096 random bit keyfile

We create a 4066 bit keyfile and make it readable only to root.

# dd if=/dev/urandom of=/root/keyfile bs=1024 count=4

# chmod 0400 /root/keyfile

Setting up LUKS

In this step we will encrypt the device with our keyfile and setup a file system (ext4).

We assume the SD card is located at /dev/sdX.

# cryptsetup --key-file /root/keyfile luksFormat /dev/sdX

# cryptsetup --key-file /root/keyfile open --type luks /dev/sdX mappingName

# mkfs.ext4 /dev/mapper/mappingName

# cryptsetup close mappingName

Setting up boot stuff

First find the UUID of the device.

# blkid /dev/sdX

Suppose it is 727cac18-044b-4504-87f1-a5aefa774bda.

Add the following line to /etc/crypttab:

sdX_crypt /dev/disk/by-uuid/727cac18-044b-4504-87f1-a5aefa774bda/root/keyfile luks

Then finally add the following to /etc/fstab:

/dev/mapper/sdX_crypt /media/hav0 ext4 defaults 0 2

That it! Try it out by executing mount -a.

break

I just made the decision to take a break from my studies. I've been thinking about this for a while now but I just now made up my mind about it.

The last semester really burned me out, studying mathematics full time on a fairly advanced level is time consuming, fucking hard and exhausting.

As the fall semester approaches I can't muster up the energy to go on with this right now.

The plan is to get a shitty job and work during the autumn and winter, become super bored and then continue with my mathematics with renewed motivation and energy.

This is scary but a little liberating and exciting at the same time. Let's see how things turn out.

Update 2021: lol it didn't turn out so great.