Since we cannot access any local disks (see preface), we need to boot over the network. This requires our root (/) filesystem to be on the network as well. This means we will have to set up a directory on an NFS server that can be mounted by Linux. This does not have to be a Linux machine (although it has some pro's). In fact, the Sun machine that hosts the SunPCi card will do fine.
Once you have created the root filesystem using one of the methods below, you will need to export it over NFS. You can do this directly from the machine you created the filesystem on, or you can transfer it to another system first. Packing and unpacking the filesystem using tar as root ensures all permissions and file types will be transfered correctly.
For Linux, create an /etc/exports file that looks like this:
/home/sunpci/linix 192.168.0.11(rw,no_root_squash)For Solaris, set up your /etc/dfs/dfstab this way:
share -F nfs -o email@example.com/32,firstname.lastname@example.org/32 /home/sunpci/linuxThe rw option should be clear, the no_root_squash (root= under Solaris) will make sure root users on the SunPCi card have actual root permissions on the nfs filesystem as well. The 192.168.0.11 is the address you will later assign to the SunPCi ethernet interface.
There are two ways to create the SunPCi root directry. Either offline on a seperate system (the NFS server for example), or online booting the SunPCi card with a Linux kernel and a temporary root image.
There are several ways to create the directory structure itself. One possibility is to create the SunPCi root directory from a Linux system you are already using. This method is explained in detail in chapter 3 of the NFS-Root-Client Mini-Howto.
For Debian systems running woody (Debian 3.0), there is even an easier way. The debootstrap script was written especially to accomplish this. On an i386 Debian 3.0+ system, run:
bash# apt-get install debootstrap bash# mkdir -p /home/sunpci/linux bash# debootstrap woody /home/sunpci/linux http://ftp.nl.debian.org/debian
You will have to replace the nl part of the URL with your own country code, or omit it when in the USA. A full list of debian mirrors is at http://www.debian.org/mirror/list . Please note that not all mirrors support the http protocol (if so, use ftp:// instead).
Alternativly, you can boot the system first (see next paragraph) and run debootstrap directly from the SunPCi card. You will need Internet access from the network you connect the SunPCi ethernet interface to.
Debian 2.x had a ready made filesystem in a base2_2.tgz file. This method is no longer used, and these files are no longer available.I have prepared a Debian 3.0 base filesystem using debootstrap on November 15, 2001. It is definately outdated by now, so you'd better create one yourself. It is 22MB, and can be downloaded here: base3_0.tgz.
This is the fun part. How do you boot a machine that has no floppy drive, no cdrom, and no hard drive you can use? Historically RARP, BOOTP and DHCP come to mind. The SunPCi card BIOS does have the option to use the Net device for booting, but this is quite unhandy. Think about switching the BIOS settings back and forth between booting Linux and Windows. Instead, I went the LOADLIN route.LOADLIN.EXE is a DOS utility capable of loading a Linux kernel into memory, effectivly leaving the DOS environment completely. In combination with the SunPCi card, LOADLIN can be used from Caldera OpenDOS or the DOS mode of Windows 95/98. Do not try to run LOADLIN in the DOS-box of a Windows OS. This is bound to blow up in your face. Note: there is a way to boot Windows Millennium into DOS mode, although it is not supported by Microsoft.
We are going to need a kernel and a temporary root filesystem. I compiled a pretty decent 2.4.17 kernel. I am providing the .config file in case you want to rebuild it using a more recent kernel source. As a temporary root filesystem, we'll use the root.bin from the Debian 3.0 bootfloppies set at ftp://ftp.nl.debian.org/debian/dists/woody/main/disks-i386/current/images-1.44/root.bin
You can copy LOADLIN.EXE as well as your linux kernel to the DOS filesystem using drive F: of the Caldera OpenDOS environment.
Create a BAT file named linboot.bat which contains 1 line:
loadlin linux root=/dev/ram initrd=root.bin console=ttyS0 console=tty0I am using ttyS0 as console since the VGA emulation inside Xwindows is too poor to keep up with the amount of text generated by Linux booting up. By using ttyS0, you can connect a serial cable to COM1 of the SunPCi card, and watch the boot from there. Using Solaris connect COM1 with a serial crossover to port B of the Sun and run tip hardwire (or connect it to port A and edit /etc/remote to point hardwire to /dev/term/a). If you use sunpci with the -vga option, you do not need this.
Before going further, let me say 1 more thing about the VGA emulation. You can refresh the screen while running Linux by pressing left Alt + F2 and then left Alt + F1. This switches Linux to tty2 and then back to tty1. You can also use tty3 and tty4 but CDE remaps left Alt + F3 and left Alt + F4. (Gnome remaps left Alt + F2, left Alt + F3 and left Alt + F4 so it is not suitable for this task. Use OpenWindows safely, it does not remap any of these keys.)
Run the batch file! Watch in awe how your SunPCi card boots Linux for the first time.
After booting Linux using the root.bin, you will be presented with a menu based installer. These are the steps that need to be performed.
I did not have much luck mounting my exported NFS directory using bootfloppies version 3.0.15. Any of the above steps can be done manually in tty2 by pressing left Alt + F2, at any time. If the menu based window seems to hang, simply press Ctrl + C and it will restart. The manual steps are:
# ifconfig eth0 192.168.0.11 netmask 255.255.255.0 broadcast 192.168.0.255 up # route add default gw 192.168.0.1 # echo domain xs4all.nl > /etc/resolv.conf # echo nameserver 126.96.36.199 >> /etc/resolv.conf # mount -t nfs -o rw,nolock 192.168.0.2:/home/sunpci/linux /target # debootstrap --arch i386 woody /home/sunpci/linux http://ftp.nl.debian.org/debian
The base root filesystem you have created was not designed to be booted directly over NFS. Some changes need to be made for it to work. You can make these changes while running Linux (using the linboot.bat file) from the SunPCi card, or directly on the NFS server.
These changes absolutely need to be made before the first NFS boot is attempted. Things will break if you boot without them.
# /etc/fstab: static file system information. # # <file system> <mount point> <type> <options> <dump> <pass> 192.168.0.2:/home/sunpci/linux / nfs defaults 0 0 proc /proc proc defaults 0 0
These changes need to be made to the root filesystem at one point in time. They are not required for your system to boot properly, but it doesn't hurt making them prior to that joyous event.
192.168.0.11 sunpci # SunPCi-IIpro card 192.168.0.2 surian # Solaris 8 machine 127.0.0.1 localhost
domain xs4all.nl search xs4all.nl vdberg.org nameserver 188.8.131.52 nameserver 184.108.40.206 nameserver 220.127.116.11