Last active
November 18, 2024 19:44
-
-
Save uglide/5f6f23903dac6b5f2567 to your computer and use it in GitHub Desktop.
Chroot to Installed system on LVM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
cheers
Hi
I have separate boot disk. How to resolve that
This saves me nuking my install. Legendary, thank you!
For ubuntu you need mount --rbind
. Thanks :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you so much!! This is a lifesaver.