In the absence of recent netboot images, you might find these notes useful. These describe how to install Gentoo without the use of a netboot image, but rather, making your own, and using root-over-NFS. This same guide can also be used to port Gentoo to other presently unsupported MIPS hardware.
What you need…
You’ll need about 200MB or so (the more the better) on the netboot server to house a root filesystem. In addition to the tools mentioned in the handbook, you’ll also want nfs-utils installed to export the client’s root FS.
You’ll also want a cross-compiler. You only need to be able to build a kernel — libc is not necessary. To generate such a compiler, install the sys-devel/crossdev package, and run crossdev -t mips64-unknown-linux-gnu -S1 (or mips64el for Cobalt/little endian targets). If the build fails, try various versions of binutils and gcc, it may be a little tinkering to get a combo that works.
IP28 users will want to enable the ip28 USE-flag on in /etc/portage/package.keywords for the cross-mips64-unknown-linux-gnu/gcc package.
Unpacking and setting up the root fs…
Download the stage 3 tarball, and unpack that into a directory on your server. Then, export it by editing /etc/exports, and adding a line like the following:
Remember to reload your NFS server config by typing /etc/init.d/nfs reload.
Building the kernel…
Start by unpacking the kernel with appropriate USE flags set (USE=ip28 for IP28 users, USE=ip30 for Octane users, USE=cobalt for Cobalt users). This is done with the following command (adjust if your PORTDIR is in a different place):
# USE=ip28 \ ebuild /usr/portage/sys-kernel/mips-sources/mips-sources-VERSION.ebuild \ unpack
If all goes well, you’ll have a copy of the patched kernel tree in /var/tmp/sys-kernel/mips-sources-VERSION/work/linux-VERSION. Change to that directory, and configure the kernel as per the guide in the Gentoo/MIPS handbook, passing ARCH=mips CROSS_COMPILE=mips64-unknown-linux-gnu- (or mips64el…) to all make calls. If you want to use the .config that comes with one of the old netboot images, you can use scripts/extract-ikconfig to extract it.
Remember to say Y to your network card driver, and these options:
- Root-over-NFS support
- NFS Client support
- IP Level Autoconfiguration (DHCP)
Once you’ve compiled your kernel and have your vmlinux (or vmlinux.32) file, copy this file to your server’s /nfsroot (Cobalt hardware) or /tftproot (almost anything else) directory in place of the usual Gentoo netboot image. For kernel modules, install them by typing make CROSS_COMPILE=”…” INSTALL_MOD_PATH=/unpacked/stage3/path modules_install.
You may also find it helpful to place a copy of the stage 3 tarball and kernel inside the NFS root area for convenient access on the final host.
Booting the system…
Break into the command monitor prompt as per the handbook, and at the prompt, type the following (all on one line):
>> bootp(): root=/dev/nfs ip=dhcp init=/bin/bash nfsroot=ip.of.root.server:/unpacked/stage3/path
This assumes you have one of my netboot images already unpacked in /nfsroot and that you’ve placed your freshly compiled kernel in /nfsroot as well.
Compress the kernel image using gzip -9, and rename it to kernel.gz (overwriting the existing file). Then edit the default.colo file … the execute line should read (place this on one line):
execute root=/dev/nfs ip=dhcp init=/bin/bash nfsroot=ip.of.root.server:/unpacked/stage3/path
Netboot the Cobalt system in the usual way.
Hit ESC a few times to break into the PMON2000 prompt… then type the following (each on one line):
PMON> ifaddr rtl0 lemote_box_ip_addr # (e.g. 10.0.0.8) PMON> load tftp://tftp_server_ip_addr/kernel_name PMON> g console=tty0 root=/dev/nfs ip=dhcp nfsroot=ip.of.root.server:/unpacked/stage3/path
In all cases, you should be at a prompt. Proceed with the Gentoo/MIPS handbook instructions as per normal at this point. 🙂