xref: /netbsd-src/share/man/man8/man8.amiga/installboot.8 (revision 68242e9d67d772f61bd40e375874fc27bd1e2061)
1.\"	$NetBSD: installboot.8,v 1.25 2021/02/26 10:44:31 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.\"
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 February 25, 2021
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.
44The
45bootstrap is written into the bootblock area on the partition, right
46in front of the superblock, and hence limited in size to
478192 bytes.
48.Pp
49The bootstrap resides in the first few blocks on the partition
50.Pq as specified by Commodore-Amiga Inc.
51The bootstrap is loaded into memory by the ROM from bootable devices:
52RDB devices, where the partition is marked as bootable, or (not on the
53DraCo) floppy disks in Amiga format (880K/1760k).
54.Pp
55In the presence of more than one bootable partition/floppy disk, the partition
56is chosen by the bootpriority (from the RDB), which can be overridden by
57the operator from the boot menu (on Amiga machines, hold down the outer
58mouse buttons during boot; on DraCo machines, press the left mouse button
59when prompted).
60.Pp
61On RDB devices, the whole bootblock is loaded by the ROM.
62The number of
63boot blocks in the RDB partition entry must be correct.
64.Pp
65On floppy disks, the ROM always loads the first two blocks (1024 bytes),
66and the bootblock allocates memory and loads the whole bootblock on startup.
67.Pp
68After receiving control, the bootblock uses the stand-alone
69filesystem code in
70.Dq libsa.a
71to load the kernel from the filesystem on the partition it was started from.
72The code for the boot program can be found in
73.Pa /usr/mdec/bootxx_fd
74.Pq floppy disk code ,
75.Pa /usr/mdec/bootxx_ffsv1
76.Pq generic RDB disk code for FFSv1 ,
77or
78.Pa /usr/mdec/bootxx_ffsv2
79.Pq generic RDB disk code for FFSv2 .
80.Pp
81The arguments are:
82.Bl -tag -width bootblock
83.It Fl l Ar newcommandline
84Specify a different command line to replace the default.
85.It Ar bootblock
86The file containing the bootblock (normally /usr/mdec/bootxx_ffsv1 or
87bootxx_ffsv2 for RDB devices).
88.It Ar device
89The name of the character special device specifying the partition on which the
90bootstrap is to be installed.
91.El
92.Sh EXAMPLES
93The following command will install the
94boot program for FFSv1 in the bootblock area on
95.Dq sd0a :
96.Bd -literal -offset indent
97installboot /usr/mdec/bootxx_ffsv1 /dev/rsd0a
98.Ed
99.Sh SEE ALSO
100.Xr dd 1 ,
101.Xr amiga/boot 8
102.Sh HISTORY
103The
104.Nm
105command first appeared in
106.Nx 1.3 .
107.Sh BUGS
108If
109.Nm
110is accidentally used on the whole disk partition, the RDB will be overwritten,
111making your system unusable after the next reboot.
112.Pp
113Some third-party accelerator boards are not autoconfiguring.
114You won't be able to use their memory when booting from the bootblock
115after a cold start.
116.Pp
117Some third-party disk controllers don't support bootblock booting.
118.Pp
119DraCo ROMs don't support bootblock booting from floppy disks.
120.Pp
121Most 68060 boards, unlike the DraCo, don't set the SysBase->AttnFlags
122bit for the 68060 CPU (a patch program which is called during
123AmigaOS startup does this).
124You need to add
125.Cd options BB060STUPIDROM
126to your kernel to boot on such a machine.
127.Pp
128There is currently no easy way to edit the RDB from within
129.Nx .
130Therefore, you have to use HDTOOLBOX or a similar tool to
131set the partition to bootable, "use custom bootblocks" and the number
132of bootblocks to 16 (for bootxx_ffsv1 or bootxx_ffsv2) or 2 (for bootxx_fd),
133at least the first time you install the bootblock.
134.Pp
135As normal
136.Xr dd 1
137is used to install the bootblock, you can only install onto
138your currently used root (or any other mounted) partition from single-user
139mode, or while otherwise running in insecure mode.
140