Here’s a quick way to setup a chrooted environment.
mkdir /helper for i in proc sys dev; do mount o bind /$i /helper/$i; done chroot /helper |
cloud engineer
Here’s a quick way to setup a chrooted environment.
mkdir /helper for i in proc sys dev; do mount o bind /$i /helper/$i; done chroot /helper |
mkdir /helper for i in proc sys dev; do mount o bind /$i /helper/$i; done chroot /helper
Here’s a quick way to chroot another boot disk. Attach the rescued boot disk first. Run lsblk and mount.
lsblk mount -t xfs -o nouuid /dev/xvdf2 /mnt mount --bind /proc /mnt/proc mount --bind /sys /mnt/sys mount --bind /dev /mnt/dev chroot /mnt cd /mnt exit |
lsblk mount -t xfs -o nouuid /dev/xvdf2 /mnt mount --bind /proc /mnt/proc mount --bind /sys /mnt/sys mount --bind /dev /mnt/dev chroot /mnt cd /mnt exit
Unmount when done.
umount /mnt/proc umount /mnt/dev umount /mnt/sys umount /mnt |
umount /mnt/proc umount /mnt/dev umount /mnt/sys umount /mnt