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