From Funtoo
< Install
Revision as of 10:14, April 8, 2021 by Mmwweettyy (talk | contribs) (Created page with "你还需要复制 {{f|resolv.conf}},以便在 chroot 中正确解析互联网主机名: {{console|body= # ##i##cp /etc/resolv.conf /mnt/funtoo/etc/ }} 现在可以 chroot...")
Jump to: navigation, search
Other languages:
English • ‎español • ‎polski • ‎português do Brasil • ‎русский • ‎Türkçe • ‎中文(中国大陆)‎

安装指南: Chroot 到 Funtoo 中

Install Guide, Chapter 9 < Prev Next >

要安装 Funtoo Linux,首先要使用 chroot 命令。Chroot 命令将“切换到”新的 Funtoo Linux 系统中,所以你在运行 "chroot" 后执行的命令将在你新提取的 Funtoo Linux 系统中运行。

在进行 chroot 之前,需要做一些设置 chroot 环境的工作,你需要在新系统中挂载 /proc/sys/dev。使用以下命令来完成:

root # cd /mnt/funtoo
root # mount -t proc none proc
root # mount --rbind /sys sys
root # mount --rbind /dev dev

你还需要复制 resolv.conf,以便在 chroot 中正确解析互联网主机名:

root # cp /etc/resolv.conf /mnt/funtoo/etc/

现在可以 chroot 到你的新系统了。在 chroot 之前使用 env,以确保不会将安装介质中的环境设置拉到新系统中:

root # env -i HOME=/root TERM=$TERM chroot . bash -l
chroot #

For users of live CDs with 64-bit kernels installing 32-bit systems: Some software may use uname -r to check whether the system is 32 or 64-bit. You may want to append linux32 to the chroot command as a workaround, but it's generally not needed.


If you receive the error "chroot: failed to run command `/bin/bash': Exec format error", it is most likely because you are running a 32-bit kernel and trying to execute 64-bit code. Make sure that you have selected the proper type of kernel when booting your live CD.

It's also a good idea to change the default command prompt while inside the chroot. This will avoid confusion if you have to change terminals. Use this command:

chroot # export PS1="(chroot) $PS1"

Test internet name resolution from within the chroot:

chroot # ping -c 5

If you can't ping, make sure that /etc/resolv.conf specifies a valid IP address for a reachable nameserver in its nameserver setting.

可喜可贺!你现在已经 chroot 进入了一个新的 Funtoo Linux 系统中。是时候正确地配置 Funtoo Linux ,以便在没有任何手动设置的情况下,让它能正确的重启并且运行。

Install Guide, Chapter 9 < Prev Next >