Skip to content

Instantly share code, notes, and snippets.

View utzig's full-sized avatar

Fabio Utzig utzig

  • Brazil
View GitHub Profile

Arch Install Guide 2025 - PART 1

Secure Boot and Encrypted Device

Precursor

This guide will install Arch Linux on a Secure Boot enabled drive using block level at-rest LUKS encryption with passwordless unlocking using TPM. TPM will issue an passkey if and only if Secure Boot is enabled and the system firmware has not been altered. We will also be creating a unified kernel image so that we can boot Linux directly in the EFI partition without requiring a boot loader.

We will also be creating a backup key to enable booting of the drive in case of BIOS upgrade or other event that may make TPM not serve the key. The code should obviously be stored securely elsewhere off system.

Extra packages:

dkms bc linux-headers lvm2 efibootmgr

Create encrypted partitions:

# cryptsetup luksFormat /dev/nvme0n1p3
@utzig
utzig / arch_linux_installation_guide.md
Created December 20, 2024 23:21 — forked from mjkstra/arch_linux_installation_guide.md
A modern, updated installation guide for Arch Linux with BTRFS on an UEFI system
@utzig
utzig / performance-package-lock.diff
Last active June 5, 2023 13:47
Update performance package dependencies
diff --git a/package-lock.json b/package-lock.json
index e7a83a6..17f0c07 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -7478,7 +7478,7 @@
},
"node_modules/basic-auth": {
"version": "2.0.1",
- "resolved": "https://artifactory.banno-tools.com/artifactory/api/npm/npm/basic-auth/-/basic-auth-2.0.1.tgz",
+ "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz",
@utzig
utzig / sdk-mcuboot-swap-move-fix2.diff
Created February 8, 2023 00:53
Swap move reset fix
--- sdk-mcuboot-1.9.99-ncs1/boot/bootutil/src/swap_move.c.orig 2022-05-24 08:15:45.000000000 -0300
+++ sdk-mcuboot-1.9.99-ncs1/boot/bootutil/src/swap_move.c 2023-02-07 21:50:22.259499220 -0300
@@ -47,7 +47,26 @@
#define BOOT_STATUS_ASSERT(x) ASSERT(x)
#endif
-static uint32_t g_last_idx = UINT32_MAX;
+uint32_t
+find_last_idx(struct boot_loader_state *state, uint32_t swap_size)
+{
@utzig
utzig / flash_map.c
Created July 2, 2020 12:16 — forked from aport/flash_map.c
MCUBoot flash_map layer for ChibiOS
#include <hal.h>
#include <flash_map_backend/flash_map_backend.h>
#include <bootconf.h>
/* License this file however you want, feel free to do anything */
/*
* This depends on a file bootconf.h which contains the following information:
@utzig
utzig / infosec_newbie.md
Created May 30, 2020 14:43 — forked from mubix/infosec_newbie.md
How to start in Infosec
@utzig
utzig / gist:1daf05bc449255ebd68d19aad8c03be6
Created November 29, 2019 15:21 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@utzig
utzig / penetration.md
Last active January 17, 2026 02:33
Penetration Resources
@utzig
utzig / nffs_dump.txt
Created April 8, 2019 13:23
NFFS inspect
Disk Area 0
magic: good
length: 4096
version: 1
gc_seq: 4
id: 255 (scratch)
Free space: 4048
Disk Area 1
magic: good
length: 4096