Difference between revisions of "Install The 2007 PPC Gentoo"
m (→2.4.33.3 firmimg.bin (Kurobox/KuroboxHG/LS1/HG/HS)) |
m (→2.4.17/2.4.20 Kurobox / Kurobox HG (Stock firmimg.bin)) |
||
Line 47: | Line 47: | ||
[[Image:EM_Welcome_Screen.JPG]] | [[Image:EM_Welcome_Screen.JPG]] | ||
− | ==== 2.4.17/2.4.20 | + | ==== For Kuroboxes (Kuro or Kuro/HG) 2.4.17/2.4.20 (Stock firmimg.bin) ==== |
After it boots to EM mode, use any FTP client to upload EM_mode_binaries.tar.gz to /tmp on the LS/Kuro (hint: Windows may change the extension of the file when you download it from the internet). | After it boots to EM mode, use any FTP client to upload EM_mode_binaries.tar.gz to /tmp on the LS/Kuro (hint: Windows may change the extension of the file when you download it from the internet). | ||
Revision as of 02:23, 4 December 2007
Current Gentoo Image Date: 2007/11/04What is Gentoo Linux? Gentoo Linux is a distribution of Linux that emphasizes customization. Read more about Gentoo at gentoo.org.[1]
Using this method, you can install an entire Gentoo image on your PPC Linkstation or Kurobox complete with portage and overlay in about 15 minutes (actually with downloading and unpacking I think it might be more like 30 - 45 minutes).
These instructions are admittedly kurobox centric, however PPC linkstations should work with the image as well. Please add to or correct these instructions to make them work for both platforms if you find anything missing or confusing.
The image was created immediately following a deep world update. There is only one version of the gentoo image (previous image had two versions). The only requirement is that your box must have uboot that boots a 2.6 kernel. The 1.2 uboot that supports a dtb is preferred, and in fact the image includes a 2.6.22 kernel and dtb file, generated from gentoo-sources.
Contents
- 1 Origins of the Gentoo Image
- 2 Preparing for Install
- 3 Install Gentoo Image
- 4 Configure Network
- 5 Configure Settings for the Kernel
- 6 Clean up and Reboot
- 7 Post Installation Tasks
- 8 Notes on initial configuration
- 9 Troubleshooting
- 10 Submitting Bugs and Issues
Origins of the Gentoo Image
A Little History
(please fill in missing info, I don't mean to leave anyone out)
This gentoo image has its roots in the kurobox.com forums, probably dating back to 2005 or so. jgmdean kicked off the project and TGL and others in the forums made valuable contributions. With the advent of uboot for the kurobox and linkstation from linuxnotincluded, the submission of the linkstation patches to kernel.org by lyakh, and the firmimg.bin for EM mode by mindbender, the gentoo image is now thriving again with support for both PPC linkstations and kuroboxes.
Preparing for Install
UBoot
It is recommended that you have uboot installed prior to installing the gentoo image. linuxnotincluded, the author of the uboot port to PPC linkstations and kuroboxes, has documented the steps for building uboot on his website here: uboot for the linkstation. This gentoo image is not very useful for testing the RAM build and flashing the ROM build unfortunately because the binaries in the image are linked with glibc 2.6 (and therefore will not run under a 2.4 kernel). Additionally, the kernel provided in this image requires dtb support, a feature provided in uboot 1.2. The instructions for installing 1.2 UBoot are here on the wiki. You don't have to build the kernel as it shows in the instructions if you don't want to since there is a kernel supplied in the gentoo image. Also, you may be able to find a 1.2 uboot pre-built and ready to flash in the downloads section (for the HG: here, and the HD: here).
Please be careful.
The rest of these instructions assume you have a working 1.2 uboot.
Download needed files
You will need to download the gentoo image, the EM mode utilities, and the latest portage tree.
- For the EM mode utilities, download from here: EM_mode_binaries.tar.gz
- For the gentoo 15-minute image, download from here: gentoo-20071104-uboot.tar.bz2
- For the latest portage snapshot, use a gentoo mirror near you (see Gentoo Mirror), and navigate to the portage "snapshots", I use ibiblio for example portage-latest.tar.bz2.
Install EM mode utilities
Switch the box to EM mode (see the Frequently Asked Questions for details on how to do this). Note, uboot 1.2 , if connected to the uboot shell via netcat, typically is set up to boot to EM mode by hitting "s <return>", and then entering "run emboot" at the prompt. you can also use the so called "minimal-console" to boot to EM mode. Watch this video tutorial describing this(NOTE: you need 3 flashes, not 1):
For Linkstations with Kernel 2.4.17 or 2.4.20 (Stock firmimg.bin)
If you already have installed uboot then you need to install the firmimg.bin which features telnet/ftp like the kurobox one does. Look Uboot_firmimg.bin_ppc for installation instructions.
For Boxes with 2.4.33.3 firmimg.bin (Kurobox/KuroboxHG/LS1/HG/HS)
The binaries from EM_mode_binaries.tar.gz should be included. it was reported that bzip2 was missing, so install the EM_mode_binaries and set the date as described below.
For Kuroboxes (Kuro or Kuro/HG) 2.4.17/2.4.20 (Stock firmimg.bin)
After it boots to EM mode, use any FTP client to upload EM_mode_binaries.tar.gz to /tmp on the LS/Kuro (hint: Windows may change the extension of the file when you download it from the internet).
then login to LS/kuro using a telnet client.
Kroutoshikou KURO-BOX (IETSUNA) kernel 2.4.17-kuro-box on ppc KURO-BOX-EM login: root Password: kuro (kuroadmin on HG)
Change to the root and untar the binaries.
# cd / # tar xvzf /tmp/EM_mode_binaries.tar.gz bin/ bin/sfdisk bin/fdisk bin/bzip2 bin/date bin/chroot #
Check and set the date. ('date MMDDhhmm[[CC]YY]' will set the date)
# date Fri Feb 1 12:37:03 JST 2006 # date 02032238 Thu Feb 3 22:38:00 JST 2006
Partitioning & Formating the HDD
Note: The /etc/fstab file that comes with the Gentoo image is configured to work with a simple hard drive partitioning scheme. If you want to use a different partitioning scheme you must edit /etc/fstab accordingly. The flash contains the standard visual editor, vi. Instructions for using vi are available at http://www.cs.colostate.edu/helpdocs/vi.html.
Note: the image is prepared for use with an instream 2.6 kernel, which uses the PATA driver, or /dev/sda, for the hard drive. When running under a 2.4 kernel or a legacy 2.6 kernel with out-of-stream patches, the drive is /dev/hda. Keep that in mind when creating the partitions and editing the fstab file.
Run fdisk and create partitions. The image uses three partitions: sda1 for /, sda2 for the swap space, sda3 for /datafiles. This section from the Gentoo Handbook explains how to prepare your hard disk (create partitions). For most users, 10gb for / on sda1 and is adequate (the image consumes around 1.4G when freshly installed). 512mb is good for a swap space on sda2 and use the remainder for /datafiles on sda3. However, you can decide which way you want to break up your hard disk. Remember you need to mount all of the drives (except the swap and /datafiles) before you untar the image (More on that later).
# fdisk /dev/hda (to match the fstab supplied in the image, you will need to create 3 partitions, 1=~10G, 2=~512M, 3=rest-of-drive)
Once the partitions are created we format the partitions. Here we format the first partition on /dev/hda (the hard drive is /dev/hda).
# mke2fs -j /dev/hda1 mke2fs 1.22, 22-Jun-2001 for EXT2 FS 0.5b, 95/08/09 Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 1251712 inodes, 2502115 blocks 125105 blocks (5.00%) reserved for the super user First data block=0 77 block groups 32768 blocks per group, 32768 fragments per group 16256 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632 Writing inode tables: done Creating journal (8192 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 29 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. #
We do this for all of the partitions we plan to use.
# mke2fs -j /dev/hda3
# mkswap /dev/hda2 Setting up swapspace version 1, size = 518184960 bytes #
Install Gentoo Image
Mount new partitions
This will allow us to create the gentoo system on the hard drive instead of in the flash ram disk. We will create the directoy /gentoo and mount /dev/hda1 there.
# mkdir /gentoo # mount -t ext3 /dev/hda1 /gentoo (if you created any other partitions to be mounted under /, you should mkdir and mount them now)
Create a directory for uploading the tarballs through ftp:
# mkdir /gentoo/tarballs # chmod ugo+wx /gentoo/tarballs
Extracting the Image
Use your FTP client to upload the gentoo image (gentoo-20071104-uboot.tar.bz2) to the /gentoo/tarballs directory on the kuro/LS.
Then, back at the EM-mode prompt, change directories to /gentoo and untar the image in what will be our root directory
# cd /gentoo # tar xvjf tarballs/gentoo-20071104-uboot.tar.bz2
Extracting the portage snapshot
Again, use your ftp client to upload the portage snapshot (portage-latest.tar.bz2) to the /gentoo/tarballs directory on the kuro/LS
Then, back at the EM-mode prompt, untar the snapshot into the usr directory
# cd /gentoo/usr # tar xvjf /gentoo/tarballs/portage-latest.tar.bz2
Once the snapshot is untarred, we are finished with the tarballs so we can remove them from the disk:
# cd /gentoo # rm -r tarballs
Configure Network
Next we configure the network.
/etc/conf.d/hostname
If you want to change the hostname now, edit this file
# vi /gentoo/etc/conf.d/hostname
/etc/conf.d/net
If you want to use DHCP, you can skip this step as the image is configured for DHCP. Note, that if DHCP fails, the box will fallback to the well-known IP address of 192.168.11.150.
# vi /gentoo/etc/conf.d/net
The Gentoo Handbook Section 4 explains how to configure the settings for various options. The /etc/conf.d/net file supplied in the image looks like this:
# This configuration will use DHCP for eth0 but fallback to the # well-known 192.168.11.150 if DHCP fails config_eth0=( "dhcp" ) fallback_eth0=( "192.168.11.150/24" )
/etc/resolv.conf
You may have to configure your DNS servers in resolv.conf file according to your network. If you stick to DHCP, you generally don't have to edit the file, as it will be generated by dhcpcd upon bootup.
# vi /gentoo/etc/resolv.conf
The file supplied in the image looks like this:
nameserver 127.0.0.1
Configure Settings for the Kernel
If you want to use the kernel supplied in the image, you can skip this section as long as your uboot is configured to load the kernel "boot/vmlinux.UBoot", and the appropriate dtb file as shown below. If you want to use a different kernel, you should place it in gentoo/boot now and configure uboot accordingly. Note, the kernel supplied with the image disables the AVR watchdog at bootup and sets up the AVR device at /dev/ttyS0. The legacy kernels (kernels from baulub, javascout, and nowadays available through andre's webinstaller) typically have the AVR device at /dev/ttyS1 and do not disable the AVR watchdog. The AVR_watch-dog_daemon for Linkstation package (avr_evtd from the overlay) is present in the image however, which sends a keepalive signal to the watchdog, so you should not have to worry about resets (but you should move the daemon from the default runlevel to the boot runlevel). If you use a legacy kernel, you must adjust a few things to account for the AVR device and also for the PATA vs. IDE driver. These items must be changed if you use a legacy kernel:
- /etc/fstab: change /dev/sda to /dev/hda
- /etc/inittab: change ttyS1 to ttyS0
- /etc/conf.d/avr_evtd: change ttyS0 to ttyS1 and /dev/sda to /dev/hda
- /etc/conf.d/rc: change ttyS0 to ttyS1
- /etc/conf.d/local.stop: change ttyS0 to ttyS1
The kernel supplied in the image was built from gentoo-sources. The uname -a looks like:
Linux gmyth 2.6.22-gentoo-r5 #1 Tue Oct 16 03:22:32 EDT 2007 ppc 82xx Linkstation I/Kurobox(HG) GNU/Linux
The contents of the /boot directory supplied in the image are:
-rw-r--r-- 1 root root 653994 Oct 16 22:09 System.map lrwxrwxrwx 1 root root 1 Oct 2 23:42 boot -> . -rw-r--r-- 1 root root 37690 Oct 16 22:09 config -rw-r--r-- 1 root root 2180 Oct 16 22:10 kuroboxHD.dtb -rw-r--r-- 1 root root 3338 Oct 16 22:08 kuroboxHD.dts -rw-r--r-- 1 root root 2196 Oct 16 22:10 kuroboxHG.dtb -rw-r--r-- 1 root root 3369 Oct 16 22:08 kuroboxHG.dts -rw-r--r-- 1 root root 1588842 Oct 16 22:08 vmlinux.UBoot
Clean up and Reboot
Unmount everything
# cd / # # (umount any partitions you may have mounted if you departed from the provided fstab) # umount /gentoo
Set the box to boot to the new system. By the way, that device is FL3 in lowercase. (This step is optional nowadays with uboot).
# echo -n "OKOK" > /dev/fl3
and then restart the system
# shutdown -r now
Wait a few minutes and then log onto your kuro/LS with putty or ssh. The first time the system boots it will take about 3 minutes as it needs to generate the certificates used by sshd.
Login as root with the password: kuroadmin.
What if it doesn't seem to boot? Give it plenty of time -- it might be doing a fsck. If you still cannot connect, see #Troubleshooting.
Post Installation Tasks
First we set the root password and create a new user who is a member of wheel so they can su to root.
# cd / # passwd New UNIX password: Retype new UNIX password: passwd: password updated successfully # useradd dtaylor -m -G users,wheel -s /bin/bash # passwd dtaylor New UNIX password: Retype new UNIX password: passwd: password updated successfully #
Now would be a good time to update everything. Let's sync the overlay with the svn server. First, I suggest optionally backing up the installed overlay:
# cd /usr/local/portage/layman # cp -r ls-wiki ../ls-wiki.bak
Then sync the overlay with the subversion server:
# layman -S
Since we used the latest portage snapshot, you can probably skip this next step, but to be sure you have the latest portage tree, you can sync it now with this command:
# emerge --sync
Then, you should check what packages are out of date with a command like this:
# emerge --pretend --update --deep world
This will show you what packages are out-of-date since the image was created. I always like to do --pretend to see what it's going to do before doing it for real (some people may prefer to use --ask instead of --pretend to avoid waiting if the update is chosen). To really update everything, use this command:
# emerge --update --deep world
Last, if anything was updated and portage says we need to update our config files we run etc-update. Don't do this blindly as you can easily break your brand new system. You need to understand what the configuration files mean and choose what lines you want to edit. On the other hand, the box is plain vanilla at this point so the configuration files supplied with the updated packages are probably ok to accept.
# etc-update
That's it. You're done. If you are new to Gentoo, check out the Gentoo Handbook "Where to go from here?". Also, you should consider going to the Administrate Your Gentoo System page and installing some system utilities (note, the last time I checked, that page on the wiki was woefully obsolete - there are no bin packages available for this image so don't bother with the PORTAGE_BINHOST setting).
Notes on initial configuration
/etc/localtime
The timezone in the image is set for New York, or EST/EDT. If you live in a different timezone, you should change this link. Look for your timezone in /usr/share/zoneinfo/ and then create a link to your desired timezone:
# cd /etc # rm localtime # ln -s ../usr/share/zoneinfo/<your-desired-timezone-here> localtime
Check your setting with the 'date' command. Also if you need to change the clock, use the 'hwclock' command. You also may want to emerge the ntp package to set your clock in sync with Internet time servers.
/etc/conf.d/clock
There is a timezone setting in this file as well. You can set the timezone to the same one as the link above.
# vi /etc/conf.d/clock (set the TIMEZONE to something like TIMEZONE="America/New_York")
/etc/rc.conf
This file contains a setting for the AVR device. Since the image contains a kernel that uses /dev/ttyS0 for the AVR device, the file contains a line like this:
AVR_DEVICE=/dev/ttyS0
/etc/conf.d/local.stop
This file is run whenever the box is shutting down for halt or reboot. There is a little bit of code in this file such that if "shutdown -r now" or "shutdown -h now" is run from the command line, the AVR is told to turn off the power or start a reset. The following code is in the /etc/conf.d/local.stop file:
#AVR_DEVICE should come from /etc/rc.conf [ -z "${AVR_DEVICE}" ] && AVR_DEVICE=/dev/ttyS0 # on halt [ "${RUNLEVEL}X" = "0X" ] && echo -n "EEEE" > ${AVR_DEVICE} # on reboot [ "${RUNLEVEL}X" = "6X" ] && echo -n "CCCC" > ${AVR_DEVICE}
Note the avr_evtd package does this when the power button on the front panel is pushed (once long to halt or twice quick to reboot), and it seems ok to have it done twice when using the power button.
/var/lib/portage/world
The image as delivered has just a few packages emerged beyond the basic system. The contents of the world file are:
app-admin/showconsole app-editors/vim app-portage/gentoolkit app-portage/layman dev-util/subversion net-misc/dhcpcd sys-apps/avr_evtd sys-apps/hotplug sys-fs/udev
list of all emerged packages
# equery list [ Searching for all packages in all categories among: ] * installed packages [I--] [ ] app-admin/apache-tools-2.2.6 (0) [I--] [ ] app-admin/eselect-1.0.10 (0) [I--] [ ] app-admin/eselect-vi-1.1.4 (0) [I--] [ ] app-admin/perl-cleaner-1.04.3 (0) [I--] [ ] app-admin/python-updater-0.2 (0) [I--] [ ] app-admin/showconsole-1.08 (0) [I--] [ ] app-arch/bzip2-1.0.4 (0) [I--] [ ] app-arch/cpio-2.9-r1 (0) [I--] [ ] app-arch/gzip-1.3.12 (0) [I--] [ ] app-arch/tar-1.18-r2 (0) [I--] [ ] app-crypt/hashalot-0.3-r2 (0) [I--] [ ] app-editors/nano-2.0.6 (0) [I--] [ ] app-editors/vim-7.1.042 (0) [I--] [ ] app-editors/vim-core-7.1.042 (0) [I--] [ ] app-misc/ca-certificates-20070303-r1 (0) [I--] [ ] app-misc/mime-types-7 (0) [I--] [ ] app-misc/pax-utils-0.1.16 (0) [I--] [ ] app-portage/gentoolkit-0.2.3-r1 (0) [I--] [ ] app-portage/layman-1.1.1 (0) [I--] [ ] app-shells/bash-3.2_p17 (0) [I--] [ ] app-vim/gentoo-syntax-20070506 (0) [I--] [ ] dev-lang/perl-5.8.8-r2 (0) [I--] [ ] dev-lang/python-2.4.4-r6 (2.4) [I--] [ ] dev-libs/apr-1.2.8 (1) [I--] [ ] dev-libs/apr-util-1.2.8 (1) [I--] [ ] dev-libs/expat-2.0.1 (0) [I--] [ ] dev-libs/libpcre-7.3-r1 (3) [I--] [ ] dev-libs/libusb-0.1.12-r1 (0) [I--] [ ] dev-libs/libxml2-2.6.28 (2) [I--] [ -] dev-libs/openssl-0.9.8f (0) [I--] [ ] dev-libs/popt-1.10.7 (0) [I--] [ ] dev-perl/Locale-gettext-1.05 (0) [I--] [ ] dev-python/pycrypto-2.0.1-r6 (0) [I--] [ ] dev-python/python-fchksum-1.7.1 (0) [I--] [ ] dev-util/ctags-5.5.4-r2 (0) [I--] [ ] dev-util/pkgconfig-0.21-r1 (0) [I--] [ ] dev-util/subversion-1.3.2-r4 (0) [I--] [ ] dev-util/unifdef-1.20 (0) [I--] [ ] net-misc/dhcpcd-3.1.5-r1 (0) [I--] [ ] net-misc/iputils-20070202 (0) [I--] [ ] net-misc/neon-0.26.3 (0) [I--] [ ] net-misc/openssh-4.7_p1-r1 (0) [I--] [ ] net-misc/rsync-2.6.9-r3 (0) [I--] [ ] net-misc/wget-1.10.2 (0) [I--] [ ] perl-core/PodParser-1.35 (0) [I--] [ ] perl-core/Test-Harness-2.64 (0) [I--] [ ] sys-apps/acl-2.2.45 (0) [I--] [ ] sys-apps/attr-2.4.39 (0) [I--] [ ] sys-apps/avr_evtd-1.7.2 (0) [I--] [ ] sys-apps/baselayout-1.12.9-r2 (0) [I--] [ ] sys-apps/busybox-1.5.1 (0) [I--] [ ] sys-apps/coreutils-6.9-r1 (0) [I--] [ ] sys-apps/debianutils-2.17.5 (0) [I--] [ ] sys-apps/diffutils-2.8.7-r2 (0) [I--] [ ] sys-apps/file-4.21-r1 (0) [I--] [ ] sys-apps/findutils-4.3.8-r1 (0) [I--] [ ] sys-apps/gawk-3.1.5-r5 (0) [I--] [ ] sys-apps/grep-2.5.1a-r1 (0) [I--] [ ] sys-apps/groff-1.19.2-r1 (0) [I--] [ ] sys-apps/hdparm-7.7 (0) [I--] [ ] sys-apps/help2man-1.36.4 (0) [I--] [ ] sys-apps/hotplug-20040923-r2 (0) [I--] [ ] sys-apps/hotplug-base-20040401 (0) [I--] [ ] sys-apps/less-406 (0) [I--] [ ] sys-apps/man-1.6e-r3 (0) [I--] [ ] sys-apps/man-pages-2.66 (0) [I--] [ ] sys-apps/mktemp-1.5 (0) [I--] [ ] sys-apps/module-init-tools-3.2.2-r3 (0) [I--] [ ] sys-apps/net-tools-1.60-r13 (0) [I--] [ ] sys-apps/pciutils-2.2.4-r3 (0) [I--] [ ] sys-apps/portage-2.1.3.16 (0) [I--] [ ] sys-apps/sandbox-1.2.18.1-r2 (0) [I--] [ ] sys-apps/sed-4.1.5 (0) [I--] [ -] sys-apps/setarch-2.0 (0) [I--] [ ] sys-apps/shadow-4.0.18.1-r1 (0) [I--] [ ] sys-apps/sysvinit-2.86-r13 (0) [I--] [ ] sys-apps/tcp-wrappers-7.6-r8 (0) [I--] [ ] sys-apps/texinfo-4.8-r5 (0) [I--] [ ] sys-apps/usbutils-0.72-r4 (0) [I--] [ ] sys-apps/util-linux-2.12r-r8 (0) [I--] [ ] sys-apps/which-2.16 (0) [I--] [ ] sys-devel/autoconf-2.61-r1 (2.5) [I--] [ ] sys-devel/autoconf-wrapper-4-r3 (0) [I--] [ ] sys-devel/automake-1.10 (1.10) [I--] [ ] sys-devel/automake-wrapper-3-r1 (0) [I--] [ ] sys-devel/binutils-2.18-r1 (0) [I--] [ ] sys-devel/binutils-config-1.9-r4 (0) [I--] [ ] sys-devel/bison-2.3 (0) [I--] [ ] sys-devel/flex-2.5.33-r3 (0) [I--] [ -] sys-devel/gcc-4.1.2 (4.1) [I--] [ ] sys-devel/gcc-config-1.3.16 (0) [I--] [ ] sys-devel/gettext-0.16.1-r1 (0) [I--] [ ] sys-devel/gnuconfig-20070118 (0) [I--] [ ] sys-devel/libperl-5.8.8-r1 (1) [I--] [ ] sys-devel/libtool-1.5.24 (1.5) [I--] [ ] sys-devel/m4-1.4.10 (0) [I--] [ ] sys-devel/make-3.81 (0) [I--] [ ] sys-devel/patch-2.5.9 (0) [I--] [ ] sys-fs/e2fsprogs-1.39-r2 (0) [I--] [ ] sys-fs/udev-115-r1 (0) [I--] [ -] sys-kernel/linux-headers-2.6.21 (0) [I--] [ ] sys-libs/com_err-1.39 (0) [I--] [ ] sys-libs/cracklib-2.8.10 (0) [I--] [ ] sys-libs/db-4.5.20_p2 (4.5) [I--] [ ] sys-libs/gdbm-1.8.3-r3 (0) [I--] [ ] sys-libs/glibc-2.6.1 (2.2) [I--] [ ] sys-libs/gpm-1.20.1-r5 (0) [I--] [ ] sys-libs/ncurses-5.6-r1 (5) [I--] [ ] sys-libs/readline-5.2_p7 (0) [I--] [ ] sys-libs/ss-1.39 (0) [I--] [ ] sys-libs/timezone-data-2007g (0) [I--] [ ] sys-libs/zlib-1.2.3-r1 (0) [I--] [ ] sys-process/procps-3.2.7 (0) [I--] [ ] sys-process/psmisc-22.5-r2 (0) [I--] [ ] virtual/editor-0 (0) [I--] [ ] virtual/init-0 (0) [I--] [ ] virtual/libiconv-0 (0) [I--] [ ] virtual/libintl-0 (0) [I--] [ ] www-servers/apache-2.2.6 (2)
layman
The image is taking advantage of the noteworthy layman package for managing the overlay. This provides the ability to download updates from the nas-central/linkstationwiki subversion server at sourceforge. This is a very powerful utility, but perhaps should not be trusted blindly. I suggest making a backup of the /usr/local/portage/layman/ls-wiki directory tree after the first install and each time before using the "layman -S" command. Also, check occasionally in the forums at nas-central.org (in Software Development (ppc)) and kurobox.com (under the gentoo project [these two forums should eventually merge into one at nas-central]) for announcements regarding new packages that may be added to the overlay.
kernel
The kernel provided in the image was built from gentoo-sources. Then, to keep the image size smaller, the gentoo-sources package was unmerged and removed after the kernel was built. If you want to build a new kernel for some reason, you can do something like the following:
# emerge gentoo-sources # cp /boot/config /usr/src/linux/.config # cd /usr/src/linux # make oldconfig # make menuconfig # make uImage && make modules && make modules_install
Then copy the uImage file to /boot/vmlinux.UBoot or the appropriate name for your uboot.
shutdown/reboot 5-minute delay
The box takes 5 minutes to perform a shutdown (power off) or reboot. This seems to be a feature with the AVR (if anyone knows how to improve this, let us know - the stock implementation did not seem to take this long). I believe it in fact does not take half this time to actually complete shutting down, so if you are really impatient, you can probably just cycle the power after about 3 minutes and be ok. Note, if you have installed a lot of services the shutdown process could take longer so beware.
distcc
Running gentoo on the LS/kurobox works great, but compiling is slow. If you have a x86 or other more capable CPU running linux, it can help significantly to run distcc on the more capable CPU and enable the LS/kurobox to offload some of the work for big emerge's. See this howto to set it up.
Troubleshooting
Uboot Output on netcat
To see the uboot output through netcat, your PC should have an IP address on the same subnet as the uboot setup. If you went with the typical setup, you should set your PC to 192.168.11.149. See the wiki page on netcat and uboot: NetCat-A UBoot-Friendly Network Utility. If you have a linux PC, use a command like "ifconfig eth0:EM 192.168.11.149". This will give you a second IP address for your ethernet interface. If you have a Windows PC, you will have to set the IP address through the properties on the network interface. Then use the nc command like this:
nc -u -p 6666 -v -v 192.168.11.150 6666
You should see something like the following in the nc window during bootup. Note it says it is loading the kernel file "Loading 0:1:boot/vmlinux.UBoot". Also note it says it uncompresses the kernel ok and that it is loading the flat device tree:
KURO-EM.krayer [192.168.11.150] 6666 (?) open U-Boot 1.2.0 (Apr 10 2007 - 19:13:32) LinkStation HG / KuroBox HG stdin : nc stdout: nc stderr: nc IDE: Bus 0: OK Device 0: Model: WDC WD3000JB-00KFA0 Firm: 08.05J08 Ser#: WD-WCAMR2533095 Type: Hard Disk Supports 48-bit addressing Capacity: 286168.1 MB = 279.4 GB (586072368 x 512) Boot in 01 seconds ('s' to stop)... Loading 0:1:boot/vmlinux.UBoot 1588842 bytes read 2196 bytes read ## Booting image at 00800000 ... Image Name: Linux-2.6.22-gentoo-r5 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 1588778 Bytes = 1.5 MB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK Uncompressing Kernel Image ... OK Booting using flat device tree at 0x7f0000 Using Buffalo Linkstation machine description Linux version 2.6.22-gentoo-r5 (root@guro) (gcc version 4.1.2 (Gentoo 4.1.2 p1.0.1)) #1 Tue Oct 16 03:22:32 EDT 2007 Adding PCI host bridge /soc10x/pci@fec00000 BUFFALO Network Attached Storage Series (C) 2002-2005 BUFFALO INC. Zone PFN ranges: DMA 0 -> 32768 Normal 32768 -> 32768 early_node_map[1] active PFN ranges 0: 0 -> 32768 Built 1 zonelists. Total pages: 32512 Kernel command line: root=/dev/sda1 netconsole=6666@192.168.11.150/,@192.168.11.149/ rtc-rs5c372.probe=0,0x32 netconsole: local port 6666 netconsole: local IP 192.168.11.150 netconsole: interface eth0 netconsole: remote port 6666 netconsole: remote IP 192.168.11.149 netconsole: remote ethernet address ff:ff:ff:ff:ff:ff mpic: Setting up MPIC " EPIC " version 1.2 at 80040000, max 1 CPUs mpic: ISU size: 4, shift: 2, mask: 3 mpic: Initializing for 12 sources PID hash table entries: 512 (order: 9, 2048 bytes) Console: colour dummy device 80x25 console handover: boot [udbg0] -> real [tty0] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) Memory: 126420k/131072k available (3064k kernel code, 4488k reserved, 132k data, 106k bss, 148k init) Mount-cache hash table entries: 512 NET: Registered protocol family 16 PCI: Probing PCI hardware PCI: Cannot allocate resource region 1 of device 0000:00:00.0 PCI: Cannot allocate resource region 5 of device 0000:00:0c.0 SCSI subsystem initialized usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb NET: Registered protocol family 2 IP route cache hash table entries: 1024 (order: 0, 4096 bytes) TCP established hash table entries: 4096 (order: 3, 32768 bytes) TCP bind hash table entries: 4096 (order: 2, 16384 bytes) TCP: Hash tables configured (established 4096 bind 4096) TCP reno registered io scheduler noop registered io scheduler anticipatory registered (default) io scheduler deadline registered io scheduler cfq registered Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled serial8250.0: ttyS0 at MMIO 0x80004500 (irq = 16) is a 16550A serial8250.0: ttyS1 at MMIO 0x80004600 (irq = 17) is a 16550A RAMDISK driver initialized: 2 RAM disks of 8192K size 1024 blocksize loop: module loaded r8169 Gigabit Ethernet driver 2.2LK loaded eth0: RTL8169s/8110s at 0xc9004c00, 00:0d:0b:ad:7a:50, IRQ 19 netconsole: device eth0 not up yet, forcing it r8169: eth0: link down r8169: eth0: link up netconsole: network logging started sil680: BA5_EN = 1 clock = 00 sil680: BA5_EN = 1 clock = 10 sil680: 133MHz clock. scsi0 : pata_sil680 scsi1 : pata_sil680 ata1: PATA max UDMA/133 cmd 0xfdffbed0 ctl 0xfdffbeda bmdma 0xfdffbef0 irq 20 ata2: PATA max UDMA/133 cmd 0xfdffbee0 ctl 0xfdffbeea bmdma 0xfdffbef8 irq 20 ata1.00: ATA-6: WDC WD3000JB-00KFA0, 08.05J08, max UDMA/100 ata1.00: 586072368 sectors, multi 0: LBA48 ata1.00: configured for UDMA/100 scsi 0:0:0:0: Direct-Access ATA WDC WD3000JB-00K 08.0 PQ: 0 ANSI: 5 sd 0:0:0:0: [sda] 586072368 512-byte hardware sectors (300069 MB) sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sd 0:0:0:0: [sda] 586072368 512-byte hardware sectors (300069 MB) sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sda: sda1 sda2 sda3 sd 0:0:0:0: [sda] Attached SCSI disk sd 0:0:0:0: Attached scsi generic sg0 type 0 physmap platform flash device: 00400000 at ffc00000 physmap-flash.0: Found 1 x16 devices at 0x0 in 8-bit bank Amd/Fujitsu Extended Query Table at 0x0040 physmap-flash.0: Swapping erase regions for broken CFI table. number of CFI chips: 1 cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness. cmdlinepart partition parsing not available RedBoot partition parsing not available Using physmap partition information Creating 6 MTD partitions on "physmap-flash.0": 0x00000000-0x00300000 : "mtd_firmimg" 0x00300000-0x00370000 : "mtd_bootcode" 0x00370000-0x00380000 : "mtd_status" 0x00380000-0x00400000 : "mtd_conf" 0x00000000-0x00400000 : "mtd_allflash" 0x00310000-0x00400000 : "mtd_data" usbmon: debugfs is not available ehci_hcd 0000:00:0e.2: EHCI Host Controller ehci_hcd 0000:00:0e.2: new USB bus registered, assigned bus number 1 ehci_hcd 0000:00:0e.2: irq 21, io mem 0xbfffcf00 ehci_hcd 0000:00:0e.2: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004 usb usb1: configuration #1 chosen from 1 choice hub 1-0:1.0: USB hub found hub 1-0:1.0: 5 ports detected ohci_hcd 0000:00:0e.0: OHCI Host Controller ohci_hcd 0000:00:0e.0: new USB bus registered, assigned bus number 2 ohci_hcd 0000:00:0e.0: irq 21, io mem 0xbfffe000 usb usb2: configuration #1 chosen from 1 choice hub 2-0:1.0: USB hub found hub 2-0:1.0: 3 ports detected ohci_hcd 0000:00:0e.1: OHCI Host Controller ohci_hcd 0000:00:0e.1: new USB bus registered, assigned bus number 3 ohci_hcd 0000:00:0e.1: irq 21, io mem 0xbfffd000 usb usb3: configuration #1 chosen from 1 choice hub 3-0:1.0: USB hub found hub 3-0:1.0: 2 ports detected usbcore: registered new interface driver usbserial drivers/usb/serial/usb-serial.c: USB Serial Driver core drivers/usb/serial/usb-serial.c: USB Serial support registered for FTDI USB Serial Device usbcore: registered new interface driver ftdi_sio drivers/usb/serial/ftdi_sio.c: v1.4.3:USB FTDI Serial Converters Driver mice: PS/2 mouse device common for all mice i2c /dev entries driver rtc-rs5c372 0-0032: assuming rs5c372b rtc-rs5c372 0-0032: rs5c372b found, 24hr, driver version 0.4 rtc-rs5c372 0-0032: rtc core: registered rtc-rs5c372 as rtc0 TCP cubic registered NET: Registered protocol family 1 NET: Registered protocol family 17 rtc-rs5c372 0-0032: setting the system clock to 2007-11-11 11:59:41 (1194782381) linkstation: disarming the AVR watchdog: kjournald starting. Commit interval 5 seconds EXT3-fs: mounted filesystem with ordered data mode. VFS: Mounted root (ext3 filesystem) readonly. Freeing unused kernel memory: 148k init
boot.msg
If you cannot find the box on the network, try the fallback IP address 192.168.11.150.
If you still cannot find the box on the network, try to shutdown the box by holding the power button for about 3 seconds. The Power LED should start blinking to indicate the box is going to shut down. If the Power LED does not start blinking, you will probably have to pull the power cord. Go back to EM mode and mount the /dev/hda1 partition. Look in the var/log directory for a file called boot.msg. This file is created during the boot process. It may give you some clues as to what is going on. Note, this file is created because /etc/conf.d/rc has RC_BOOTLOG="yes" and the image has emerged app-admin/showconsole. If you don't have a file called boot.msg, look harder at the netcat output, perhaps the kernel is not successfully booting.
If you are still having trouble, post a message to the forums at forum.nas-central.org.
Submitting Bugs and Issues
If you cannot get a question or problem resolved in the forums, please submit bugs/issues reports in mantis at nas-central.org here: Bugtracker.
- ↑ Gentoo and the 'g' logo are trademarks of Gentoo Foundation Inc. This site is not part of the Gentoo project and is not directed or managed by Gentoo Foundation, Inc.