Setting up Fedora Core 3 on the Soekris is relatively easy. Unfortunately, the defaults for the grub.conf make it impossible to use after it reboots for the first time. By default, grub.confhas a splash image set which apparently causes the boot process tohang. I was able to rectify the problem by booting the Soekris via NFS,mounting the fedora boot partition, modifying the /boot/grub/grub.conf file and simply comment out the offending line. That was all it took to fix it. But I still give this distro a BIG THUMBS DOWN for use with the Soekris for that reason alone.
But besides the problem with the grub.conf setting thatprevents the box from rebooting, the distro is very bulky and even theASCII/text based installer is slow to respond. Even if you trim downthe installation options as much as possible (without doing individualpackage selection), it still uses 600MB. You could probably squeeze itdown even more if you actually sit and wait 10 to 15 minutes while theinstaller loads the individual package list so you can trim out thefat, but with so many other distros available that are better suitedfor the Soekris, why bother?
Never the less, everyone is entitled to their own opinion, so I'vegone ahead and documented the process in case someone is bent onrunning FC3 on their Soekris. And if anyone knows a way to edit the grub.conf file before the installer reboots itself, e-mail meand let me know. Otherwise I think this distro is a complete waste oftime for use with the Soekris. NFS booting it just to edit that singlefile is a huge pain in the neck and most people aren't going to bother.
My notes here are an attempt to condense all the information I haveobtained so that people have a simple, single source of informationthat applies specifically to the Soekris net4801.
You don't have to have an existing Fedora Core 3 installation toinstall FC3 on your Soekris. Any Linux, FreeBSD, or Solaris box shoulddo just fine. (I imagine you could even use Mac OSX?) In this example,I will be installing FC3 onto my Soekris machine using Gentoo Linux asthe host.
The first thing that happens when you boot your Soekris box from thenetwork is that it will look for a DHCP server. That being the case,configuring the DHCP server is the first thing you should set up andget working.
If you don't already have a DHCP server running, you need to installit now. In this document, I am using Gentoo Linux as the host machinefor installing FC3. With Gentoo, use emerge to install a DHCP server.
emerge dhcp
Once complete, edit the /etc/dhcp/dhcp.conf file. By default, this file will not exist after a new DHCP install using emerge. There is a /etc/dhcp/dhcp.conf.example file but most likely you can just use my information to setup your config file. Here is my config file.
allow booting;
allow bootp;
option domain-name "example.com";
option domain-name-servers 192.168.1.1 ;
option routers 192.168.1.1;
default-lease-time 600;
max-lease-time 7200;
ddns-update-style none;
log-facility local7;
subnet 192.168.1.0 netmask 255.255.255.0 {
}
host debbox {
hardware ethernet 00:00:00:00:00:00;
fixed-address 192.168.1.4;
next-server 192.168.1.2;
option root-path "/tftpboot";
filename "/soekpxe.0";
}
Obviously you will have to make the necessary MAC and IP addresschanges to match your particular setup. If you don't know the MACaddress of your Eth0 network interface, read the comBIOS section of this document as it explains how to find it.
Make sure the IP address for the next-server directive isthe IP address for your TFTP server. This directive is optional,however it is often needed even if your TFTP server is running on thesame machine as your DHCP server. And I haven't ran into any problemshaving the next-server directive in place even it when it wasn't needed.
Now you should start the DHCP server.
/etc/init.d/dhcp start
If you want your dhcp daemon to run all the time, you should make it part of your boot process.
rc-update add dhcp default
This is worth repeating: running daemons (services) is a securityrisk. Every daemon running on your system is a potential "back door"into your system. I would advise against running the daemon full timeunless you absolutely have to. However, if that is the case, I wouldrecommend setting up some IP and port filtering rules to minimizeaccess to the daemon.
STOP NOW: Before you continue with TFTP setup, you shouldmake absolutely certain your DHCP server is working. Until your DHCPserver is working properly, everything else is a complete waste of time.
You can verify that your DHCP server is working by going to your Soekris box and typing boot f0 at the comBIOS.The process will of course fail after a point because we haven't set upthe other necessary things yet, but you should clearly see the IPaddress printed on the screen. However, you must make absolutely certain that your Soekris box is pulling the IP address from your newly configured DHCP server and NOT from an existing DHCP server on your network.
For example, if you have an existing Linksys/Netgear DHCP server onyour network, your Soekris box might get its IP address from the wrongDHCP server. If that happens, your Soekris will never get past thispoint because it will never contact the TFTP server.
If you have multiple DHCP servers on your network, you will have toeither disable the old one at least until your Soekris box gets its IPaddress from the proper server, or you will have to physically moveyour Soekris box and new DHCP server to another network.
On my own network, I have my primary day-to-day DHCP serverconfigured so that it ignores MAC addresses that I haven't explicityentered in. So my Soekris box has no problem getting an IP address fromthe correct DHCP server because my other DHCP server simply ignores mySoekris box when it requests an IP address.
Again. Make certain your Soekris is getting an IP addressfrom the correct DHCP server before you move on or else you are justgoing to be banging your head into the wall in frustration.
The next thing to do is enable TFTP. TFTP is partof the base installation for FreeBSD and OpenBSD. But if you are usingLinux as the host machine, you will have to install tftp if it wasn't part of your distribution. Gentoo users can simply use emerge.
emerge tftp-hpa
Once tftp-hpa is installed, look at your /etc/conf.d/in.tftpd file. It will look something like this:
# Config file for /etc/init.d/in.tftpd
# Remove the -l if you use [x]inetd
INTFTPD_PATH="/tftpboot"
INTFTPD_OPTS="-l -s $"
Make note of the INTFTPD_PATH entry above. In my example, it is /tftpboot. Either change your /etc/conf.d/in.tftpd so that it also says /tftpboot or write down what it says instead as you will need that next.
Now, create a directory on your file system that matches the INTFTPD_PATH entry.
mkdir /tftpboot.
Next, go to the Fedora website and choose the the best download mirror for your area. Then download initrd.img and vmlinuz from the /pub/fedora/linux/core/3/i386/os/images/pxeboot directory. Save those files to /tftpboot
The download site for Fedora doesn't have a pxelinux.0 so you will need to download it at this web site. Save the file to your home directory (or somewhere else), extract the file, and then copy (or move) it to /tftpboot. I recommend renaming it.
gunzip /home/user/pxelinux.0.gz
mv /home/user/pxelinux.0 /tftpboot/soekpxe.0
Now you have to create a configuration file that tells Linux how to boot.
mkdir /tftpboot/pxelinux.cfg
Now create a file called default inside of /tftpboot/pxelinux.cfg. We only need a few lines inside this file. They are as follows:
DEFAULT soekris
SERIAL 0 9600
label soekris
kernel vmlinuz
append vga=normal initrd=initrd.img ramdisk_size=9372 root=/dev/rd/0 devfs=mount,dall rw text console=ttyS0,9600n81 --
You should now start your tftpd daemon.
/etc/init.d/in.tftpd start
If you want your tftpd daemon to run all the time, you should make it part of your boot process.
rc-update add in.tftpd default
Running daemons (services) is a security risk. Every daemon runningon your system is a potential "back door" into your system. I wouldadvise against running the daemon full time unless you absolutely haveto. However, if that is the case, I would recommend setting up some IPand port filtering rules to minimize access to the daemon.
Everything should be in place now. Reboot your Soekrix box, type boot f0 at the comBIOS to boot from the Network and then you should see something like this.
> boot f0
NSC DP83815/DP83816 Fast Ethernet UNDI, v1.03
Copyright (C) 2002, 2003 National Semiconductor Corporation
All rights reserved.
Pre-boot eXecution Environment PXE-2.0 (build 082)
Copyright (C) 1997-2000 Intel Corporation
CLIENT MAC ADDR: 00 00 24 C3 5E 50
CLIENT IP: 192.168.1.4 MASK: 255.255.255.0 DHCP IP: 192.168.1.10
PXELINUX 2.06 0x3fb30aea Copyright (C) 1994-2003 H. Peter Anvin
Loading vmlinuz..........................
Loading initrd.img....................................................
Ready.
Linux version 2.6.9-1.667 (bhcompile@tweety.build.redhat.com) (gcc version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)) #1 Tue Nov 2 14:41:31 EST 2004
BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 - 0000000008000000 (usable)
BIOS-e820: 00000000fff00000 - 0000000100000000 (reserved)
0MB HIGHMEM available.
128MB LOWMEM available.
zapping low mappings.
DMI not present.
ACPI: Unable to locate RSDP
Built 1 zonelists
Kernel command line: vga=normal initrd=initrd.img ramdisk_size=9372 root=/dev/rd/0 devfs=mount,dall rw console=ttyS0,9600n81 -- BOOT_IMAGE=vmlinuz
Initializing CPU#0
CPU 0 irqstacks, hard=c03de000 soft=c03dd000
PID hash table entries: 1024 (order: 10, 16384 bytes)
Detected 266.663 MHz processor.
Using tsc for high-res timesource
Console: colour dummy device 80x25
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 122796k/131072k available (2096k kernel code, 7788k reserved, 654k data, 144k init, 0k highmem)
Checking if this processor honours the WP bit even in supervisor mode... Ok.
Security Scaffold v1.0.0 initialized
SELinux: Initializing.
SELinux: Starting in permissive mode
There is already a security framework initialized, register_security failed.
selinux_register_security: Registering secondary module capability
Capability LSM initialized as secondary
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
CPU: NSC Unknown stepping 01
Checking 'hlt' instruction... OK.
checking if image is initramfs...it isn't (no cpio magic); looks like an initrd
Freeing initrd memory: 3151k freed
NET: Registered protocol family 16
PCI: PCI BIOS revision 2.00 entry at 0xf7861, last bus=0
PCI: Using configuration type 1
mtrr: v2.0 (20020519)
ACPI: Subsystem revision 20040816
ACPI: Interpreter disabled.
Linux Plug and Play Support v0.97 (c) Adam Belay
usbcore: registered new driver usbfs
usbcore: registered new driver hub
PCI: Probing PCI hardware
PCI: Probing PCI hardware (bus 00)
apm: BIOS not found.
audit: initializing netlink socket (disabled)
audit(1108520803.658:0): initialized
Total HugeTLB memory allocated, 0
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
SELinux: Registering netfilter hooks
Initializing Cryptographic API
ksign: Installing public key data
Loading keyring
- Added public key 809E56CC6E860926
- User ID: Red Hat, Inc. (Kernel Module GPG key)
pci_hotplug: PCI Hot Plug PCI Core version: 0.5
vesafb: probe of vesafb0 failed with error -6
isapnp: Scanning for PnP cards...
isapnp: No Plug & Play device found
Real Time Clock Driver v1.12
Linux agpgart interface v0.100 (c) Dave Jones
i8042.c: Can't read CTR while initializing i8042.
Serial: 8250/16550 driver $Revision: 1.90 $ 8 ports, IRQ sharing enabled
每ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 9372K size 1024 blocksize
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
hda: TOSHIBA MK4309MAT, ATA DISK drive
Using cfq io scheduler
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hda: max request size: 128KiB
hda: 8452080 sectors (4327 MB), CHS=8944/15/63
hda: hda1 hda2 hda3
ide-floppy driver 0.99.newide
usbcore: registered new driver hiddev
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.0:USB HID core driver
mice: PS/2 mouse device common for all mice
md: md driver 0.90.0 MAX_MD_DEVS=256, MD_SB_DISKS=27
NET: Registered protocol family 2
IP: routing cache hash table of 256 buckets, 8Kbytes
TCP: Hash tables configured (established 8192 bind 2340)
Initializing IPsec netlink socket
NET: Registered protocol family 1
NET: Registered protocol family 17
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 filesystem).
Greetings.
anaconda installer init version 10.1.0.2 starting
mounting /proc filesystem... done
mounting /dev/pts (unix98 pty) filesystem... done
mounting /sys filesystem... done
anaconda installer init version 10.1.0.2 using a serial console
remember, cereal is an important part of a nutritionally balanced breakfast.
trying to remount root filesystem read write... done
mounting /tmp as ramfs... done
running install...
running /sbin/loader
G
Note: The boot process pauses for about 40 seconds at this point. I'm not sure exactly what it's doing, but just be patient.
javascript:window.open(this.src);" style="CURSOR: pointer" onload="return imgzoom(this,550)">
Within a minute, you should see an ASCII version of the installer come up.
If you install from the Internet, you might get a little confused when prompted for the FTP/HTTP directory. The directory path should be something like /pub/fedora/linux/core/3/i386/os. Here is a link to the mirror list again.
The installer hesitates for a couple of minutes while it figures out there is no keyboard, mouse, or video card. Be patient.
Running anaconda, the Fedora Core system installer - please wait...
Probing for video card: Unable to probe
Probing for monitor type: Unknown monitor
Probing for mouse type: No - mouse
No video hardware found, assuming headless
Graphical installation not available... Starting text mode.
Make SURE you set console=ttyS0,9600n81 when the Boot Loader Configuration screen comes up.
Wow. Even with absolutely everything unselected, the installer still says it will take 600MB! Definitely not a light weight.
The installer never reports a problem, but after the system reboots, I don't see anything more even though I set the consoleparameter during the install to use the serial port. I try pinging theIP address that I statically assign to the box but it never responds. Idon't enable the firewall so if the system was coming back up, I shouldat lest be able to ping it. The problem appears to be that the bootloader hangs because grub.conf defaults to loading a splash image.