Your Ad Here
首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 操作系统 > 其他操作系统 > How to set up a diskless OpenBSD in Sun Sparc
【标  题】:How to set up a diskless OpenBSD in Sun Sparc
【关键字】:How,to,set,up,diskless,OpenBSD,in,Sun,Sparc
【来  源】:http://blog.chinaunix.net/article.php?articleId=18814&blogId=2389

How to set up a diskless OpenBSD in Sun Sparc

Your Ad Here In my case I had an old Sun SparcStation IPX and a standard PC running OpenBSD 2.9. What I wanted, was to boot up IPX from the network and mount the root filesystem from a nfs server. In this case the server IP address was 10.10.10.1 (super-gw) and the IPX IP address 10.10.10.2 (super-sparc) and the domain was super.local.

Basically what you need is:

  • rarp daemon to tell IPX its IP address
  • tftp daemon to provide the first stage boot loader
  • rpc.bootparam daemon to provide boot and filesystem parameters for IPX
  • nfs server to provide mount points of root and swap filesystems

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 instructions
  1. Read the diskless(8) man page from OpenBSD. It will explain the whole process and the reasons why diskless setups are somewhat tricky.

  2. 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.
  3. 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
  4. 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.

  5. 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).

  6. 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/etc
    From /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
  7. 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).

  8. 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...

在Sparc机器上网络安装OpenBSD系统:【上一篇】
全国中文核心期刊《机械工程材料》简介:【下一篇】
【相关文章】
  • 在Sparc机器上网络安装OpenBSD系统
  • How does PXE booting work?
  • An other article about DISKLESS
  • 通过com口来管理OpenBSD
  • Diskless, Low-Form-Factor OpenBSD Systems
  • 使用tar或者afio对linux系统进行备份
  • 4.x 的sysinstall 不能安装5.3的系统了;(
  • FreeBSD4.8 IPFW How to
  • 在 linux 上架设 FreeBSD CVSup mirror
  • CICS FOR WINDOWS
  • 【随机文章】
  • new_handler & set_new_handler
  • OSS声卡驱动的安装
  • JavaSE 6基于JSR105的XML签名之理论篇
  • eclipse 与 myEclipse
  • st32171n,st32550n,st32151n,st34520n,st34573n,st392
  • javascript加密与解密
  • 浅谈HFC网络改造
  • 应用系统功能分析设计方法
  • 以Debian方式编译MPlayer CVS
  • 电影下载、播放、制作、转换、各类问题全攻略
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 bbb软讯网络 All Rigths Reserved.