This is an old revision of the document!


How-to chroot into Gentoo

Files needed

Installing steps

  1. ln -s /mnt/HD_a2/bzip2 /mnt/HD_a2/bzcat
  2. mkdir /mnt/HD_a2/gentoo
  3. cd /mnt/HD_a2/gentoo
  4. /mnt/HD_a2/bzcat stage3-ppc-uclibc-2005.0.tar.bz2 | /mnt/HD_a2/tar -xvpf -
  5. cd /mnt/HD_a2/gentoo/usr
  6. /mnt/HD_a2/bzcat portage-latest.tar.bz2 | /mnt/HD_a2/tar -xvf -
  7. mount -o bind /dev /mnt/HD_a2/gentoo/dev
  8. mount -t proc none /mnt/HD_a2/gentoo/proc
  9. cp /etc/resolv.conf /mnt/HD_a2/gentoo/etc/
  10. /mnt/HD_a2/chroot /mnt/HD_a2/gentoo /bin/bash
  11. env-update && source /etc/profile

/etc/make.conf

CFLAGS="-Os -pipe -mcpu=603e -mtune=603e"
CHOST="powerpc-pc-linux-uclibc"
CXXFLAGS="-Os -pipe -mcpu=603e -mtune=603e"
USE="-*"
ACCEPT_KEYWORDS="~ppc"
RSYNC_EXCLUDEFROM="/etc/portage/rsync_excludes"
SYNC="rsync://rsync1.ee.gentoo.org/gentoo-portage"
GENTOO_MIRRORS="http://ftp.linux.ee/pub/gentoo/distfiles ftp://ftp.linux.ee/pub/gentoo/distfiles"

/etc/portage/rsync_excludes

- app-accessibility/
- metadata/cache/app-accessibility/
- app-emulation/
- metadata/cache/app-emulation/
- app-laptop/
- metadata/cache/app-laptop/
- app-office/
- metadata/cache/app-office/
- app-pda/
- metadata/cache/app-pda/
- dev-games/
- metadata/cache/dev-games/
- games-*/
- metadata/cache/games-*/
- gnome-*/
- metadata/cache/gnome-*/
- kde-*/
- metadata/cache/kde-*/
- rox-*/
- metadata/cache/rox-*/
- media-tv/
- metadata/cache/media-tv/
- media-video/
- metadata/cache/media-video/
- sci-*/
- metadata/cache/sci-*/
- x11-*/
- metadata/cache/x11-*/
- xfce-*/
- metadata/cache/xfce-*/

Cleaning portage

  1. cd /usr/portage
  2. rm -r `gawk '{ printf(”%s ”,$2) }' /etc/portage/rsync_excludes`

Testing

  1. USE=unicode emerge links

chrooting

If you have exited from chroot environment after installing gentoo chroot or if you have rebooted your DSM-G600 then you need following commands to enter back in chroot environment.

  1. mount -o bind /dev /mnt/HD_a2/gentoo/dev
  2. mount -t proc none /mnt/HD_a2/gentoo/proc
  3. /mnt/HD_a2/chroot /mnt/HD_a2/gentoo /bin/bash

Links


Personal Tools