Skip to content

Instantly share code, notes, and snippets.

@garfbargle
garfbargle / repair-boot.sh
Created August 20, 2026 15:55
nucchuck live-usb boot repair
#!/usr/bin/env bash
# Fix NUC boot from an Ubuntu *live USB* (not from the broken installed GRUB).
# On the live system: Ctrl+Alt+F2, then: sudo bash repair-boot.sh
#
# Rewrites grub.cfg (stale sda /boot UUID), regenerates initramfs with LVM,
# and hides the GRUB menu.
set -euo pipefail
if [[ "$(id -u)" -ne 0 ]]; then
echo "sudo $0" >&2
0x3D7be46D44D3abB445cf5F5D5B230a49caf3167D
### Keybase proof
I hereby claim:
* I am garfbargle on github.
* I am c0di (https://keybase.io/c0di) on keybase.
* I have a public key ASCAOp4Upn_arxTnVo-TbqYWVmlNFtqDut9TxTyis7sOiQo
To claim this, I am signing this object: