Difference between revisions of "Install/Chroot/ru"

From Funtoo
Jump to navigation Jump to search
(Created page with "Прежде чем изменить корневой каталог, необходимо выполнить ряд шагов. Вам необходимо подключит...")
(Created page with "Вам также понадобиться скопировать {{f|resolv.conf}} , чтобы иметь правильное разрешение хостов Интерн...")
Line 16: Line 16:
}}
}}


You'll also want to copy over {{f|resolv.conf}} in order to have proper resolution of Internet hostnames from inside the chroot:
Вам также понадобиться скопировать {{f|resolv.conf}} , чтобы иметь правильное разрешение хостов Интернета внутри chroot:
{{console|body=
{{console|body=
# ##i##cp /etc/resolv.conf /mnt/funtoo/etc/
# ##i##cp /etc/resolv.conf /mnt/funtoo/etc/
}}
}}
Now you can chroot into your new system. Use <code>env</code> before <code>chroot</code> to ensure that no environment settings from the installation media are pulled in to your new system:
Теперь вы можете использовать chroot в своей новой системе. Используйте <code>env</code> перед <code>chroot</code>, чтобы убедиться, что в вашу новую систему не загружены настройки среды с установочного носителя:


{{console|body=###i## env -i HOME=/root TERM=$TERM /bin/chroot . bash -l}}
{{console|body=###i## env -i HOME=/root TERM=$TERM /bin/chroot . bash -l}}

Revision as of 20:43, September 28, 2018

Other languages:
English • ‎Türkçe • ‎español • ‎polski • ‎português do Brasil • ‎русский • ‎中文(中国大陆)‎

Руководство по установке: Подключение к Funtoo

Install Guide, Chapter 9 < Prev Next >

Чтобы установить Funtoo Linux, сначала используется команда chroot. Команда chroot «переключает» на новую систему Funtoo Linux, поэтому команды, которые вы запускаете после запуска «chroot», будут запускаться в вашей недавно извлеченной системе Funtoo Linux.

Прежде чем изменить корневой каталог, необходимо выполнить ряд шагов. Вам необходимо подключить /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 в своей новой системе. Используйте env перед chroot, чтобы убедиться, что в вашу новую систему не загружены настройки среды с установочного носителя:

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

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.

   Important

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 SystemRescueCD.

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:

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

Test internet name resolution from within the chroot:

root # ping -c 5 google.com

If you can't ping, make sure /etc/resolv.conf doesn't contain things like 127.0.x.x addresses, if it does, change the 127.0.x.x entry to 8.8.8.8 -- Google's public dns address. Make sure to replace this with your dns of choice once the system is installed.

Congratulations! You are now chrooted inside a Funtoo Linux system. Now it's time to get Funtoo Linux properly configured so that Funtoo Linux will start successfully, without any manual assistance, when your system is restarted.