Install new boot blocks on an existing mounted root file system on ‘wd0', setting the timeout to five seconds, after copying a new secondary bootstrap:
cp /usr/mdec/boot /boot
installboot -v -o timeout=5 /dev/rwd0a /usr/mdec/bootxx_ffsv1
Create a bootable CD-ROM with an ISO9660 file system for an i386 system with a serial console:
mkdir cdrom
cp sys/arch/i386/compile/mykernel/netbsd cdrom/netbsd
cp /usr/mdec/boot cdrom/boot
cp /usr/mdec/bootxx_cd9660 bootxx
installboot -o console=com0,speed=19200 -m i386 -e bootxx
makefs -t cd9660 -o 'bootimage=i386;bootxx,no-emul-boot' boot.iso cdrom
Create a bootable floppy disk with an FFSv1 file system for a small custom kernel (note: bigger kernels needing multiple disks are handled with the ustarfs file system):
newfs -s 1440k /dev/rfd0a
Note: Ignore the warnings that
newfs(8) displays; it can not write a disklabel, which is not a problem for a floppy disk.
mount /dev/fd0a /mnt
cp /usr/mdec/boot /mnt/boot
gzip -9 < sys/arch/i386/compile/mykernel/netbsd > /mnt/netbsd.gz
umount /mnt
installboot -v /dev/rfd0a /usr/mdec/bootxx_ffsv1
Create a bootable FAT file system on ‘wd1a', which should have the same offset and size as a FAT primary partition in the Master Boot Record (MBR):
newfs_msdos -r 16 /dev/rwd1a
Notes: The
-r 16 is to reserve space for the primary bootstrap.
newfs_msdos(8) will display an “MBR type” such as ‘1', ‘4', or ‘6'; the MBR partition type of the appropriate primary partition should be changed to this value.
mount -t msdos /dev/wd1a /mnt
cp /usr/mdec/boot /mnt/boot
cp path/to/kernel /mnt/netbsd
umount /mnt
installboot -t raw /dev/rwd1a /usr/mdec/bootxx_msdos
Make the existing FAT16 filesystem on ‘sd0e' bootable. This can be used to make USB memory bootable provided it has 512 byte sectors and that the manufacturer correctly initialised the file system.
mount -t msdos /dev/sd0e /mnt
cp /usr/mdec/boot /mnt/boot
cp path/to/kernel /mnt/netbsd
umount /mnt
installboot /dev/rsd0e /usr/mdec/bootxx_fat16
It may also be necessary to use
fdisk to make the device itself bootable.
Switch the existing installed bootstrap to use a serial console without reinstalling or altering other options such as timeout.
installboot -e -o console=com0 /dev/rwd0a