Difference between pages "Install/Chroot" and "User talk:Anak1n"

< Install(Difference between pages)
(Created page with "=== Chroot into Funtoo === Before chrooting into your new system, there's a few things that need to be done first. You will need to mount /proc and /dev inside your new system...")
 
(Created page with "great write up of ghost! ~~~~")
 
Line 1: Line 1:
=== Chroot into Funtoo ===
+
great write up of ghost!  [[User:Threesixes|Threesixes]] ([[User talk:Threesixes|talk]]) 22:41, January 21, 2015 (UTC)
Before chrooting into your new system, there's a few things that need to be done first. You will need to mount /proc and /dev inside your new system. Use the following commands:
+
<console>
+
# ##i##cd /mnt/funtoo
+
# ##i##mount -t proc none proc
+
# ##i##mount --rbind /sys sys
+
# ##i##mount --rbind /dev dev
+
</console>
+
 
+
<noinclude>
+
{{Note|This is a template that is used as part of the Installation instructions, to describe the process of chrooting into the stage3. Templates are being used to allow multiple variant install guides that use most of the same re-usable parts.}}
+
</noinclude>
+
 
+
You'll also want to copy over <code>resolv.conf</code> in order to have proper DNS name resolution from inside the chroot:
+
<console>
+
# ##i##cp /etc/resolv.conf etc
+
</console>
+
 
+
Now you can chroot into your new system. Use <code>env</code> before <code>chroot</code> to ensure that no environment variables from the installation media are used by your new system:
+
 
+
<console>
+
# ##i##env -i HOME=/root TERM=$TERM chroot . bash -l
+
</console>
+
 
+
{{fancynote|Users of live CDs with 64-bit kernels: Some software may use <code>uname -r</code> to check whether the system is 32 or 64-bit. You may want append linux32 to the chroot command as a workaround, but it's generally not needed.}}
+
{{fancyimportant|If you receive the error "<code>chroot: failed to run command `/bin/bash': Exec format error</code>", it is probably because you are running a 32-bit kernel and trying to execute 64-bit code. SystemRescueCd boots with a 32-bit kernel by default.}}
+
 
+
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>
+
# ##i##export PS1="(chroot) $PS1"
+
</console>
+
 
+
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 boot successfully when your system is restarted.
+

Latest revision as of 22:41, January 21, 2015

great write up of ghost! Threesixes (talk) 22:41, January 21, 2015 (UTC)