Subject: PXE boot support
To: None <port-i386@netbsd.org>
From: Jason R Thorpe <thorpej@wasabisystems.com>
List: port-i386
Date: 02/16/2002 15:25:39
Folks...

Last night I committed support for network booting PXE-capable i386
systems.  You can do standard NFS-root file systems using this with
no special PXE-specific DHCP server configuration parameters.

Right now, only loading the kernel from NFS really works properly.  I'm
going to make some improvements to libsa to make it possible to use TFTP
more effectively.  I'll also write up some documentation as soon as I
work out all the DHCP server vendor extension configury magic to use TFTP
to load the kernel (useful for mass-installs or embedded targets).

Here is sample output from booting my Soekris net4501:

comBIOS ver. 1.00a 20020118  Copyright (C) 2000-2001 Soekris Engineering.

Soekris Engineering net4501               CPU 80486 128 Mhz 

0064 Mbyte Memory


PXE-M00: BootManage UNDI, PXE-2.0 (build 082)

Bus  0 Slot  0 Vendor 1022 Device 3000  06000000 0006 2280 00 00000000 00 
Bus  0 Slot 18 Vendor 100B Device 0020  02000000 0107 0290 20 0000E001 0A 
Bus  0 Slot 19 Vendor 100B Device 0020  02000000 0107 0290 20 0000E101 0B 
Bus  0 Slot 20 Vendor 100B Device 0020  02000000 0107 0290 20 0000E201 05 


 1 Seconds to automatic boot.   Press Ctrl-P for entering Monitor.

BootManage UNDI, PXE-2.0 (build 082)
BootManage PXE-2.0 PROM 1.0, NATSEC 1.0, SDK 3.0/082 (OEM52)
Copyright (C) 1989,2000 bootix Technology GmbH, D-41466 Neuss.
PXE Software Copyright (C) 1997, 1998, 1999, 2000 Intel Corporation.
Licensed to National Semiconductor

CLIENT MAC ADDR: 00 00 24 C0 2F 90  
CLIENT IP: 10.0.0.4  MASK: 255.255.255.0  DHCP IP: 10.0.0.1                    

>> NetBSD/i386 PXE Boot, Revision 1.0
>> (root@dr-evil, Sat Feb 16 13:43:07 PST 2002)
>> Memory: 577/64512 k
Press return to boot now, any other key for boot menu
Starting in 0 
PXE BIOS Version 2.1
Using PCI device at bus 0 device 18 function 0
pxe0: Ethernet address 00:00:24:c0:2f:90
1161696+22412+162824 [94496+74321]=0x1732ac
[ using 169272 bytes of netbsd ELF symbol table ]
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 1.5ZA (net4501) #5: Sat Feb 16 13:54:45 PST 2002
    thorpej@dr-evil:/u1/netbsd/src/sys/arch/i386/compile/net4501
cpu0: AMD Am5x86 W/B 133/160 (486-class)
cpu0: features 1<FPU>
total memory = 65088 KB
avail memory = 58652 KB
using 839 buffers containing 3356 KB of memory
BIOS32 rev. 0 found at 0xf00c0
mainbus0 (root)
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled
pchb0 at pci0 dev 0 function 0
pchb0: vendor 0x1022 product 0x3000 (rev. 0x00)
sip0 at pci0 dev 18 function 0: NatSemi DP83815 10/100 Ethernet
sip0: interrupting at irq 10
sip0: Ethernet address 00:00:24:c0:2f:90
nsphyter0 at sip0 phy 0: DP83815 10/100 media interface, rev. 1
nsphyter0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
sip1 at pci0 dev 19 function 0: NatSemi DP83815 10/100 Ethernet
sip1: interrupting at irq 11
sip1: Ethernet address 00:00:24:c0:2f:91
nsphyter1 at sip1 phy 0: DP83815 10/100 media interface, rev. 1
nsphyter1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
sip2 at pci0 dev 20 function 0: NatSemi DP83815 10/100 Ethernet
sip2: interrupting at irq 5
sip2: Ethernet address 00:00:24:c0:2f:92
nsphyter2 at sip2 phy 0: DP83815 10/100 media interface, rev. 1
nsphyter2: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
isa0 at mainbus0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com0: console
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
wdc0 at isa0 port 0x1f0-0x1f7 irq 14
npx0 at isa0 port 0xf0-0xff: using exception 16
biomask f3c7 netmask ffe7 ttymask ffe7
boot device: sip0
root on sip0
nfs_boot: trying DHCP/BOOTP
nfs_boot: DHCP next-server: 10.0.0.1
nfs_boot: my_addr=10.0.0.4
nfs_boot: my_mask=255.255.255.0
root on 10.0.0.1:/u1/diskless/net4501
root file system type: nfs
Sat Feb 16 21:14:45 UTC 2002
Starting file system checks:
Setting tty flags.
Setting sysctl variables:
Starting network.
Hostname: net4501
add net 127.0.0.0: gateway 127.0.0.1
add net fe80::: gateway ::1
add net fec0::: gateway ::1
add net ::ffff:0.0.0.0: gateway ::1
add net ::224.0.0.0: gateway ::1
add net ::127.0.0.0: gateway ::1
add net ::0.0.0.0: gateway ::1
add net ::255.0.0.0: gateway ::1
add net 2002:e000::: gateway ::1
add net 2002:7f00::: gateway ::1
add net 2002:0000::: gateway ::1
add net 2002:ff00::: gateway ::1
add net ::0.0.0.0: gateway ::1
IPv6 mode: host
Configuring network interfaces:.
Building databases...
Starting syslogd.
Checking for core dump...
savecore: no core dump (no dumpdev)
Mounting all filesystems...
Clearing /tmp.
Starting virecover.
Checking quotas: done.
swapctl: adding /swapfile as swap device at priority 0
Creating a.out runtime link editor directory cache.
Updating motd.
starting local daemons:.
Starting inetd.
Starting cron.
Sat Feb 16 21:15:01 UTC 2002

NetBSD/i386 (net4501) (console)

login: 

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>