




已阅读5页,还剩6页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Diskless, LowFormFactor OpenBSD SystemsUnix系统 电脑资料 In a previous articlewe built a tiny OpenBSD system out of a Soekris miniature PC, abootstrap workstation, and a Compact Flash (CF) card. While thisbination works nicely for many purposes, once you have Soekriiscattered all around your n Your server must be a NFS server capable of runningdhcpd(8),rarpd(8), andtftpd(8). The server operatingsystemis irrelevant; any BSD, Linux, or even a mercial UNIX will work. Ichose touse a FreeBSD server, simply because I had spare capacity on aserver-gradesystem. (My OpenBSD bootstrap station is a Celeron 433 with a 10GB harddrive. The original desktop user plained that it was unusable, butthe problems disappeared when we removed the original operating system.Its perfectly adequate for any free UNIX, but not exactly what youwant in a server.) Experimenting with an NFS server,rarpd, andtftpdprobably wont affect your environment, but doing unfamiliar things tothe DHCPserver most certainly can, so the main corporate LAN might not be awise choicefor your test bed. For my initial experiments in diskless booting, Iinstalled asecond work card in my diskless server and ran a crossover cablebetweenthat NIC and the Soekris box. Running a private DHCP server on thatinterfaceallowed me to experiment freely without corrupting the corporatework.While developers asking, Why did my machine boot something other thanWindows? would be amusing, it would cause too many meetings. To configure your Soekris box to run properly diskless, you need the MACaddress of its Ether port. Find this by booting the Soekris with a CFcard and runningifconfig(8), or by using a packet sniffer such astcpdumpor Ethereal. When the Soekris boots, it will attempt to grab its IPaddress via DHCP; you can always watch the DHCP logs. All of the rest of our work takes place on the server. (Thats kind of the point, you know.) In the first stage of a diskless boot (as described indiskless(8),a PROM or stage-1 bootstrap fetches a boot program from the diskless bootserver. Where can you find such a bootstrap for OpenBSD/i386? Google revealsa variety of sources, but I chose to go with GRUB for OpenBSD. Cedric Berger has patched GRUB modified to disklessly boot OpenBSD.(This site also has GRUB versions modified to boot OpenBSD on anIntel fxp work card, if youre interested in playing with disklessoperations on a standard PC.) Grab thepxegrub.sis-tty-19200file and put it somewhere safe. The Soekris will use bothdhcpd(8)andrarpd(8)todo its initial configuration.rarpdwill provide the basic IPaddress information, whiledhcpdwill provide boot-timeconfiguration information. Lets start by configuringrarpd. rarpd(8)handles reverse ARP requests. In a normal ARPrequest, a machine has an IP address and requests the matching Ether MACaddress. In reverse ARP, a machine has a MAC address and requests thecorresponding IP address. The Soekris knows its own Ether MAC address andwants an IP address. Differentrarpd(8)implementations have different features andrequirements; cursory checks for FreeBSD, OpenBSD, and Red Hat Linux showdifferent behaviors and different mand-line flags. For example, the FreeBSDrarpdI used expected to be able to provide a boot loader to theclient, and by default ignored requests for which it had no boot loader. Idont want to userarpd(8)to provide the loader information, so Ihad to use the-smand-line switch to tell the program toprovide answers only for those MAC addresses for which it had a mapping. Red HatLinux also defaults to checking for a bootable image, but uses a differentmand-line switch to just provide service. OpenBSDsrarpd(8)simply provides the RARP mapping service without trying to provide a bootableimage. I wont discuss differences in every program we require under everyoperating system; the point is, check your serversmanpages! All monrarpd(8)implementations use/etc/ethersto map MAC addresses to hostnames. My/etc/etherscontains the single line: The hostnamesoekris-diskless.blackhelicoptersmust beavailable in either DNS or/etc/hosts, so that the RARP server can getthe information. Next, the diskless machine will attempt to fetch its boot loader informationfrom the DHCP server. Here, Im usingisc-dhcpd3. While we dont need to group all of our diskless clients together, it will make further expansion simpler. Thefilenamekeyword means you should go grab this file from the TFTP server. Allof our Soekrii need to know about it, so it goes under the groupheading. Each diskless client also needs a separate entry for its MAC address and itsIP address. Once the diskless Soekris has figured out its IP address and whereto getits boot loader, it will attempt to grab that boot loader via TFTP. Allmodern, free, UNIX-like operating systems include a TFTPimplementation, usually run out ofid(8). Again, the manual pages for all of thetftpd(8)servers I checked have slightly different options. On myFreeBSD server, I decided to use/var/tftpbootas the TFTP rootdirectory, symlinked/tftpbootto it, and then set up/etc/id.conflike this: The-lflag tellstftpd(8)to log all requests,which is very helpful when debugging. The-schrootstftpd(8), and the-ntellstftpdto be as quiet as possible. Now, copypxegrub.sis-tty-19200into thetftpbootdirectory. The DHCP server will tell the Soekris to grab and run this file.pxegrubneeds a configuration file:grub.conf.Heres a working example. While you shouldnt have to change any of this for a Soekris, you might wishto edit thekernelline. This example makespxegrublook for a file calledbsdon thetftpdserver andattempt to load it as the kernel. Switch between kernels by changing thisentry. If youre not using a Soekris and wish to change some of the settings (forexample, to use the monitor and keyboard instead of a serial console), checkthe GRUB configuration manual for guidance. Note that the default GRUB configuration file is calledmenu.lst, notgrub.conf;whilepxegrubhas changed the configuration file name, thesettings within the file are all identical to standard GRUB. The kernel will boot the system and should recognize its basic hardware. Atthe point that it needs to mount a root file system, the system will automaticallybroadcast a request for its boot parameters across the local work. Your NFSserver needs to respond to this request viabootparamd(8).bootparamds entire reason for being is to answer broadcastconfiguration requests. These configurations are stored in/etc/bootparams. The first entry on a line is the fully qualified host name of the disklessmachine. In this example, our second entry is the path to the NFS-exportedroot directory for the diskless machine. You can also export swap and dumpdevice information, but we only need the root directory to start. bootparamd(8)requiresrpcbind(8). On FreeBSD, Irun both of these daemons with the-sflag, which causes them todrop privileges as soon as possible. (One mistake I made initially was to haverpcbindattach only to the IP address of the server machine, whichprecludes it from answering broadcast requests. The lesson is, dont be toosecure too quickly when youre trying to make this work!) Exports? Thats right, we need NFS! Fortunately, this is very easy to setup for a single client. The root of our file system is in/var/obsd/diskless-soekris/rootand we only need to export it to asingle host. Heres an/etc/exportsfor our FreeBSD server. Well also have to start the NFS server daemons at boot. By the time weredone, the FreeBSD server has the following set in/etc/rc.conf: Put the proper interface name in therarpd_flagsfield for yourserver. You then need an OpenBSD file system under your exported root. Thatsactually quite easy to do. You could just mount the root directory from yourOpenBSD bootstrap station and copy the entire system withtar-xvpf, but that will give you everything on your bootstrap station.(The-pflag is important; it preserves ownership information.)Another way to get a small image is to use the file system prepared for aCompact Flash system; youll have only the minimal files required, but caneasily add more. Copy over the/etc/rc.*files from yourbootstrap station anyway, as OpenBSDs startup system has specific features fordiskless operations. You will also have to do some debugging of the startupprocess, however, and create some directories under/varif youchoose this option. Finally, you could simply extract some OpenBSDdistribution tarballs in that directory and install vital/etcfiles from your bootstrap station. OpenBSD provides a kernel configuration specifically for i386 disklessoperations. Its called DISKLESS. Remember, the OpenBSD folks are primarilyinterested in supporting the GENERIC kernel; youll have minimal support if youuse a non-GENERIC kernel. However, in my experience, the DISKLESS kernel configurationis quite stable and reliable. As long as youre on a custom kernel anyway, you can make your life a littleeasier by equalizing the serial console speeds. The Soekris uses a serialconsole speed of 19200, while OpenBSD defaults to 9600. If you connect to theserial console at 19200, the Soekris boot messages will be legible, but theO
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年浙江大学医学院附属第二医院招聘医师助理人员若干人模拟试卷及答案详解(名师系列)
- 2025河南新乡市辉县市大成高级中学招聘考前自测高频考点模拟试题及一套答案详解
- 湖南襄阳南漳县招聘事业单位工作人员考试真题2024
- 2025年中国海峡人才市场将乐工作部见习生招聘2人考前自测高频考点模拟试题及答案详解(考点梳理)
- 2025北京化工大学化办公室(中心)招聘1人考前自测高频考点模拟试题及答案详解(有一套)
- 2025海南省农业学校招聘35人考前自测高频考点模拟试题及一套答案详解
- 2025广东广州市花山物业管理有限公司招聘人员模拟试卷及完整答案详解
- 2025赤峰环保投资有限公司招聘3人考前自测高频考点模拟试题及答案详解(名校卷)
- 2025安徽工程大学硕士专职辅导员招聘8人模拟试卷及参考答案详解
- 2025江苏盐城工学院招聘专职辅导员13人考前自测高频考点模拟试题及答案详解(有一套)
- 《西方管理思想史》课件
- 纽伦堡审判国际法
- 电力建设“五新”技术
- 2024年中国东方航空集团招聘笔试参考题库含答案解析
- 妇产科国家临床重点专科验收汇报
- 2023国际功能、残疾和健康分类康复组合(ICF-RS)评定标准
- GB/T 17529.1-2023工业用丙烯酸及酯第1部分:工业用丙烯酸
- 《现代企业管理》全套课件
- 设备保管协议书
- 控制阀培训课件
- 三年级上册语文人教版《练习册》答案
评论
0/150
提交评论