Skip to content

Instantly share code, notes, and snippets.

@uglide
Last active March 14, 2024 02:28
Show Gist options
  • Star 29 You must be signed in to star a gist
  • Fork 16 You must be signed in to fork a gist
  • Save uglide/5f6f23903dac6b5f2567 to your computer and use it in GitHub Desktop.
Save uglide/5f6f23903dac6b5f2567 to your computer and use it in GitHub Desktop.
Chroot to Installed system on LVM
#!/bin/bash
fdisk -lu
pvscan
vgscan
vgchange -a y
lvscan
mount /dev/ubuntu-vg/root /mnt
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
mount /dev/sda2 /mnt/boot
mkdir /mnt/boot/efi || true
mount /dev/sda1 /mnt/boot/efi
chroot /mnt
@omkarbolake94
Copy link

omkarbolake94 commented Jun 4, 2023

Hi
I have separate boot disk. How to resolve that

@a5pire
Copy link

a5pire commented Mar 14, 2024

This saves me nuking my install. Legendary, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment