MKBOOTIMAGE(8) | System Manager's Manual (prep) | MKBOOTIMAGE(8) |
mkbootimage
—
mkbootimage |
[-lsv ] [-b
bootfile] [-k
kernel] [-m
machine_arch] [-r
rawdev] boot-image |
mkbootimage
is the utility used to create a bootable
kernel image on NetBSD for prep, bebox or rs6000.
The mkbootimage
utility takes the
boot-program, and the optional kernel, and creates a boot image from them.
This image contains the boot code, kernel, and optionally an i386 partition
table. The image can be written directly to a floppy or hard drive with the
dd(1) command, or it can be
directly netbooted via
bootpd(8).
The following options are available:
-b
-k
-l
-m
-r
-s
-v
There are three primary ways to use
mkbootimage
to build a bootable image:
The first method is to build an image suitable for a floppy or
netboot. This will create an image with an embedded partition table with a
single PReP boot partition of type 0x41(65). The image can be directly
netbooted, or if it is small enough, written directly to a floppy with
dd(1).
mkbootimage
will warn you if the generated image is
too large to be written to a floppy.
The second method is to build a standalone image with no partition table. This should be written to the PReP boot partition on your hard drive with dd(1).
The third method is for use in upgrading older systems that have been built by writing the floppy image directly to the head of the hard drive. This method reads the existing partition table and embeds that in the image. This should prevent loss of your current partition layout. This image should be written directly to the head of the disk with dd(1).
The recommended setup for a PReP machine is to build a partition table with fdisk(8) that contains a PReP boot partition (type 65) as partition 0, marked active, and a second partition for NetBSD encompassing the remainder of the disk. You should then create a disklabel on that disk with a partition (such as e) pointing to the PReP boot partition. Partition c should be the whole disk, and partition d can optionally be the NetBSD portion of the disk. You may then use the other partitions for your normal disk layout. The PReP boot partition can be placed anywhere on the disk, but it is recommended that it be placed at the beginning of the disk.
mkbootimage -m prep
-b /usr/mdec/boot -k /netbsd boot.fs
mkbootimage -s -m
bebox -b /usr/mdec/boot -k /netbsd boot.fs
mkbootimage -b
/usr/mdec/boot_com0 -k /netbsd -r /dev/rsd0c boot.fs
mkbootimage
first appeared in NetBSD
1.5.
mkbootimage
was written by NONAKA
Kimihiro.
February 17, 2017 | NetBSD 9.4 |