Uly.me

cloud engineer

  • Home
  • About
  • Archives
Home/Cloud/Chroot A Boot Disk

August 19, 2019

Chroot A Boot Disk

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

Filed Under: Cloud, Linux Tagged With: attach, chroot, disk, rescue

Content delivered to your email

About Me

I'm Ulysses, a Cloud Engineer at Cardinal Health based in Columbus, Ohio. I’m a certified AWS Solutions Architect. This website is my way of documenting the things I have learned in the Cloud. When off the grid, I enjoy riding my electric skateboard. I have surfed, snowboarded and played the saxophone in the past. I hope you will find this site helpful. It's powered by WordPress and hosted in AWS LightSail.

  • Cloud
  • Linux
  • Git

Copyright © 2012–2021