mag37 revised this gist 2 hours ago. Go to revision
1 file changed, 26 insertions
Arch_tricks.md(file created)
| @@ -0,0 +1,26 @@ | |||
| 1 | + | ## Rescue a borked Grub in Arch | |
| 2 | + | ### Boot arch install usb | |
| 3 | + | - list devices with `lsblk` | |
| 4 | + | ### mount root drive | |
| 5 | + | - if LUKS: | |
| 6 | + | - `cryptsetup luksOpen /dev/sda2 myEncryptedVolume` | |
| 7 | + | - `mount /dev/mapper/myEncryptedVolume /mnt` | |
| 8 | + | - if BTRFS: | |
| 9 | + | - `mount -o subvol=@ /dev/sda2 /mnt` | |
| 10 | + | - if LUKS+BTRFS: | |
| 11 | + | - `mount -o subvol=@ /dev/mapper/myEncryptedVolume /mnt` | |
| 12 | + | - if vanilla: | |
| 13 | + | - `mount /dev/sda2 /mnt` | |
| 14 | + | ||
| 15 | + | ### mount boot drive | |
| 16 | + | - `mount /dev/sda1 /mnt/boot` | |
| 17 | + | ||
| 18 | + | ### Chroot and re-install grub | |
| 19 | + | ```bash | |
| 20 | + | # chroot to the root partition | |
| 21 | + | arch-chroot /mnt | |
| 22 | + | # reinstall grub | |
| 23 | + | grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB | |
| 24 | + | # generate new grub config | |
| 25 | + | grub-mkconfig -o /boot/grub/grub.cfg | |
| 26 | + | ``` | |
Newer
Older