.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "MKNBI 1" .TH MKNBI 1 "2017-04-26" "Mknbi 1.4.4" "Etherboot tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" mknbi \- make network bootable image .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBmknbi\fR \-\-version .PP \&\fBmknbi\fR \-\-format=\fIformat\fR \-\-target=\fItarget\fR [\-\-output=\fIoutputfile\fR] \fItarget-specific-arguments\fR .PP \&\fBmkelf-linux\fR [\-\-output=\fIoutputfile\fR] \fIkernelimage\fR [\fIramdisk\fR] .PP \&\fBmknbi-linux\fR [\-\-output=\fIoutputfile\fR] \fIkernelimage\fR [\fIramdisk\fR] .PP \&\fBmknbi-rom\fR [\-\-output=\fIoutputfile\fR] \fI.z?rom\-file\fR .PP \&\fBmkelf-img\fR [\-\-output=\fIoutputfile\fR] \fI.z?img\-file\fR .PP \&\fBmkelf-menu\fR [\-\-output=\fIoutputfile\fR] [\fIdataimage\fR] .PP \&\fBmknbi-menu\fR [\-\-output=\fIoutputfile\fR] [\fIdataimage\fR] .PP \&\fBmkelf-nfl\fR [\-\-output=\fIoutputfile\fR] [\fIdataimage\fR] .PP \&\fBmknbi-nfl\fR [\-\-output=\fIoutputfile\fR] [\fIdataimage\fR] .PP \&\fBmkelf-lua\fR [\-\-output=\fIoutputfile\fR] \fIluabin\fR .PP \&\fBmknbi-fdos\fR [\-\-output=\fIoutputfile\fR] \fIkernel.sys floppyimage\fR .PP \&\fBmknbi-dos\fR [\-\-output=\fIoutputfile\fR] \fIfloppyimage\fR .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fBmknbi\fR is a program that makes network bootable images for various operating systems suitable for network loading by Etherboot or Netboot, which are \s-1ROM\s0 boot loaders. If you are looking to boot using \s-1PXE,\s0 look no further, mknbi is not what you want. You probably want something like \&\s-1PXELINUX\s0 which is part of the \s-1SYSLINUX\s0 package. .PP \&\fBmknbi\fR \-\-version prints the current version. Use this before reporting problems. .PP \&\fBmknbi\fR can be invoked with the \fB\-\-format\fR and \fB\-\-target\fR options or links can be made to it under format and target specific names. E.g. mkelf-linux is the same as mknbi \-\-format=elf \-\-target=linux. .PP \&\fB\-\-format\fR=\fIformat\fR Specify the format of the output. Currently available are nbi and elf. \s-1ELF\s0 format only works with linux and menu. Otherwise the invocation is the same as for mknbi. In discussions below, the mknbi form is used. .PP \&\fB\-\-target\fR=\fItarget\fR Specify the target binary. Currently available are linux, menu, rom, fdos and dos. \fBmknbi\fR is not needed for booting FreeBSD. .PP \&\fB\-\-output=\fR\fIoutputfile\fR Specify the output file, can be used with all variants. Stdout is the default. .PP The package must be installed in the destination location before the executables can be run, because it looks for library files. .PP Each of the variants will be described separately. .SH "MKELF-LINUX" .IX Header "MKELF-LINUX" \&\fBmkelf-linux\fR and \fBmknbi-linux\fR makes a boot image from a Linux kernel image, either a zImage or a bzImage. .SH "MKELF-LINUX OPTIONS" .IX Header "MKELF-LINUX OPTIONS" \&\fB\-\-param=\fR\fIstring\fR Replace the default parameter string with the specified one. This option overrides all the following options so you should know what you are doing. .PP \&\fB\-\-append\fR=\fIstring\fR Appends the specified string to the existing parameter string. This option operates after the other parameter options have been evaluated. .PP \&\fB\-\-rootdir\fR=\fIrootdir\fR Define name of directory to mount via \s-1NFS\s0 from the boot server. .PP In the absence of this option, the default is to use the directory \&\f(CW\*(C`/tftpboot/\*(C'\fR\fI\f(CI%s\fI\fR, with the \fI\f(CI%s\fI\fR representing the hostname or IP-address of the booting system, depending on whether the hostname attribute is present in the \s-1BOOTP/DHCP\s0 reply. .PP If \f(CW\*(C`rom\*(C'\fR is given, and if the \s-1BOOTP/DHCP\s0 server is able to handle the \s-1RFC 1497\s0 extensions, the value of the rootpath option is used as the root directory. .PP If the name given to the option starts with \f(CW\*(C`/dev/\*(C'\fR, the corresponding device is used as the root device, and no \s-1NFS\s0 directory will be mounted. .PP \&\fB\-\-rootmode\fR=\f(CW\*(C`ro|rw\*(C'\fR Defines whether the root device will be mounted read-only or read-write respectively. Without this parameter, the default is \f(CW\*(C`rw\*(C'\fR. .PP \&\fB\-\-ip=\fR\fIstring\fR Define client and server \s-1IP\s0 addresses. .PP In the absence of this option no \s-1IP\s0 addresses are defined, and the kernel will determine the \s-1IP\s0 addresses by itself, usually by using \s-1DHCP, BOOTP\s0 or \s-1RARP. \s0 Note that the kernel's query is \fIin addition to\fR the query made by the bootrom, and requires the \s-1IP:\s0 kernel level autoconfiguration (\s-1CONFIG_IP_PNP\s0) feature to be included in the kernel. .PP Important note: In Linux kernels 2.2.x where x >= 18, and 2.4.x where x >= 5, it is \fBnecessary\fR to specify one of the enabling options in the next paragraph to cause the \s-1IP\s0 autoconfiguration to be activated. Unlike in previous kernels, \s-1IP\s0 autoconfiguration does not happen by default. Also note that \s-1IP\s0 autoconfiguration and NFSroot are likely to go away in Linux 2.6 and that userspace \s-1IP\s0 configuration methods using ramdisk and userspace \s-1DHCP\s0 daemons are preferred now. .PP If one of the following: \f(CW\*(C`off, none, on, any, dhcp, bootp, rarp, both\*(C'\fR, is given, then the option will be passed unmodified to the kernel and cause that autoconfig option to be chosen. .PP If \f(CW\*(C`rom\*(C'\fR is given as the argument to this option, all necessary \s-1IP\s0 addresses for \s-1NFS\s0 root mounting will be inherited from the \s-1BOOTP/DHCP\s0 answer the bootrom got from the server. .PP It's also possible to define the addresses during compilation of the boot image. Then, all addresses must be separated by a colon, and ordered in the following way: .PP \&\f(CW\*(C`\-\-ip=\*(C'\fR\fIclient:server:gateway:netmask:hostname[:dev[:proto]]\fR .PP Using this option \fBmkelf-linux\fR will automatically convert system names into decimal \s-1IP\s0 addresses for the first three entries in this string. The \fBhostname\fR entry will be used by the kernel to set the host name of the booted Linux diskless client. When more than one network interface is installed in the diskless client, it is possible to specify the name of the interface to use for mounting the root directory via \s-1NFS\s0 by giving the optional value \f(CW\*(C`dev\*(C'\fR. This entry has to start with the string \f(CW\*(C`eth\*(C'\fR followed by a number from 0 to 9. However, if only one interface is installed in the client, this \fIdev\fR entry including the preceding semicolon can be left out. The \fIproto\fR argument is one of the \&\s-1IP\s0 autoconfiguration enabling options listed above. (Author: it's not clear to me what the \s-1IP\s0 autoconfiguration does when the parameters are already specified. Perhaps it's to obtain parameters not specified, e.g. \s-1NIS\s0 domain.) .PP \&\fB\-\-rdbase=\fR\fItop|asis|0xNNNNNNNN\fR Set the ramdisk load address. \f(CW\*(C`top\*(C'\fR moves the ramdisk to the top of memory before jumping to the kernel. This is the default if rdbase is not specified. This option requires that first-linux's kernel sizing work correctly. \f(CW\*(C`asis\*(C'\fR loads it at 0x100000 (1MB) if the kernel is loaded low; or leaves it just after the kernel in memory, if the kernel is loaded high. For this option to work, the kernel must be able to handle ramdisks at these addresses. \&\fI0xNNNNNNNN\fR moves the ramdisk to the hex address specified. The onus is on the user to specify a suitable address that is acceptable to the kernel and doesn't overlap with any other segments. Etherboot will round address down to multiple of 4k (last 3 digits to zero). .PP \&\fB\-\-rdnopad\fR By default, etherboot pads (with nulls) the given initrd of any size to multiple of 4k bytes (aligning to memory page boundary). Use this option to disable padding if it causes problem. .PP \&\fB\-\-first32=\fR\fIprogram\fR Override the default first stage setup program. It can be used to call extensions to the Etherboot code, which paves the way for additional useful functionality without enlarging the size of the Etherboot footprint. \-\-first32 is implied by the \s-1ELF\s0 format. .PP \&\fB\-\-progreturns\fR This option is used in conjunction with and only valid with the \-\-first32 option to indicate to the Etherboot loader that the called program will return to loader and hence Etherboot should not disable the network device as is the case when the program will never return to Etherboot. .PP \&\fB\-\-relocseg=\fR\fIsegaddr\fR This option is used to specify a relocation of the Linux first, boot, setup, and parameter segments to another 64k band. Currently the only valid values are 0x9000 and 0x8000, corresponding to linear addresses of 0x90000 and 0x80000 upwards. The default is 0x9000. Usually you use this option if you have relocated Etherboot to 0x84000 to avoid other code in the 0x90000 segment like \&\s-1DOC.\s0 The Linux kernel must support relocation which implies a 2.4 kernel or later. \-\-relocseg only works reliably with \s-1ELF\s0 or \-\-first32=. .PP \&\fBmem=\fR\fImemsize\fR This is not a command line option but a kernel parameter that is intercepted by the first32 stage and used as the top of memory, to match Linux's interpretation. \fImemsize\fR can be suffixed by \f(CW\*(C`G\*(C'\fR to indicate gibibytes (times 2^30), \f(CW\*(C`M\*(C'\fR to indicate mebibytes (times 2^20) or \f(CW\*(C`K\*(C'\fR to indicate kibibytes (times 2^10). Note that the suffixes are uppercase. This kernel parameter can be specified in \&\-\-append= or option\-129 of the \s-1DHCP/BOOTP\s0 record. .PP Run the program thus: .PP mkelf-linux \fIkernel-image\fR [\fIramdisk-image\fR] > linux.nb .PP Then move \fIlinux.nb\fR to where the network booting process expects to find it. .SH "MKELF-LINUX BOOTP/DHCP VENDOR TAGS" .IX Header "MKELF-LINUX BOOTP/DHCP VENDOR TAGS" \&\fBmkelf-linux\fR includes a startup code at the beginning of the Linux kernel which is able to detect certain \s-1DHCP\s0 vendor defined options. These can be used to modify the kernel loading process at runtime. To use these options with \s-1ISC DHCPD\s0 v3, a popular \s-1DHCP\s0 daemon, the syntax is as below. You will need to adjust the syntax for other \s-1DHCP\s0 or \s-1BOOTP\s0 daemons. .PP option etherboot-signature code 128 = string; .PP option kernel-parameters code 129 = text; .PP \&... .PP .Vb 1 \& option etherboot\-signature E4:45:74:68:00:00; \& \& option kernel\-parameters "INITRD_DBG=6 NIC=3c509"; .Ve .PP Option 128 is required to be the six byte signature above. See the vendortags appendix of the Etherboot user manual for details. .PP The following option is presently supported by \fBmkelf-linux\fR: .PP \&\fB129\fR The \fIstring\fR value given with this option is appended verbatim to the end of the kernel command line. It can be used to specify arguments like I/O addresses or \s-1DMA\s0 channels required for special hardware like \s-1SCSI\s0 adapters, network cards etc. Please consult the Linux kernel documentation about the syntax required by those options. It is the same as the \fB\-\-append\fR command line option to \fBmkelf-linux\fR, but works at boot time instead of image build time. .PP \&\fB130\fR With this option it is possible to the select the network adapter used for mounting root via \s-1NFS\s0 on a multihomed diskless client. The syntax for the \fIstring\fR value is the same as for the \f(CW\*(C`dev\*(C'\fR entry used with the \fB\-\-ip=\fR option as described above. However note that the \&\fBmkelf-linux\fR runtime setup routine does not check the syntax of the string. .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'\fR boot \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 newer version of Etherboot with an older one. .PP Run mknbi-rom like this: .PP mknbi-rom nic.zrom > nic.nb .PP Move \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'\fR image. This allows it to be netbooted using an existing \s-1ROM.\s0 This is useful for developing Etherboot drivers or to load a newer version of Etherboot with an older one. .PP Run mkelf-img like this: .PP mkelf-img nic.zimg > nic.nb .PP Move \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 image. .PP Note that this does not test the \s-1ROM\s0 loader portion that's in a \f(CW\*(C`.z?rom\*(C'\fR image, 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 menu program. Etherboot has the ability to load an auxiliary program which can interact with the user, modify the \s-1DHCP\s0 structure, and return a status. Based on the status, Etherboot can load another binary, restart or exit. This makes it possible to have elaborate user interface programs without having to modify Etherboot. The specification for auxiliary 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 the library directory, which is assumed to have an entry point of 0x60000. An optional argument is accepted, and this is loaded at 0x80000. This can be a data file used by the menu program. .PP Currently, the menu binary provided duplicates the builtin menu facility of Etherboot with the exception of a couple of small differences: no server or gateway specifications are used and nested \s-1TFTP\s0 loads don't work. You should not have \s-1MOTD\s0 or \s-1IMAGE_MENU\s0 defined in your Etherboot build to be able to use this external menu binary. The specifications of the \s-1DHCP\s0 option required is in the vendortags document in the Etherboot user manual. .PP Typical usage is like this: .PP mkelf-menu > menu.nb .PP Then put menu.nb in the \s-1TFTP\s0 boot directory and edit your \s-1DHCP\s0 options according to the documentation. .PP Alternate 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 menu program. This menu program takes the names of images from a menu-text-file file which just contains lines with the filenames (relative to the tftpd root directory) of images to load. The user-interface is a light-bar, similar to that used in \s-1GRUB. \s0 There is a sample menu-text-file in \f(CW\*(C`menu\-nfl.eg\*(C'\fR. The special entry \*(L"Quit Etherboot\*(R" (without quotes, of course) can be used in menu-text-files as an entry that causes Etherboot to quit and return to the invoking environment, which is the \s-1BIOS\s0 in the case of ROMs. .PP Typical usage is: .PP mkelf-nfl \fImenu-text-file\fR > nfl.nb .PP Then put nfl.nb in the \s-1TFTP\s0 boot directory and specify as the boot image. Chaining to other menus works. .PP Enhancements to the menu format accepted to specify other features such as 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. .PP Typical usage is: .PP mkelf-lua hello.lb > luaprog.nb .PP where \f(CW\*(C`hello.lb\*(C'\fR was generated from a Lua program by: .PP luac \-o hello.lb hello.lua .PP The functions available to Lua programs in this environment is described in a separate document. .SH "MKNBI-FDOS" .IX Header "MKNBI-FDOS" \&\fBmknbi-fdos\fR makes a boot image from a FreeDOS kernel file and a floppy image. Note that the kernel image is not read from the floppy section of the boot image, but is a separate section in the boot image. The bootloader has been adjusted to jump to it directly. This means the space that would be taken up on the \fIfloppy\fR by the kernel image file can now be used for applications and data. .PP Obtain a distribution of FreeDOS with a recent kernel, probably at least 2006. It has been tested with 2012 but nothing older. You can get the FreeDOS kernel here: .PP \&\f(CW\*(C`http://freedos.sourceforge.net/\*(C'\fR .PP Follow the instructions to make a bootable floppy. Then get an image of the floppy with: .PP dd if=/dev/fd0 of=/tmp/floppyimage .PP Also extract \fIkernel.sys\fR from the floppy. You can do this from the image using the mtools package, by specifying a file as a \fIdrive\fR with a declaration like this in \fI~/.mtoolsrc\fR: .PP drive x: file=\*(L"/tmp/floppyimage\*(R" .PP Then run: .PP mcopy x:kernel.sys . .PP Then run mknbi by: .PP mknbi-fdos kernel.sys /tmp/floppyimage > freedos.nb .PP where \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 to find it. .PP If you have got it to netboot successfully, then you can go back and add your files to the floppy image. You can delete \fIkernel.sys\fR in the floppy image to save space, that is not needed. Note that you can create a floppy image of any size you desire with the mformat program from 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:. One reason you might want to do this is because you want to use the real floppy. The limit on \*(L"disk size\*(R" in the boot image is not raised by this option so that is not a reason to use this option. This option is incompatible 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 the client should use a network file system as drive C:, which is only possible if there are no hard disks found by \s-1DOS.\s0 This option is incompatible with \-\-harddisk. .PP \&\fB\-\-nosquash\fR Do not try to chop unused sectors from the end of the floppy image. This increases the boot image size and hence loading time if the \s-1FAT\s0 filesystem on the floppy is mostly empty but you may wish to use this option if you have doubts as to whether the squashing algorithm is working correctly. .PP \&\fB\-\-rdbase=\fR\fI0xNNNNNNNN\fR Set the ramdisk load address. The default load address for the ramdisk is 0x110000. It can be moved higher (lower will not work) if for some reason you need to load other stuff at the address it currently occupies. As this is a linear address and not 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 a bootable \s-1DOS\s0 filesystem. It is not necessary to build the filesystem on a physical floppy if you have the mtools package, but you need a bootable floppy of any size to start with. First extract the boot block from the floppy, this boot block must match the \s-1DOS\s0 kernel files you will copy in the next step: .PP dd if=/dev/fd0 of=bootblock bs=512 count=1 .PP Then get the \s-1DOS\s0 kernel files (this is correct for DR-DOS, the names are different in MS-DOS, \s-1IO.SYS\s0 and \s-1MSDOS.SYS\s0): .PP mcopy a:IBMBIO.COM a:IBMDOS.COM a:COMMAND.COM . .PP Next make an entry in \fI~/.mtoolsrc\fR to declare a floppy to be mapped to a file: .PP drive x: file=\*(L"/tmp/floppyimage\*(R" .PP Now 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: .PP mformat \-C \-t 80 \-s 36 \-h 2 \-B bootblock x: .PP The size of the \*(L"floppy\*(R" is only limited by the limits on the number of cylinders, 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" in memory. As \s-1RAM\s0 is precious, choose a size slightly bigger than what is needed to hold your \*(L"floppy\*(R" files. .PP Finally, copy all your desired files onto the floppy: .PP mcopy \s-1IBMBIO.COM\s0 x: .PP mcopy \s-1IBMDOS.COM\s0 x: .PP mcopy \s-1COMMAND.COM\s0 x: .PP mcopy \s-1CONFIG.SYS AUTOEXEC.BAT APP.EXE APP.DAT ...\s0 x: .PP For MS-DOS substitute \s-1IO.SYS\s0 for \s-1IBMIO.COM,\s0 and \s-1MSDOS.SYS\s0 for \&\s-1IBMDOS.COM. \s0 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 attention to the order of copying as the boot block may expect the first two entries on a newly formatted disk to be \s-1IO.SYS, MSDOS.SYS. \s0 Possibly too \&\s-1COMMAND.COM\s0 has to be the third entry so we play safe. Thanks to Phil Davey and Phillip Roa for these tips. .PP I have reports that the bootblock of MS-DOS 6.22 sometimes fails to boot the ramdisk. You could try using the boot block from Netboot instead of getting the boot block off the floppy. I have provided this boot block in the distribution as altboot.bin, and in source form as altboot.S and boot.inc. One essential thing is to make \s-1IO.SYS\s0 the first file on the disk, or this bootblock will not work. .PP If you happen to have a media of the same size you could test if the image is bootable by copying it onto the media, and then booting it: .PP dd if=/tmp/floppyimage of=/dev/fd0 .PP Then run mknbi-dos over the image \fI/tmp/floppyimage\fR to create a boot image: .PP mknbi-dos /tmp/floppyimage > dos.nb .PP Move \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:. One reason you might want to do this is because you want to use the real floppy. The limit on \*(L"disk size\*(R" in the boot image is not raised by this option so that is not a reason to use this option. This option is incompatible 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 the client should use a network file system as drive C:, which is only possible if there are no hard disks found by \s-1DOS.\s0 This option is incompatible with \-\-harddisk. .PP \&\fB\-\-nosquash\fR Do not try to chop unused sectors from the end of the floppy image. This increases the boot image size and hence loading time if the \s-1FAT\s0 filesystem on the floppy is mostly empty but you may wish to use this option if you have doubts as to whether the squashing algorithm is working correctly. .PP \&\fB\-\-rdbase=\fR\fI0xNNNNNNNN\fR Set the ramdisk load address. The default load address for the ramdisk is 0x110000. It can be moved higher (lower will not work) if for some reason you need to load other stuff at the address it currently occupies. As this is a linear address and not 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: .SH "SEE ALSO" .IX Header "SEE ALSO" Etherboot tutorial at \f(CW\*(C`http://etherboot.sourceforge.net/\*(C'\fR Mtools package is at \f(CW\*(C`http://wauug.erols.com/pub/knaff/mtools/\*(C'\fR Make sure you have a recent version, the ability to map a drive to a file is not present in old versions. .SH "COPYRIGHT" .IX Header "COPYRIGHT" \&\fBmknbi\fR is under the \s-1GNU\s0 Public License .SH "AUTHOR" .IX Header "AUTHOR" Ken Yap .PP mk{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.