how to chroot, simple and fast [Archive] - Ubuntu Forums

Pick up a liveCD, version doesn't matter, you could use any distro, as long as it ables you to enter to console.


# means run with root or sudo

1. Create a mountpoint
# mkdir /mount/point

2. Mount /proc /sys /dev to chroot
# mount -o bind /proc /mount/point/proc
# mount -o bind /dev /mount/point/dev
# mount -o bind /dev/pts /mount/point/dev/pts
# mount -o bind /sys /mount/point/sys

3. Copy resolv.conf to networking
# cp /etc/resolv.conf /mount/point/etc/resolv.conf

4.Open bash in chroot
# chroot /mount/point /bin/bash

5. Do what you have to do and then exit chroot
exit

there may be more elegant way of achieving this, but this one has stuck to me.

Hope this helps someone, this is probably posted on multiple sites, but what the heck, now no need to search around ;)

how to chroot, simple and fast [Archive] - Ubuntu Forums: "- Sent using Google Toolbar"

Comments

Elstel said…
Wow, this article is good, a friend recently asked me about this, I will refer her to your post. chroot

Popular posts from this blog

How to use the Inbox Repair Tool to recover messages in Outlook 2000 that is installed with Internet Mail Only option

Repair corrupt Outlook PST files with two Microsoft utilities

Repair corrupt Outlook PST files with two Microsoft utilities