User:PeterL/ArchCrossDev

From Gentoo Wiki
Jump to:navigation Jump to:search

Creating Gentoo env on Arch Linux

Laptop has Arch Linux installed - coming from Arch Linux..

Create a chroot gentoo env

root #mkdir /mnt/gentoo
root #cd /mnt/gentoo
root #tar -xpf ~/Download/stage3-amd64-20120621.tar.bz2
root #cd usr
root #tar -xpf ~/Download/portage-latest.tar.xz
root #cp /etc/resolv.conf /mnt/gentoo/etc/

Mount necessary partitions for Gentoo chroot env, only do this once after each laptop restart

root #mount -types proc /proc /mnt/gentoo/proc
root #mount --rbind /sys /mnt/gentoo/sys
root #mount --make-rslave /mnt/gentoo/sys
root #mount --rbind /dev /mnt/gentoo/dev
root #mount --make-rslave /mnt/gentoo/dev
root #mount --bind /run /mnt/gentoo/run
root #mount --make-slave /mnt/gentoo/run

Chroot into Gentoo env, each time I need to switch to Gentoo env

root #chroot /mnt/gentoo /bin/bash

First time do this...

root #source /etc/profile
root #export PS1="(chroot) ${PS1}"
root #cd ~

Then create a .bashrc with the above commands to avoid repeating next time

Once only - set up portage - standard stuff..

root #mkdir /etc/portage/repos.conf
root #cp /usr/share/portage/config/repos.conf /mnt/rpi/etc/portage/repos.conf/gentoo.conf
root #emerge-websync
root #eselect profile list/set
root #eselect locale list/set