chroot 最簡單的作法

用 gentoo 的 stage3-x86-2008.0.tar.bz2

建一個 /chroot 目錄 , 把 stage3-x86-2008.0.tar.bz2 解到這目錄 , 要 copy 這幾個 file 到 /chroot 下對應的目錄, /etc/resolv.conf /etc/fstab

下 chroot /chroot /bin/bash 就進入到 gentoo 預建好的 tree 中了 ,

要 env-update ; source /etc/profile

另外可以把 /chroot/etc/passwd 那邊有關帳號的修改一下, 譬如取消 root 帳號