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

📄 mknbi.1

📁 linux下从网卡远程启动
💻 1
📖 第 1 页 / 共 2 页
字号:
These can be used to modify the kernel loading process at runtime. Touse these options with \s-1ISC\s0 \s-1DHCPD\s0 v3, a popular \s-1DHCP\s0 daemon, the syntaxis as below. You will need to adjust the syntax for other \s-1DHCP\s0 or \s-1BOOTP\s0daemons..PPoption etherboot-signature code 128 = string;.PPoption kernel-parameters code 129 = text;.PP\&....PP.Vb 1\&                option etherboot-signature E4:45:74:68:00:00;.Ve.PP.Vb 1\&                option kernel-parameters "INITRD_DBG=6 NIC=3c509";.Ve.PPOption 128 is required to be the six byte signature above. See thevendortags appendix of the Etherboot user manual for details..PPThe following option is presently supported by \fBmkelf-linux\fR:.PP\&\fB129\fR The \fIstring\fR 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 \s-1DMA\s0 channels required for special hardwarelike \s-1SCSI\s0 adapters, network cards etc. Please consult the Linux kerneldocumentation about the syntax required by those options. It is the sameas the \fB\-\-append\fR command line option to \fBmkelf-linux\fR, but works atboot time instead of image build time..PP\&\fB130\fR With this option it is possible to the select the network adapterused for mounting root via \s-1NFS\s0 on a multihomed diskless client. Thesyntax for the \fIstring\fR value is the same as for the \f(CW\*(C`dev\*(C'\fR entry usedwith the \fB\-\-ip=\fR option as described above. However note that the\&\fBmkelf-linux\fR runtime setup routine does not check the syntax of thestring..SH "MKNBI-ROM".IX Header "MKNBI-ROM"\&\fBmknbi-rom\fR makes a boot image from an Etherboot \f(CW\*(C`.rom\*(C'\fR or \f(CW\*(C`.zrom\*(C'\fRboot \s-1ROM\s0 image.  This allows it to be netbooted using an existing\&\s-1ROM\s0. This is useful for developing Etherboot drivers or to load a newerversion of Etherboot with an older one..PPRun mknbi-rom like this:.PPmknbi-rom nic.zrom > nic.nb.PPMove \fInic.nb\fR to where the network booting process expects to find it.The boot \s-1ROM\s0 will load this as the \fIoperating system\fR and execute the\&\s-1ROM\s0 image..SH "MKELF-IMG".IX Header "MKELF-IMG"\&\fBmkelf-img\fR makes a boot image from an Etherboot \f(CW\*(C`.img\*(C'\fR or \f(CW\*(C`.zimg\*(C'\fRimage.  This allows it to be netbooted using an existing \s-1ROM\s0. This isuseful for developing Etherboot drivers or to load a newer version ofEtherboot with an older one..PPRun mkelf-img like this:.PPmkelf-img nic.zimg > nic.nb.PPMove \fInic.nb\fR to where the network booting process expects to find it.The boot \s-1ROM\s0 will load this as the \fIoperating system\fR and execute theimage..PPNote that this does not test the \s-1ROM\s0 loader portion that's in a \f(CW\*(C`.z?rom\*(C'\fRimage, but not in a \f(CW\*(C`.z?img\*(C'\fR..SH "MKELF-MENU".IX Header "MKELF-MENU"\&\fBmkelf-menu\fR and \fBmknbi-menu\fR make a boot image from an auxiliary menuprogram. Etherboot has the ability to load an auxiliary program whichcan interact with the user, modify the \s-1DHCP\s0 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..PP\&\fBmkelf-menu\fR and \fBmknbi-menu\fR take a binary named \f(CW\*(C`menu\*(C'\fR 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..PPCurrently, 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 \s-1TFTP\s0 loads don'twork. You should not have \s-1MOTD\s0 or \s-1IMAGE_MENU\s0 defined in your Etherbootbuild to be able to use this external menu binary. The specifications ofthe \s-1DHCP\s0 option required is in the vendortags document in the Etherbootuser manual..PPTypical usage is like this:.PPmkelf-menu > menu.nb.PPThen put menu.nb in the \s-1TFTP\s0 boot directory and edit your \s-1DHCP\s0 optionsaccording to the documentation..PPAlternate user interface programs are highly encouraged..SH "MKELF-NFL".IX Header "MKELF-NFL"\&\fBmkelf-nfl\fR and \fBmknbi-nfl\fR make a boot image from the \s-1NFL\s0 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 \s-1GRUB\s0.  There is asample menu-text-file in \f(CW\*(C`menu\-nfl.eg\*(C'\fR. The special entry \*(L"QuitEtherboot\*(R" (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 \s-1BIOS\s0 in the case of ROMs..PPTypical usage is:.PPmkelf-nfl \fImenu-text-file\fR > nfl.nb.PPThen put nfl.nb in the \s-1TFTP\s0 boot directory and specify as the bootimage. Chaining to other menus works..PPEnhancements to the menu format accepted to specify other features suchas titles, timeout, colours, and so forth are highly encouraged..SH "MKELF-LUA".IX Header "MKELF-LUA"\&\fBmkelf-lua\fR makes an \s-1ELF\s0 image from a precompiled Lua(\f(CW\*(C`http://www.tecgraf.puc\-rio.br/lua/\*(C'\fR) program..PPTypical usage is:.PPmkelf-lua hello.lb > luaprog.nb.PPwhere \f(CW\*(C`hello.lb\*(C'\fR was generated from a Lua program by:.PPluac \-o hello.lb hello.lua.PPThe functions available to Lua programs in this environment is describedin a separate document..SH "MKNBI-FDOS".IX Header "MKNBI-FDOS"\&\fBmknbi-fdos\fR 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 \fIfloppy\fR by the kernel image filecan now be used for applications and data..PPObtain 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:.PP\&\f(CW\*(C`http://freedos.sourceforge.net/\*(C'\fR.PPFollow the instructions to make a bootable floppy. Then get an imageof the floppy with:.PPdd if=/dev/fd0 of=/tmp/floppyimage.PPAlso extract \fIkernel.sys\fR from the floppy. You can do this from theimage using the mtools package, by specifying a file as a \fIdrive\fRwith a declaration like this in \fI~/.mtoolsrc\fR:.PPdrive x: file=\*(L"/tmp/floppyimage\*(R".PPThen run:.PPmcopy x:kernel.sys ..PPThen run mknbi by:.PPmknbi-fdos kernel.sys /tmp/floppyimage > freedos.nb.PPwhere \fIkernel.sys\fR and \fI/tmp/floppyimage\fR are the files extracted above.Then move \fIfreedos.nb\fR to where the network booting process expects tofind it..PPIf you have got it to netboot successfully, then you can go back andadd your files to the floppy image. You can delete \fIkernel.sys\fR 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..SH "MKNBI-FDOS OPTIONS".IX Header "MKNBI-FDOS OPTIONS"\&\fB\-\-harddisk\fR 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 \*(L"disk size\*(R" in the boot image is not raised by thisoption so that is not a reason to use this option. This option isincompatible with \-\-disableharddisk..PP\&\fB\-\-disableharddisk\fR 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 \s-1DOS\s0. This option isincompatible with \-\-harddisk..PP\&\fB\-\-nosquash\fR Do not try to chop unused sectors from the end of thefloppy image. This increases the boot image size and hence loadingtime if the \s-1FAT\s0 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..PP\&\fB\-\-rdbase=\fR\fI0xNNNNNNNN\fR 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..SH "MKNBI-DOS".IX Header "MKNBI-DOS"\&\fBmknbi-dos\fR makes a boot image from a floppy image containing abootable \s-1DOS\s0 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 \s-1DOS\s0 kernel files youwill copy in the next step:.PPdd if=/dev/fd0 of=bootblock bs=512 count=1.PPThen get the \s-1DOS\s0 kernel files (this is correct for \s-1DR\-DOS\s0, the namesare different in \s-1MS\-DOS\s0, \s-1IO\s0.SYS and \s-1MSDOS\s0.SYS):.PPmcopy a:IBMBIO.COM a:IBMDOS.COM a:COMMAND.COM ..PPNext make an entry in \fI~/.mtoolsrc\fR to declare a floppy to be mappedto a file:.PPdrive x: file=\*(L"/tmp/floppyimage\*(R".PPNow format a floppy of the desired size, in this example a 2.88 \s-1MB\s0 floppy,at the same time writing the bootblock onto it:.PPmformat \-C \-t 80 \-s 36 \-h 2 \-B bootblock x:.PPThe size of the \*(L"floppy\*(R" is only limited by the limits on the number ofcylinders, sectors and heads, which are 1023, 63 and 255 respectively,and the amount of \s-1RAM\s0 you are willing to allocate to the \*(L"floppy\*(R" inmemory. As \s-1RAM\s0 is precious, choose a size slightly bigger than what isneeded to hold your \*(L"floppy\*(R" files..PPFinally, copy all your desired files onto the floppy:.PPmcopy \s-1IBMBIO\s0.COM x:.PPmcopy \s-1IBMDOS\s0.COM x:.PPmcopy \s-1COMMAND\s0.COM x:.PPmcopy \s-1CONFIG\s0.SYS \s-1AUTOEXEC\s0.BAT \s-1APP\s0.EXE \s-1APP\s0.DAT ... x:.PPFor MS-DOS substitute \s-1IO\s0.SYS for \s-1IBMIO\s0.COM, and \s-1MSDOS\s0.SYS for\&\s-1IBMDOS\s0.COM.  The case of the files must be preserved, it may not work if\&\s-1VFAT\s0 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 \s-1IO\s0.SYS, \s-1MSDOS\s0.SYS.  Possibly too\&\s-1COMMAND\s0.COM has to be the third entry so we play safe.  Thanks to PhilDavey and Phillip Roa for these tips..PPI 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 \s-1IO\s0.SYS the first file on thedisk, or this bootblock will not work..PPIf 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:.PPdd if=/tmp/floppyimage of=/dev/fd0.PPThen run mknbi-dos over the image \fI/tmp/floppyimage\fR to create aboot image:.PPmknbi-dos /tmp/floppyimage > dos.nb.PPMove \fIdos.nb\fR to where the network booting process expects to find it..SH "MKNBI-DOS OPTIONS".IX Header "MKNBI-DOS OPTIONS"\&\fB\-\-harddisk\fR 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 \*(L"disk size\*(R" in the boot image is not raised by thisoption so that is not a reason to use this option. This option isincompatible with \-\-disableharddisk..PP\&\fB\-\-disableharddisk\fR 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 \s-1DOS\s0. This option isincompatible with \-\-harddisk..PP\&\fB\-\-nosquash\fR Do not try to chop unused sectors from the end of thefloppy image. This increases the boot image size and hence loadingtime if the \s-1FAT\s0 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..PP\&\fB\-\-rdbase=\fR\fI0xNNNNNNNN\fR 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..SH "BUGS".IX Header "BUGS"Please report all bugs to Etherboot users mailing list:<https://sourceforge.net/mail/?group_id=4233>.SH "SEE ALSO".IX Header "SEE ALSO"Etherboot tutorial at \f(CW\*(C`http://etherboot.sourceforge.net/\*(C'\fR Mtools packageis at \f(CW\*(C`http://wauug.erols.com/pub/knaff/mtools/\*(C'\fR Make sure you have arecent version, the ability to map a drive to a file is not present inold versions..SH "COPYRIGHT".IX Header "COPYRIGHT"\&\fBmknbi\fR is under the \s-1GNU\s0 Public License.SH "AUTHOR".IX Header "AUTHOR"Ken Yap.PPmk{elf,nbi}\-nfl was contributed by Robb Main of Genedyne..SH "DATE".IX Header "DATE"See man page footer for date and version. Sorry, not available in the\&\s-1HTML\s0 version.

⌨️ 快捷键说明

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