1.\" $NetBSD: installboot.8,v 1.21 2008/04/30 13:10:57 martin 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.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28.\" POSSIBILITY OF SUCH DAMAGE. 29.\" 30.Dd November 29, 1996 31.Dt INSTALLBOOT 8 amiga 32.Os 33.Sh NAME 34.Nm installboot 35.Nd install a bootstrap on an FFS filesystem partition 36.Sh SYNOPSIS 37.Nm /usr/mdec/installboot 38.Op Fl l Ar newcommandline 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/bootxx_fd 72.Pq floppy disk code 73or 74.Pa /usr/mdec/bootxx_ffs 75.Pq generic RDB disk code . 76.Pp 77The arguments are: 78.Bl -tag -width bootblock 79.It Fl l Ar newcommandline 80Specify a different command line to replace the default. 81.It Ar bootblock 82The file containing the bootblock (normally /usr/mdec/bootxx_ffs for RDB devices). 83.It Ar device 84The name of the character special device specifying the partition on which the 85bootstrap is to be installed. 86.El 87.Sh EXAMPLES 88The following command will install the 89boot program in the bootblock area on 90.Dq sd0a : 91.Bd -literal -offset indent 92installboot /usr/mdec/bootxx_ffs /dev/rsd0a 93.Ed 94.Sh SEE ALSO 95.Xr dd 1 , 96.Xr boot 8 97.Sh HISTORY 98The 99.Nm 100command first appeared in 101.Nx 1.3 . 102.Sh BUGS 103If 104.Nm 105is accidentally used on the whole disk partition, the RDB will be overwritten, 106making your system unusable after the next reboot. 107.Pp 108Some third-party accelerator boards are not autoconfiguring. You won't 109be able to use their memory when booting from the bootblock after a cold 110start. 111.Pp 112Some third-party disk controllers don't support bootblock booting. 113.Pp 114DraCo ROMs don't support bootblock booting from floppy disks. 115.Pp 116Most 68060 boards, unlike the DraCo, don't set the SysBase-\*[Gt]AttnFlags 117bit for the 68060 CPU (a patch program which is called during 118AmigaOS startup does this). You need to add options BB060STUPIDROM 119to your kernel to boot on such a machine. 120.Pp 121There is currently no easy way to edit the RDB from within 122.Nx . 123Therefore, you have to use HDTOOLBOX or a similar tool to 124set the partition to bootable, "use custom bootblocks" and the number 125of bootblocks to 16 (for bootxx_ffs) or 2 (for bootxx_fd), at least the first 126time you install the bootblock. 127.Pp 128As normal dd is used to install the bootblock, you can only install onto 129your currently used root (or any other mounted) partition from single-user 130mode, or while otherwise running in insecure mode. 131