分类: BSD
2005-03-31 20:53:38
Basically what you need is:
Files you must modify:
/etc/ethers
/etc/hosts
/etc/bootparams
/etc/exports
If you want to start daemon services automatically you need to modify:
/etc/rc.conf
/etc/inetd.conf
rpc.bootparamd will be started automatically if the /etc/bootparams file exists.
Step by step instructionsRead the man page from . It will explain the whole process and the reasons why diskless setups are somewhat tricky.
Find out the hardware address of your IPX box (le0 interface). In power on reset IPX will show it:
SPARCstation IPX, Type 4 Keyboard
ROM Rev. 2.3, 64 MB Memory installed, Serial #2103274
Ethernet address 8:0:20:b:a1:cd, Host ID: 572017ea.
Set up rarp daemon that IPX will get its ip-address.
# echo '8:0:20:b:a1:cd super-sparc' >> /etc/ethers
# echo '10.10.10.2 super-sparc.super.local super-sparc' >> /etc/hosts
and start the rarpd:
# /usr/sbin/rarpd -a
Create /tftpboot directory and make it world readable with chmod and copy boot.net file from the OpenBSD 2.9 Sparc distribution to there. That file is the boot program which will be loaded by the first stage boot loader of IPX. Make a link which name is composed of the IP address assigned to IPX in a hexadecimal format, a dot, and the architecture name (all upper case). If the IP address will be 10.10.10.2 and the system is IPX the link name will be 0A0A0A02.SUN4C
# cd /tftpboot
# ln -s boot.net 0A0A0A02.SUN4C
Edit the /etc/inetd.conf to allow tftp daemon to run and restart inetd.
Now you can test the IPX load the boot loader program. In IPX boot prompt type b net:
Type b (boot), c (continue), or n (new command mode)
> b net
and it should start downloading boot.net file. After downloading, IPX will freeze for 5-7 minutes but this is normal. IPX is trying to get an acknowledgement packet from the tftp server but the OpenBSD tftp daemon is not designated to respond. This inconvenience can be solved by hacking the code or compiling a different tftp daemon :-)
When you get a message:
Boot device: /sbus/le@0,c00000 File and args:
12200 receive failed
>> OpenBSD BOOT 2.1
You know that the OpenBSD boot program was executed (don't care about the "receive failed" message, it will appear for above reason).
Next task is to prepare a filesystem for IPX. This is done by using default package sets from the OpenBSD Sparc distribution. Create /export/super-sparc/root directory and exctract at least base29.tgz and etc29.tgz to there from the OpenBSD Sparc distribution.
# mkdir /export
# mkdir /export/super-sparc
# mkdir /export/super-sparc/root
# cd /export/super-sparc/root
# tar -zxf [OpenBSD-Source]/sparc/base29.tgz
# tar -zxf [OpenBSD-Source]/sparc/etc29.tgz
Check that the kernel image (bsd) can be found from /export/super-sparc/root directory
Create special devices to dev directory:
# cd /export/super-sparc/root/dev
# ./MAKEDEV all
Copy hosts to etc
# cp /etc/hosts /export/super-sparc/root/etcFrom /export/super-sparc/root/etc change myname and hostname.if
# cd /export/super-sparc/root/etc
# echo 'super-sparc' > myname
# echo 'inet 10.10.10.2 255.255.255.0' > hostname.le0
Create 128MB (can be smaller) swap file to /export/super-sparc
# dd bs=128k count=1024 if=/dev/zero of=/export/super-sparc/swap
Set up a rpc daemon. First edit /etc/bootparams:
# echo 'super-sparc root=super-gw:/export/super-sparc/root
swap=super-gw:/export/super-sparc/swap' >> /etc/bootparams
and start rpc.bootpramd:
# /usr/sbin/rpc.bootpramd
Now the OpenBSD boot loader will know where look for root and swap filesystems and the kernel image (bsd for default).
Last thing is to set up a nfs share for the super-sparc root filesystem. Edit /etc/exports:
# echo '/export/super-sparc/root -maproot=root -alldirs
super-sparc' >> /etc/exports
and start the nfs daemon:
# /sbin/nfsd
Now you should be able to boot the kernel from the network and mount root and swap filesystems. There is of course a lot more tuning in the system after this but at least now you got it running...