Difference between revisions of "Install/Chroot/pl"

From Funtoo
Jump to navigation Jump to search
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 4: Line 4:
= Przewodnik Instalacji: 'chroot' do nowego systemu =  
= Przewodnik Instalacji: 'chroot' do nowego systemu =  


<div lang="en" dir="ltr" class="mw-content-ltr">
{{InstallNavigation|num=9|prev=Download and Extract Stage3|next=Download Portage Tree}}</noinclude>
{{InstallNavigation|num=9|prev=Download and Extract Stage3|next=Download Portage Tree}}</noinclude>
</div>


Żeby zainstalować Funtoo, najpierw używamy  {{c|chroot}}. Polecenie "przełącza" na nowy system Funtoo Linux. Wpisywane odtąd komendy będą uruchomiać się na nowo rozpakowanym systemie.
Żeby zainstalować Funtoo, najpierw używamy  {{c|chroot}}. Polecenie "przełącza" na nowy system Funtoo Linux. Wpisywane odtąd komendy będą uruchomiać się na nowo rozpakowanym systemie.


<div class="mw-translate-fuzzy">
Przed 'chroot'owaniem, należy wykonać kilka czynności aby skonfigurować środowisko 'chroot'. Trzeba będzie zamontować {{f|/proc}}, {{f|/sys}} oraz {{f|/dev}} wewnątrz nowego systemu. Aby to zrobić, użyj następujących poleceń:
Przed 'chroot'owaniem, należy wykonać kilka czynności aby skonfigurować środowisko 'chroot'. Trzeba będzie zamontować {{f|/proc}}, {{f|/sys}} oraz {{f|/dev}} wewnątrz nowego systemu. Aby to zrobić, użyj następujących poleceń:
{{console|body=
{{console|body=
Line 15: Line 18:
# ##i##mount --rbind /dev dev
# ##i##mount --rbind /dev dev
}}
}}
</div>


Aby mieć prawidłowe nazwy hostów internetowych (DNS) w środowisku 'chroot', kopiujemy plik {{f|resolv.conf}} :
Aby mieć prawidłowe nazwy hostów internetowych (DNS) w środowisku 'chroot', kopiujemy plik {{f|resolv.conf}} :
Line 22: Line 26:
Teraz możesz 'chroot'ować do nowego systemu. Użyj polecenia <code>env</code> przed poleceniem <code>chroot</code> aby upewnić się, że żadne z ustawień środowiska instalacyjnego nie zostaną przeniesione do nowego systemu:
Teraz możesz 'chroot'ować do nowego systemu. Użyj polecenia <code>env</code> przed poleceniem <code>chroot</code> aby upewnić się, że żadne z ustawień środowiska instalacyjnego nie zostaną przeniesione do nowego systemu:


<div lang="en" dir="ltr" class="mw-content-ltr">
{{console|body=###i## env -i HOME=/root TERM=$TERM chroot . bash -l
{{console|body=###i## env -i HOME=/root TERM=$TERM chroot . bash -l
%chroot% }}
%chroot% }}
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
{{Note|For users of live CDs with 64-bit kernels installing 32-bit systems: Some software may use {{c|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.}}
{{Note|For users of live CDs with 64-bit kernels installing 32-bit systems: Some software may use {{c|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 "{{c|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.}}
{{Important|If you receive the error "{{c|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.}}
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
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:
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:
{{console|body=%chroot% ##i##export PS1="(chroot) $PS1"}}
{{console|body=%chroot% ##i##export PS1="(chroot) $PS1"}}
Test internet name resolution from within the chroot:
Test internet name resolution from within the chroot:
{{console|body=%chroot% ##i##ping -c 5 google.com}}
{{console|body=%chroot% ##i##ping -c 5 google.com}}
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
If you can't ping, make sure that {{f|/etc/resolv.conf}} specifies a valid IP address for a reachable nameserver in its {{c|nameserver}} setting.
If you can't ping, make sure that {{f|/etc/resolv.conf}} specifies a valid IP address for a reachable nameserver in its {{c|nameserver}} setting.
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
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.
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.
</div>
<noinclude>{{InstallNavigation|num=9|prev=Download and Extract Stage3|next=Download Portage Tree|align=right}}</noinclude>
<noinclude>{{InstallNavigation|num=9|prev=Download and Extract Stage3|next=Download Portage Tree|align=right}}</noinclude>

Revision as of 04:50, December 13, 2021

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

Przewodnik Instalacji: 'chroot' do nowego systemu

Install Guide, Chapter 9 < Prev Next >

Żeby zainstalować Funtoo, najpierw używamy chroot. Polecenie "przełącza" na nowy system Funtoo Linux. Wpisywane odtąd komendy będą uruchomiać się na nowo rozpakowanym systemie.

Przed 'chroot'owaniem, należy wykonać kilka czynności aby skonfigurować środowisko 'chroot'. Trzeba będzie zamontować /proc, /sys oraz /dev wewnątrz nowego systemu. Aby to zrobić, użyj następujących poleceń:

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

Aby mieć prawidłowe nazwy hostów internetowych (DNS) w środowisku 'chroot', kopiujemy plik resolv.conf :

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

Teraz możesz 'chroot'ować do nowego systemu. Użyj polecenia env przed poleceniem chroot aby upewnić się, że żadne z ustawień środowiska instalacyjnego nie zostaną przeniesione do nowego systemu:

root # env -i HOME=/root TERM=$TERM chroot . bash -l
chroot #
   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 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 google.com

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

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.

Install Guide, Chapter 9 < Prev Next >