Added Makefile, updated theme, using fork of even theme
This commit is contained in:
141
content/post/archinstall.md
Normal file
141
content/post/archinstall.md
Normal file
@@ -0,0 +1,141 @@
|
||||
---
|
||||
title: "Installing ArchLinux with Full Disk Encryption (LUKS)"
|
||||
date: 2018-12-19T22:35:11-05:00
|
||||
categories: ["Tutorial"]
|
||||
tags: ["linux"]
|
||||
---
|
||||
This is a guide written on how to install Arch Linux using LUKS for disk encryption, and Systemd-boot as the bootloader.
|
||||
<!--more-->
|
||||
It is assumed that the reader has basic linux knowledge and understands that examples are given via output commands.
|
||||
The reader may always consult manpages, the [Arch Wiki](https://wiki.archlinux.org/), or other documentation to build a better understanding of the tools and methods used.
|
||||
|
||||
---
|
||||
|
||||
# Partitioning
|
||||
1. Create a partition scheme using partitioner of choice (e.g. `gdisk`, `fdisk`, `cgdisk`).
|
||||
- First partition should be EFI/boot partition at around 256MB+ (type: `ef00`)
|
||||
- Second partition should be Linux LVM partition using rest of disk space (type: `8e00`)
|
||||
1. Make the the EFI/boot partition FAT32 via `mkfs.fat -F32`
|
||||
|
||||
# Encryption
|
||||
1. Format the Linux LVM partition:
|
||||
```
|
||||
# cryptsetup luksFormat /dev/sdaN
|
||||
Enter passphrase:
|
||||
```
|
||||
**Note:** _Remember your passphrase! You will need this every time you boot your computer_
|
||||
1. Create a mapping for your Linux LVM (LUKS):
|
||||
```
|
||||
# cryptsetup open --type luks /dev/sdaN <map_name>
|
||||
```
|
||||
_Use whatever name you want. Ex. `lvm`, `volume`, etc._
|
||||
1. Create the physical volume, volume group, and logical volumes for `<map_name>` specified in the previous step:
|
||||
```
|
||||
# pvcreate /dev/mapper/<map_name>
|
||||
# vgcreate <volume_name> /dev/mapper/<map_name>
|
||||
```
|
||||
_Use whatever volume name you want. Ex. `volume`, `main`, `linux`, etc._
|
||||
```
|
||||
# lvcreate -L2G <volume_name> -n swap
|
||||
```
|
||||
_Select size for swap, if desired. Here we use `2G` for 2Gb._
|
||||
```
|
||||
# lvcreate -L16G <volume_name> -n root
|
||||
# lvcreate -l 100%FREE <volume_name> -n home
|
||||
```
|
||||
1. Specify and write the desired filesystems:
|
||||
```
|
||||
# mkfs.ext4 /dev/mapper/<volume_name>-root
|
||||
# mkfs.ext4 /dev/mapper/<volume_name>-home
|
||||
# mkswap /dev/mapper/<volume_name>-swap
|
||||
```
|
||||
|
||||
# Install Linux
|
||||
1. Mount the boot partition and logical volumes for installation:
|
||||
```
|
||||
# mount /dev/mapper/<volume_name>-root /mnt
|
||||
# mkdir /mnt/home
|
||||
# mkdir /mnt/boot
|
||||
# mount /dev/mapper/<volume_name>-home /mnt/home
|
||||
# mount /dev/sdaN /mnt/boot
|
||||
# swapon /dev/mapper/<volume_name>-swap
|
||||
```
|
||||
|
||||
1. Install the base system (_Assuming you have internet connectivity. Use `wifi-menu`, or other, to connect to the internet at this point._):
|
||||
```
|
||||
# pacstrap /mnt base base-devel
|
||||
```
|
||||
|
||||
# Set-up Linux Installation
|
||||
1. Generate the `fstab`:
|
||||
```
|
||||
# genfstab -p /mnt >> /mnt/etc/fstab
|
||||
```
|
||||
|
||||
1. Move into the installation:
|
||||
```
|
||||
# arch-chroot /mnt
|
||||
```
|
||||
|
||||
1. Configure `initramfs`:
|
||||
1. Edit `HOOKS` in `/etc/mkinitcpio.conf` using text editor of your choice (e.g. `vi`, `nano`, etc.). Move the `keyboard` hook before `filesystems`, and add `encrypt` and `lvm2` hooks **before** `filesystems`:
|
||||
```
|
||||
# egrep '^HOOKS' /etc/mkinitcpio.conf
|
||||
HOOKS=(base udev autodetect modconf block keyboard encrypt lvm2 filesystems fsck)
|
||||
```
|
||||
_Read the comment documentation on `HOOKS` in the document to find out more._
|
||||
|
||||
1. Generate `initramfs`:
|
||||
```
|
||||
# mkinitcpio -p linux
|
||||
```
|
||||
|
||||
1. Install a bootloader (e.g. `systemd-boot`, `grub`, `syslinux`, etc.):
|
||||
1. I will be using `systemd-boot`
|
||||
```
|
||||
# bootctl --path=/boot/ install
|
||||
```
|
||||
|
||||
1. Edit the loader configuration using a text editor of your choice:
|
||||
```
|
||||
# cat /boot/loader/loader.conf
|
||||
default arch
|
||||
timeout 3
|
||||
editor 0
|
||||
```
|
||||
|
||||
1. Create the loader entry for the default `arch` entry specified above (_You can edit this name if desired._). Use `blkid /dev/sdaN` to find the UUID of your crypt device, and recall the volume name you gave your device above (_`main` in example below_):
|
||||
```
|
||||
# cat /boot/loader/entries/arch.conf
|
||||
title Arch Linux
|
||||
linux /vmlinuz-linux.img
|
||||
initrd /initramfs-linux.img
|
||||
options cryptdevice=UUID=9f1fc119-b1dc-49d8-9a5a-686ad9e2fd2e:volume root=/dev/mapper/main-root quiet rw
|
||||
```
|
||||
|
||||
1. Create a root password using `passwd`.
|
||||
1. Set a hostname:
|
||||
```
|
||||
# echo "<your_hostname>" > /etc/hostname
|
||||
```
|
||||
|
||||
1. Set up the time:
|
||||
```
|
||||
# ln -fs /usr/share/zoneinfo/<continent>/<city/place> /etc/localtime
|
||||
# hwclock --systohc --utc
|
||||
```
|
||||
|
||||
1. Set the locale to `en_US`:
|
||||
```
|
||||
# sed -i 's/^\#en_US/en_US/' /etc/locale.gen
|
||||
# locale-gen
|
||||
# locale > /etc/locale.conf
|
||||
```
|
||||
|
||||
1. Done!
|
||||
```
|
||||
# exit
|
||||
# unmount -R /mnt
|
||||
# reboot
|
||||
```
|
||||
|
||||
@@ -3,9 +3,6 @@ title: "Make Your Ears Bern"
|
||||
date: 2018-01-11T04:26:57+01:00
|
||||
categories: ["Blog"]
|
||||
tags: ["electronics"]
|
||||
thumbnailImagePosition: top
|
||||
thumbnailImage: "/img/headphone-fix/thumbnail.jpg"
|
||||
coverImage: "/img/headphone-fix/IMG_7518.jpg"
|
||||
---
|
||||
A colleague offered a pair of Bern Bluetooth drop-in headphones to me fore free, with the catch being: _I had to fix them_
|
||||
|
||||
@@ -17,7 +14,7 @@ A colleague offered a pair of Bern Bluetooth drop-in headphones to me fore free,
|
||||
|
||||
Past mistakes have taught me to be gentle and patient when it comes to taking things apart. This was no exception either. After looking over the unit on each side, I figured the only way *in* was lifting the mesh cover off. So I went at it, carefully, with a pair of tweezers. I worked my way around the edge and wedged the mesh upwards.
|
||||
|
||||
{{< image classes="fancybox clear center nocaption" src="/img/headphone-fix/IMG_7505.jpg" >}}
|
||||

|
||||
|
||||
# Okay, Maybe Turn It On
|
||||
|
||||
@@ -27,8 +24,11 @@ Now that the problematic speaker side was successfully opened without any damage
|
||||
|
||||
I played a song via smartphone on the speakers. The result was as expected: _the right speaker put out no sound._ I checked the known-good left speaker using my **Rigol 1074Z** oscilloscope. This may not have been entirely necessary, but I wanted to find out what to expect when troubleshooting the right channel.
|
||||
|
||||
{{< image classes="fancybox fig-50" group="turniton" src="/img/headphone-fix/IMG_7506.jpg" title="Left Speaker" >}}
|
||||
{{< image classes="fancybox clear fig-50 right" group="turniton" src="/img/headphone-fix/IMG_7511.jpg" title="Right Speaker">}}
|
||||
### Left Speaker
|
||||

|
||||
|
||||
### Right Speaker
|
||||

|
||||
|
||||
Knowing what to expect on the oscilloscope, I hooked up the probe to the right, problematic, speaker. The result was much different, indicating either noise or an open circuit. It may be worth mentioning that the right speaker was disconnected at this point in time to ease the troubleshooting process.
|
||||
|
||||
@@ -38,15 +38,15 @@ Knowing what to expect on the oscilloscope, I hooked up the probe to the right,
|
||||
|
||||
Lucky for me the PCB pads were labeled -- even better `SPKL+` (_left_) and `SPKR+` (_right_) were easy to find.
|
||||
|
||||
{{< image classes="fancybox clear center" src="/img/headphone-fix/IMG_7507.jpg" >}}
|
||||

|
||||
|
||||
Outside of the bluetooth board hidden under the piece of tape, there's not a whole lot going on in the circuit. It was my guess that the visible surface mount QFN chip was most likely the op-amp used for the speakers. A quick Google search of `AIWI TI` (_as shown in the photograph_) resulted in [the following datasheet](http://www.ti.com/lit/ds/symlink/tpa6132a2.pdf) which verified that to be the case.
|
||||
|
||||
{{< image classes="clear center" src="/img/headphone-fix/TPA6132A2.png" title="TPA6132A2 QFN Pinout" >}}
|
||||
<center</center>
|
||||
|
||||
**Bingo!** Now knowing the pinout, I could use my trusty multimeter (_a Fluke 115_) to test continuity of the circuit from the known-good and the now known-bad speaker traces back to the `OUTL` and `OUTR` outputs of the amplifier.
|
||||
|
||||
{{< image classes="fancybox clear center" src="/img/headphone-fix/IMG_7514.jpg" >}}
|
||||

|
||||
|
||||
Removing the board from the housing required a bit of finesse. I didn't want to bother desoldering the left speaker connections to make removal easier. So, with a bit of gentle back and forth I was able to get it the PCB out and inspect traces on the bottom side.
|
||||
|
||||
@@ -60,7 +60,7 @@ After a few minutes of scratching my head and repeatedly going over the datashee
|
||||
|
||||
Using the 3.5mm mini-jack's solder pads, I found continuity to be true from the chips left and right outputs to the conveniently accessible solder pads. _A bodge wire was in order_..
|
||||
|
||||
{{< image classes="fancybox clear center" src="/img/headphone-fix/IMG_7515.jpg" >}}
|
||||
!(/img/headphone-fix/IMG_7515.jpg)
|
||||
|
||||
# All's Well That Ends Well
|
||||
|
||||
@@ -68,6 +68,6 @@ Using the 3.5mm mini-jack's solder pads, I found continuity to be true from the
|
||||
|
||||
Again, using my trusty Fluke 115, I verified continuity from the chip's `OUTR` pin to `SPKR+`. Lo and behold it was now closed-circuit! I was very happy to see the expected waveform from the known-good left channel now also appearing on the right channel.
|
||||
|
||||
{{< image classes="fancybox clear center" src="/img/headphone-fix/IMG_7516.jpg" >}}
|
||||

|
||||
|
||||
At this point I quickly re-soldered the wires to the speaker and enjoyed music now coming into both ears!
|
||||
@@ -3,8 +3,6 @@ title: "Humble Beginnings"
|
||||
date: 2017-12-21T01:42:57-05:00
|
||||
categories: ["Blog"]
|
||||
tags: ["code"]
|
||||
thumbnailImagePosition: top
|
||||
thumbnailImage: "/img/humble-beginnings/main.png"
|
||||
---
|
||||
After running into too many road blocks I've decided to go with the [**Tranquilpeak**](https://github.com/kakawait/hugo-tranquilpeak-theme) theme for this site. Before this, I was really looking forward to using the [**Tracks**](https://github.com/ageekymonk/hugo-tracks-theme) theme (ported from WordPress)
|
||||
<!--more-->
|
||||
@@ -17,12 +15,12 @@ If you want a general overview, feel free to check out the relevant [commit](htt
|
||||
|
||||
Right off the bat I noticed the navigation bar seemed a bit off, to say the least:
|
||||
|
||||
{{< image classes="center" src="/img/humble-beginnings/header-problem.png" title="Navbar Issue" >}}
|
||||
<center></center>
|
||||
|
||||
The links showed as numbers and pointed to `/0`, `/1`, and `/2` respectively. These, of course, lead to 404s.
|
||||
|
||||
|
||||
{{< image classes="center" src="/img/humble-beginnings/404.png" title="404 Page - Should probably make this look a bit better, eventually..">}}
|
||||
<center></center>
|
||||
|
||||
This didn't seem like the intended behavior, so I kept digging. Eventually, I found out the problem lied in the usage of the `.Site.Sections` variable used in a loop to populare items in the page header.
|
||||
|
||||
@@ -55,7 +53,7 @@ Looking at other template files in the theme's layout, I stumbled on a chunk of
|
||||
|
||||
The original uses the `.Site.Sections` variable, which I replaced with `.Site.Params.navlinks`. **This** seemed like intended behavior as the user-defined `config.toml` nav links weren't ever utilized or populated anywhere on the site.
|
||||
|
||||
{{< image classes="center clear" src="/img/humble-beginnings/tracks-config.png" title="Nav Links from Tracks Theme config">}}
|
||||
<center></center>
|
||||
|
||||
I borrowed the code found in `layouts/partials/sidebar.html` (*which also never appears to be used*) to include the nav links and get my desired behavior:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user