Gentoo Install
From CafeWiki
This Gentoo installation article is specified based on Sean's experience with the Kurobox. For sentimental reasons you may want to follow the instructions below, or if you want to save time, try the following howto - http://buffalo.nas-central.org/wiki/Install_The_2007_PPC_Gentoo
Telnet into the Kuro Box:
KURO-BOX-EM login: root Password: kuroadmin
From expert mode set up the partitions:
mfdisk –c /dev/hda
create 3 partitions such as the following hda1 20GB ext3 hda2 512MB swap hda3 remainder ext3
- Important note - set hda1 as bootable and write the output
format the partitions if necessary:
mkfs –j /dev/hda1 mkfs –j /dev/hda3 mkswap /dev/hda2
mount the boot partition
mount /dev/hda1 /mnt
Load up the expert binaries: ftp in using root, send the file EM_mode_binaries.tar.gz which came with the Kurobox from the console type:
cd / tar –xvzf /root/EM_mode_binaries.tar.gz
Change directories to the mounted folder
cd /mnt
Load the system: from the ftp session send in the system portage and snapshot bz files to the /mnt folder, you will need to download this from the Gentoo site. from the console type
tar xvjf system-[version].tar.bz
Now you are ready to chroot into your system! From the console:
mount –t proc none /mnt/proc
get the resolv.conf file
cp –L /etc/resolv.conf /mnt/etc
now chroot!
chroot /mnt /bin/bash source /etc/profile
set your terminal
export TERM=vt100
Configure Portage:
cd /usr tar xvjf /portage-[version].tar.bz2
get the overlay
cd /usr/local/portage tar xvjf /overlay-[version].tar.bz2
Ensure that emerge works
emerge metadata
This will take a while, so go have a coffee or telnet in for another session to continue on!
Setup user accounts:
passwd [set the root password] adduser –md /home/<username> <username> passwd <username> [set password]
Configure fstab:
In the etc directory ensure that the correct version of fstab is loaded, if not create one that looks like:
# /etc/fstab: static file system information. # # <file system> <mount point> <type> <options> <dump> <pass> /dev/hda1 / ext3 defaults,noatime,errors=remount-ro 0 0 Proc /proc proc defaults 0 0 None /dev/pts devpts gid=5,mode=20 0 0 /dev/hda2 swap swap defaults 0 0 /dev/hda3 /share ext3 defaults,noatime 0 0
Configure network:
cd /etc/conf.d nano net
Using nano, create the following lines in the new net file using the ip address you choose
iface_eth0=”192.168.100.29” gateway=”eth0/192.168.100.1”
now set your network config for startup
rc-update add net.eth0 default
Set the hostname of the Kurobox, the example I use is mykuronas:
echo mykuronas > /etc/hostname
From the /etc folder use nano to edit the hosts file so the localhost line looks like this:
127.0.0.1 localhost mykuronas
Set up sshd:
/etc/init.d/sshd start
This will take a while as sshd generates its keyfiles, once it is done try out ssh then stop the service
/etc/init.d/sshd stop
Now add ssh to the startups script
rc-update add sshd default
Check that starup scripts are set:
ls runlevels/default/
should return:
local net.eth0 netmount sshd
Ready to reboot:
Close all ftp connections and from the command prompt type:
exit write_ok reboot
Now pray that it works!
If it comes up, this might be a good time to get emerge updates, first see what’s out there:
emerge –puD system
To actually do the update:
emerge –uD system
Then go away for many hours, if you leave it overnight you should be ok!
At some point you might want to set the correct timezone! Create a link to the timezone file in the system that matches your location.
ln -sf ../usr/share/zoneinfo/Canada/Mountain /etc/localtime
*Optional Steps* Compiling a new kernel (example I use is for kernel 2.6.15 and I assume you have a working loader.o which I know is a big assumption): Untar into the /usr/src/ directory and apply the kernel patch
tar –xvjf /[source-path]/linux-2.6.15.tar.bz2 cd linux-2.6.15 wget http://webpages.charter.net/trevorpowdrell/kurobox-sources-2.6.15.patch.bz2 bunzip2 kurobox-sources-2.6.15.patch.bz2 patch -p1 < kurobox-sources-2.6.15.patch cp ./config_kuroboxhg ./.config make menuconfig
In the menu, set bridge (networking -> networking options -> 802.11d Ethernet Bridging) and tap/tun (Device Drivers -> Network Device Support -> Universal TUN/TAP Device Driver Support) to modules, and save configuration Ensure that you have set the network device to the Realtek 81xx driver.
make vmlinux modules modules_install objcopy -O binary vmlinux /boot/vmlinux-2.6.15-kurobox cd /boot
Loading a new kernel
sync insmod loader.o kernel=vmlinux-2.6.15-kurobox
Use insmod –f to force the loader for versions of the loader that were not compiled for the current kernel. This will produce warnings but should* load.
