1.\" $NetBSD: installboot.8,v 1.6 1997/11/24 06:29:20 lukem Exp $ 2.\" 3.\" Copyright (c) 1995 Paul Kranenburg 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 3. All advertising materials mentioning features or use of this software 15.\" must display the following acknowledgement: 16.\" This product includes software developed by Paul Kranenburg. 17.\" 3. The name of the author may not be used to endorse or promote products 18.\" derived from this software without specific prior written permission 19.\" 20.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 21.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 22.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 23.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 24.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 25.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 29.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30.\" 31.Dd November 29, 1996 32.Dt INSTALLBOOT 8 33.Os 34.Sh NAME 35.Nm installboot 36.Nd install a bootstrap on an FFS filesystem partition 37.Sh SYNOPSIS 38.Nm installboot 39.Ar bootblock 40.Ar device 41.Sh DESCRIPTION 42.Nm installboot 43copies the bootblock to a bootable partition. The 44bootstrap is written into the bootblock area on the partition, right 45in front of the superblock, and hence limited in size to 468192 bytes. 47.Pp 48The bootstrap resides in the first few blocks on the partition 49.Pq as specified by Commodore-Amiga Inc. 50The bootstrap is loaded into memory by the ROM from bootable devices: 51RDB devices, where the partition is marked as bootable, or (not on the 52DraCo) floppy disks in Amiga format (880K/1760k). 53.Pp 54In the presence of more than one bootable partition/floppy disk, the partition 55is chosen by the bootpriority (from the RDB), which can be overridden by 56the operator from the boot menu (on Amiga machines, hold down the outer 57mouse buttons during boot; on DraCo machines, press the left mouse button 58when prompted). 59.Pp 60On RDB devices, the whole bootblock is loaded by the ROM. The number of 61boot blocks in the RDB partition entry must be correct. 62.Pp 63On floppy disks, the ROM always loads the first two blocks (1024 bytes), 64and the bootblock allocates memory and loads the whole bootblock on startup. 65.Pp 66After receiving control, the bootblock uses the stand-alone 67filesystem code in 68.Dq libsa.a 69to load the kernel from the filesystem on the partition it was started from. 70The code for the boot program can be found in 71.Pa /usr/mdec/fdboot 72.Pq floppy disk code 73or 74.Pa /usr/mdec/xxboot 75.Pq generic RDB disk code . 76.Pp 77The arguments are: 78.Bl -tag -width bootblock 79.It Ar bootblock 80The file containing the bootblock (normally /usr/mdec/xxboot for RDB devices). 81.It Ar device 82The name of the character special device specifying the partition on which the 83bootstrap is to be installed. 84.El 85.Sh EXAMPLES 86The following command will install the 87boot program in the bootblock area on 88.Dq sd0a : 89.Bd -literal -offset indent 90installboot /usr/mdec/xxboot /dev/rsd0a 91.Ed 92.Sh CAVEATS 93If 94.Nm 95is accidentally used on the whole disk partition, the RDB will be overwritten, 96making your system unusable after the next reboot. 97.Pp 98Some third-party accellerator boards are not auto-configuring. You won't 99be able to use their memory when booting from the bootblock after a cold 100start. 101.Pp 102Some third-party disk controllers don't support bootblock booting. 103.Pp 104DraCo ROMs don't support bootblock booting from floppy disks. 105.Pp 106Most 68060 boards, unlike the DraCo, don't set the SysBase->AttnFlags 107bit for the 68060 CPU (a patch program which is called during 108AmigaOS startup does this). Currently, 109.Nx 110is not able to detect this condition, and will fail. 111.Sh BUGS 112There is currently no easy way to edit the RDB from within 113.Tn NetBSD. Therefore, you have to use HDTOOLBOX or a similar tool to 114set the partition to bootable, "use custom bootblocks" and the number 115of bootblocks to 16 (for xxboot) or 2 (for fdboot), at least the first 116time you install the bootblock. 117.Pp 118As normal dd is used to install the bootblock, you can only install onto 119your currently used root (or any other mounted) partition from single-user 120mode, or while otherwise running in insecure mode. 121.Sh "SEE ALSO" 122.Xr dd 1 , 123.Xr boot 8 124.Sh HISTORY 125The 126.Nm 127command first appeared in 128.Nx 1.3 129