Home > computers > linux > chroot > ChrootIntoClonedMachine | About

When you chroot into a machine you just cloned with rsync, you can't really do anything useful because no device is created. Some crucial files and directories need to be borrowed from the "host" system, you can do this with the following commands (thanks to drmagoo for this tip) :

mount --bind /proc /target/proc
mount --bind /dev /target/dev
# This one is needed for ssh access
mount --bind /dev/pts /target/dev/pts
mount --bind /sys /target/sys
chroot /target

Now most commands should work. Make sure though that files belong to the good owner. Use rsync –no-numeric-ids if necessary when cloning the machine.

contact : @ychaouche yacinechaouche at yahoocom

QR Code
QR Code chrootintoclonedmachine (generated for current page)