Skip to content

Instantly share code, notes, and snippets.

@uglide

uglide/chroot.sh

Last active Feb 28, 2021
Embed
What would you like to do?
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment