summaryrefslogtreecommitdiffhomepage
path: root/tech/cheatsheet.mdwn
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2019-11-16 13:14:46 -0700
committerSean Whitton <spwhitton@spwhitton.name>2019-11-16 13:14:46 -0700
commite19818e5343a71c573037cc7e44ebb670de34266 (patch)
tree4834d1a16f7f7c9bdd9e74aaeb4756d8d2292f4e /tech/cheatsheet.mdwn
parent6c734c75b0749427f233141f8f31436a5cf913c6 (diff)
downloadwiki-e19818e5343a71c573037cc7e44ebb670de34266.tar.gz
add cheatsheet
Diffstat (limited to 'tech/cheatsheet.mdwn')
-rw-r--r--tech/cheatsheet.mdwn20
1 files changed, 20 insertions, 0 deletions
diff --git a/tech/cheatsheet.mdwn b/tech/cheatsheet.mdwn
new file mode 100644
index 0000000..28c3cec
--- /dev/null
+++ b/tech/cheatsheet.mdwn
@@ -0,0 +1,20 @@
+# Debian sysadmin
+
+## Chrooting into an offline EFI-on-LVM-on-LUKS system
+
+It's the LVM part that I don't seem to be able to memorise.
+
+1. `cryptsetup luksOpen /dev/sda2`
+2. `vgscan`
+3. `vgchange`
+4. `mkdir /target`
+5. `mount /dev/vg-foo/lv-bar /target`
+6. `mount /dev/sda1 /target/boot/efi`
+7. `for i in /sys /proc /dev /run; do mount --rbind $i /target$i; done`
+8. `chroot /target /bin/bash`
+
+## Restoring contents of /boot/efi
+
+`grub-install --target=x86_64-efi`
+
+My ThinkPad x220 additionally needs `--force-extra-removable`.