⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mknbi.pl

📁 linux下从网卡远程启动
💻 PL
📖 第 1 页 / 共 3 页
字号:
interface is installed in the client, this I<dev> entry including thepreceding semicolon can be left out. The I<proto> argument is one of theIP autoconfiguration enabling options listed above.  (Author: it's notclear to me what the IP autoconfiguration does when the parameters arealready specified.  Perhaps it's to obtain parameters not specified,e.g. NIS domain.)B<--rdbase=>I<top|asis|0xNNNNNNNN> Set the ramdisk load address.  C<top>moves the ramdisk to the top of memory before jumping to the kernel.This is the default if rdbase is not specified.  This option requiresthat first-linux's kernel sizing work correctly.  C<asis> loads it at0x100000 (1MB) if the kernel is loaded low; or leaves it just after thekernel in memory, if the kernel is loaded high. For this option to work,the kernel must be able to handle ramdisks at these addresses.I<0xNNNNNNNN> moves the ramdisk to the hex address specified. The onusis on the user to specify a suitable address that is acceptable to thekernel and doesn't overlap with any other segments. It will have to bealigned to a 4k byte boundary so you should ensure that this is so. (Thelast three hex digits must be 0.)B<--first32=>I<program> Override the default first stage setupprogram.  It can be used to call extensions to the Etherboot code, whichpaves the way for additional useful functionality without enlarging thesize of the Etherboot footprint.  --first32 is implied by the ELFformat.B<--progreturns> This option is used in conjunction with and only validwith the --first32 option to indicate to the Etherboot loader that thecalled program will return to loader and hence Etherboot should notdisable the network device as is the case when the program will neverreturn to Etherboot.B<--relocseg=>I<segaddr> This option is used to specify a relocation ofthe Linux first, boot, setup, and parameter segments to another 64kband.  Currently the only valid values are 0x9000 and 0x8000,corresponding to linear addresses of 0x90000 and 0x80000 upwards. Thedefault is 0x9000.  Usually you use this option if you have relocatedEtherboot to 0x84000 to avoid other code in the 0x90000 segment likeDOC. The Linux kernel must support relocation which implies a 2.4 kernelor later. --relocseg only works reliably with ELF or --first32=.B<mem=>I<memsize> This is not a command line option but a kernelparameter that is intercepted by the first32 stage and used as the topof memory, to match Linux's interpretation. I<memsize> can be suffixedby C<G> to indicate gibibytes (times 2^30), C<M> to indicate mebibytes(times 2^20) or C<K> to indicate kibibytes (times 2^10). Note that thesuffixes are uppercase. This kernel parameter can be specified in--append= or option-129 of the DHCP/BOOTP record.Run the program thus:mkelf-linux I<kernel-image> [I<ramdisk-image>] > linux.nbThen move F<linux.nb> to where the network booting process expects tofind it.=head1 MKELF-LINUX BOOTP/DHCP VENDOR TAGSB<mkelf-linux> includes a startup code at the beginning of the Linuxkernel which is able to detect certain DHCP vendor defined options.These can be used to modify the kernel loading process at runtime. Touse these options with ISC DHCPD v3, a popular DHCP daemon, the syntaxis as below. You will need to adjust the syntax for other DHCP or BOOTPdaemons.option etherboot-signature code 128 = string;option kernel-parameters code 129 = text;...		option etherboot-signature E4:45:74:68:00:00;		option kernel-parameters "INITRD_DBG=6 NIC=3c509";Option 128 is required to be the six byte signature above. See thevendortags appendix of the Etherboot user manual for details.The following option is presently supported by B<mkelf-linux>:B<129> The I<string> value given with this option is appended verbatim tothe end of the kernel command line.  It can be used to specify argumentslike I/O addresses or DMA channels required for special hardwarelike SCSI adapters, network cards etc. Please consult the Linux kerneldocumentation about the syntax required by those options. It is the sameas the B<--append> command line option to B<mkelf-linux>, but works atboot time instead of image build time.B<130> With this option it is possible to the select the network adapterused for mounting root via NFS on a multihomed diskless client. Thesyntax for the I<string> value is the same as for the C<dev> entry usedwith the B<--ip=> option as described above. However note that theB<mkelf-linux> runtime setup routine does not check the syntax of thestring.=head1 MKNBI-ROMB<mknbi-rom> makes a boot image from an Etherboot C<.rom> or C<.zrom>boot ROM image.  This allows it to be netbooted using an existingROM. This is useful for developing Etherboot drivers or to load a newerversion of Etherboot with an older one.Run mknbi-rom like this:mknbi-rom nic.zrom > nic.nbMove F<nic.nb> to where the network booting process expects to find it.The boot ROM will load this as the I<operating system> and execute theROM image.=head1 MKELF-IMGB<mkelf-img> makes a boot image from an Etherboot C<.img> or C<.zimg>image.  This allows it to be netbooted using an existing ROM. This isuseful for developing Etherboot drivers or to load a newer version ofEtherboot with an older one.Run mkelf-img like this:mkelf-img nic.zimg > nic.nbMove F<nic.nb> to where the network booting process expects to find it.The boot ROM will load this as the I<operating system> and execute theimage.Note that this does not test the ROM loader portion that's in a C<.z?rom>image, but not in a C<.z?img>.=head1 MKELF-MENUB<mkelf-menu> and B<mknbi-menu> make a boot image from an auxiliary menuprogram. Etherboot has the ability to load an auxiliary program whichcan interact with the user, modify the DHCP structure, and return astatus.  Based on the status, Etherboot can load another binary, restartor exit.  This makes it possible to have elaborate user interfaceprograms without having to modify Etherboot. The specification forauxiliary program is documented in the Etherboot Developer's Manual.B<mkelf-menu> and B<mknbi-menu> take a binary named C<menu> from thelibrary directory, which is assumed to have an entry point of 0x60000.An optional argument is accepted, and this is loaded at 0x80000. Thiscan be a data file used by the menu program.Currently, the menu binary provided duplicates the builtin menu facilityof Etherboot with the exception of a couple of small differences: noserver or gateway specifications are used and nested TFTP loads don'twork. You should not have MOTD or IMAGE_MENU defined in your Etherbootbuild to be able to use this external menu binary. The specifications ofthe DHCP option required is in the vendortags document in the Etherbootuser manual.Typical usage is like this:mkelf-menu > menu.nbThen put menu.nb in the TFTP boot directory and edit your DHCP optionsaccording to the documentation.Alternate user interface programs are highly encouraged.=head1 MKELF-NFLB<mkelf-nfl> and B<mknbi-nfl> make a boot image from the NFL menuprogram. This menu program takes the names of images from amenu-text-file file which just contains lines with the filenames(relative to the tftpd root directory) of images to load. Theuser-interface is a light-bar, similar to that used in GRUB.  There is asample menu-text-file in C<menu-nfl.eg>. The special entry "QuitEtherboot" (without quotes, of course) can be used in menu-text-filesas an entry that causes Etherboot to quit and return to the invokingenvironment, which is the BIOS in the case of ROMs.Typical usage is:mkelf-nfl I<menu-text-file> > nfl.nbThen put nfl.nb in the TFTP boot directory and specify as the bootimage. Chaining to other menus works.Enhancements to the menu format accepted to specify other features suchas titles, timeout, colours, and so forth are highly encouraged.=head1 MKELF-LUAB<mkelf-lua> makes an ELF image from a precompiled Lua(C<http://www.tecgraf.puc-rio.br/lua/>) program.Typical usage is:mkelf-lua hello.lb > luaprog.nbwhere C<hello.lb> was generated from a Lua program by:luac -o hello.lb hello.luaThe functions available to Lua programs in this environment is describedin a separate document.=head1 MKNBI-FDOSB<mknbi-fdos> makes a boot image from a FreeDOS kernel file and a floppyimage.  Note that the kernel image is not read from the floppy sectionof the boot image, but is a separate section in the boot image. Thebootloader has been adjusted to jump to it directly. This means thespace that would be taken up on the I<floppy> by the kernel image filecan now be used for applications and data.Obtain a distribution of FreeDOS with a recent kernel, probably at least2006. It has been tested with 2012 but nothing older. You can get theFreeDOS kernel here:C<http://freedos.sourceforge.net/>Follow the instructions to make a bootable floppy. Then get an imageof the floppy with:dd if=/dev/fd0 of=/tmp/floppyimageAlso extract F<kernel.sys> from the floppy. You can do this from theimage using the mtools package, by specifying a file as a I<drive>with a declaration like this in F<~/.mtoolsrc>:drive x: file="/tmp/floppyimage"Then run:mcopy x:kernel.sys .Then run mknbi by:mknbi-fdos kernel.sys /tmp/floppyimage > freedos.nbwhere F<kernel.sys> and F</tmp/floppyimage> are the files extracted above.Then move F<freedos.nb> to where the network booting process expects tofind it.If you have got it to netboot successfully, then you can go back andadd your files to the floppy image. You can delete F<kernel.sys> inthe floppy image to save space, that is not needed. Note that you cancreate a floppy image of any size you desire with the mformat programfrom mtools, you are not restricted to the actual size of the boot floppy.=head1 MKNBI-FDOS OPTIONSB<--harddisk> Make the boot ramdisk the first hard disk, i.e. C:. Onereason you might want to do this is because you want to use the realfloppy. The limit on "disk size" in the boot image is not raised by thisoption so that is not a reason to use this option. This option isincompatible with --disableharddisk.B<--disableharddisk> When the ramdisk is simulating a floppy disk drive,this switch will disable hard disk accesses.  This is necessary if theclient should use a network file system as drive C:, which is onlypossible if there are no hard disks found by DOS. This option isincompatible with --harddisk.B<--nosquash> Do not try to chop unused sectors from the end of thefloppy image. This increases the boot image size and hence loadingtime if the FAT filesystem on the floppy is mostly empty but you maywish to use this option if you have doubts as to whether the squashingalgorithm is working correctly.B<--rdbase=>I<0xNNNNNNNN> Set the ramdisk load address. The defaultload address for the ramdisk is 0x110000. It can be moved higher(lower will not work) if for some reason you need to load other stuffat the address it currently occupies. As this is a linear address andnot a segment address, the last 4 bits are not used and should be 0.=head1 MKNBI-DOSB<mknbi-dos> makes a boot image from a floppy image containing abootable DOS filesystem.  It is not necessary to build the filesystem ona physical floppy if you have the mtools package, but you need abootable floppy of any size to start with. First extract the boot blockfrom the floppy, this boot block must match the DOS kernel files youwill copy in the next step:dd if=/dev/fd0 of=bootblock bs=512 count=1Then get the DOS kernel files (this is correct for DR-DOS, the namesare different in MS-DOS, IO.SYS and MSDOS.SYS):mcopy a:IBMBIO.COM a:IBMDOS.COM a:COMMAND.COM .Next make an entry in F<~/.mtoolsrc> to declare a floppy to be mappedto a file:drive x: file="/tmp/floppyimage"Now format a floppy of the desired size, in this example a 2.88 MB floppy,at the same time writing the bootblock onto it:mformat -C -t 80 -s 36 -h 2 -B bootblock x:The size of the "floppy" is only limited by the limits on the number ofcylinders, sectors and heads, which are 1023, 63 and 255 respectively,and the amount of RAM you are willing to allocate to the "floppy" inmemory. As RAM is precious, choose a size slightly bigger than what isneeded to hold your "floppy" files.Finally, copy all your desired files onto the floppy:mcopy IBMBIO.COM x:mcopy IBMDOS.COM x:mcopy COMMAND.COM x:mcopy CONFIG.SYS AUTOEXEC.BAT APP.EXE APP.DAT ... x:For MS-DOS substitute IO.SYS for IBMIO.COM, and MSDOS.SYS forIBMDOS.COM.  The case of the files must be preserved, it may not work ifVFAT lower case names are generated in the floppy image.  Pay attentionto the order of copying as the boot block may expect the first twoentries on a newly formatted disk to be IO.SYS, MSDOS.SYS.  Possibly tooCOMMAND.COM has to be the third entry so we play safe.  Thanks to PhilDavey and Phillip Roa for these tips.I have reports that the bootblock of MS-DOS 6.22 sometimes fails to bootthe ramdisk.  You could try using the boot block from Netboot instead ofgetting the boot block off the floppy. I have provided this boot blockin the distribution as altboot.bin, and in source form as altboot.S andboot.inc. One essential thing is to make IO.SYS the first file on thedisk, or this bootblock will not work.If you happen to have a media of the same size you could test if theimage is bootable by copying it onto the media, and then booting it:dd if=/tmp/floppyimage of=/dev/fd0Then run mknbi-dos over the image F</tmp/floppyimage> to create aboot image:mknbi-dos /tmp/floppyimage > dos.nbMove F<dos.nb> to where the network booting process expects to find it.=head1 MKNBI-DOS OPTIONSB<--harddisk> Make the boot ramdisk the first hard disk, i.e. C:. Onereason you might want to do this is because you want to use the realfloppy. The limit on "disk size" in the boot image is not raised by thisoption so that is not a reason to use this option. This option isincompatible with --disableharddisk.B<--disableharddisk> When the ramdisk is simulating a floppy disk drive,this switch will disable hard disk accesses.  This is necessary if theclient should use a network file system as drive C:, which is onlypossible if there are no hard disks found by DOS. This option isincompatible with --harddisk.B<--nosquash> Do not try to chop unused sectors from the end of thefloppy image. This increases the boot image size and hence loadingtime if the FAT filesystem on the floppy is mostly empty but you maywish to use this option if you have doubts as to whether the squashingalgorithm is working correctly.B<--rdbase=>I<0xNNNNNNNN> Set the ramdisk load address. The defaultload address for the ramdisk is 0x110000. It can be moved higher(lower will not work) if for some reason you need to load other stuffat the address it currently occupies. As this is a linear address andnot a segment address, the last 4 bits are not used and should be 0.=head1 BUGSPlease report all bugs to Etherboot users mailing list:<https://sourceforge.net/mail/?group_id=4233>=head1 SEE ALSOEtherboot tutorial at C<http://etherboot.sourceforge.net/> Mtools packageis at C<http://wauug.erols.com/pub/knaff/mtools/> Make sure you have arecent version, the ability to map a drive to a file is not present inold versions.=head1 COPYRIGHTB<mknbi> is under the GNU Public License=head1 AUTHORKen Yapmk{elf,nbi}-nfl was contributed by Robb Main of Genedyne.=head1 DATESee man page footer for date and version. Sorry, not available in theHTML version.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -