This is an old revision of the document!
Table of Contents
How-to chroot into Gentoo
Files needed
- stage3-ppc-uclibc-2005.0 (recommended for gentoo chroot) or stage3-ppc-uclibc-2006.1 (recommended for gentoo boot).
Installing steps
ln -s /mnt/HD_a2/bzip2 /mnt/HD_a2/bzcat
mkdir /mnt/HD_a2/gentoo
cd /mnt/HD_a2/gentoo
/mnt/HD_a2/bzcat stage3-ppc-uclibc-2005.0.tar.bz2 | /mnt/HD_a2/tar -xvpf -
cd /mnt/HD_a2/gentoo/usr
/mnt/HD_a2/bzcat portage-latest.tar.bz2 | /mnt/HD_a2/tar -xvf -
mount -o bind /dev /mnt/HD_a2/gentoo/dev
mount -t proc none /mnt/HD_a2/gentoo/proc
cp /etc/resolv.conf /mnt/HD_a2/gentoo/etc/
/mnt/HD_a2/chroot /mnt/HD_a2/gentoo /bin/bash
env-update && source /etc/profile
rc-update add net.eth0 default
rc-update add dropbear default
passwd root
If you did choose to use 2005.0 stage then you must update e2fsprogs!
emerge e2fsprogs
If you did choose to use 2006.1 stage then you must unemerge udev and emerge devfsd!
emerge -C udev
emerge devfsd
/etc/make.conf
CFLAGS="-Os -pipe -mcpu=603e -mtune=603e" CHOST="powerpc-pc-linux-uclibc" CXXFLAGS="-Os -pipe -mcpu=603e -mtune=603e" LDFLAGS="-Wl,-z,relro" USE="-*" 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/fstab
/dev/sda3 / ext3 noatime 0 0 /dev/sda1 none swap sw 0 0 none /proc proc defaults 0 0 none /dev/shm tmpfs defaults 0 0 none /dev/pts devpts gid=5,mode=620 0 0
/etc/conf.d/net
net is needed only if you are going to boot gentoo using loader.o or flashed custom kernel.
iface_eth0=( "192.168.1.2 broadcast 192.168.1.255 netmask 255.255.255.0" ) routes_eth0=( "default via 192.168.1.1" ) dns_servers_eth0=( "192.168.1.1" )
/etc/conf.d/wireless
wireless is needed only if you are going to boot gentoo using loader.o or flashed custom kernel.
Get new (1.1.0 BETA4) rt2500.o from here.
iwpriv_yourssid=( "set AuthMode=WPAPSK" "set EncrypType=TKIP" "set WPAPSK=your-wpa-psk" ) sleep_scan_ra0="5" essid_ra0="yourssid" channel_ra0="11" prefarred_aps=( "yourssid" ) associate_order_ra0="forceprefarred" dns_servers_yourssid=( "192.168.1.1" ) dns_domain_yourssid=( "you-domain" ) key_yourssid="s:your-wpa-psk enc open" config_yourssid=( "192.168.1.3/24 brd 192.168.1.255" ) routes_yourssid=( "default via 192.168.1.1" )
/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
cd /usr/portage
rm -r `gawk '{ printf(”%s ”,$2) }' /etc/portage/rsync_excludes`
Testing
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.
mount -o bind /dev /mnt/HD_a2/gentoo/dev
mount -t proc none /mnt/HD_a2/gentoo/proc
/mnt/HD_a2/chroot /mnt/HD_a2/gentoo /bin/bash