1 .\" $NetBSD: prep,v 1.27 2008/09/06 21:38:13 tsutsui Exp $
5 hard drive prep tool to prepare your hard
8 HDToolBox is provided with the
9 system software and on floppy installation disks since Release 2.0
12 so we will provide instructions for its use.
16 can't currently be installed on disks with a sector
17 size other than 512 bytes (e.g.,
20 You can, however, mount ADOSFS partitions on such M-O's.
22 .Ss2 Preparing your hard disk with HDToolBox
25 A full explanation of HDToolBox can be found with your
27 manuals and is beyond the scope of this document.
29 The first time you partition a drive, you need to set its drive
30 type so that you have working geometry parameters.
31 To do this you enter the
34 .Dq read parameters from drive
37 Note that you will be modifying your HD's.
38 If you mess something up here you could lose everything on all the
39 drives that you configure.
40 It is therefore advised that you:
42 Write down your current configurations.
43 Do this by examining each partition on the drive and the
44 drives parameters (from Change drive type.)
46 Back up the partitions you are keeping.
49 What you need to do now is partition your drives, creating at least
50 root and swap partitions.
52 This should be done as the HDToolBox manual describes.
53 One thing to note is that if you are not using a Commodore controller you
54 will need to specify the device your SCSI controller uses, e.g.,
55 if you have a Warp Engine you would:
56 .(tag From\ cli -offset indent
58 .Dl Ic "hdtoolbox warpdrive.device"
62 .Dl Ic "SCSI_DEVICE_NAME=warpdrive.device"
65 The important things you need to do above and beyond normal
66 partitioning include (from Partition Drive section):
70 partitions as non-bootable, with
71 two exceptions: the root partition
75 directly, or the swap partition if you want
76 to boot the installation miniroot directly.
78 Changing the file system parameters of the partitions to
81 This must be done from the partitioning section and
87 To make the needed changes:
89 .(enum -compact -offset indent
95 .Dq Change file system
99 .Dq Custom File System
105 Set the dostype to one of these three choices:
107 root partition : 0x4e425207 (NBR\\007)
108 swap partition : 0x4e425301 (NBS\\001)
109 other partitions: 0x4e425507 (NBU\\007)
114 refers to other partitions you will
115 format for reading and writing under
122 to enter this value as some versions of HDToolBox will forget your entry
125 Turn custom boot code off
127 Set Reserved Blocks start and end to 0.
134 (and, for installation, swap) partition:
136 .(enum -compact -offset indent
137 Turn custom boot code on
139 Set Reserved Blocks start and end to 0.
141 Set Number of Custom Boot Blocks to 16.
143 Set Automount This Partition on
147 Mask and maxtransfer are not used with
152 The swap (for installation) and the root partition (if you plan to
154 .Em "must be within the first"
155 4 gigabytes of the disk!
156 The reason for the former is that xstreamtodev uses trackdisk.device
157 compatible I/O-calls, the reason for the latter is that the bootblock
158 gets a 32bit partition offset from the operating system.
163 will be able to recognize your
164 disks and which partitions it should use.
166 .Ss2 Transferring the miniroot file system
170 installation or upgrade now uses a
172 file system which is installed on the partition used by
175 This removes the requirement of using a floppy disk for the
176 file system used by the installation or upgrade process.
177 It also allows more utilities to be present on the file system
178 than would be available when using an 880 KB floppy disk.
180 Once the hard disk has been prepared for
182 the miniroot file system
184 is transferred to the swap
185 partition configured during the hard disk prep (or the existing
186 swap partition in the case of an upgrade).
187 The xstreamtodev utility provided in the
188 .Pa \*M/installation/misc
192 to transfer the file system for either a new
193 installation or an upgrade.
194 The file system can also be transferred on an existing
196 system for an update by using dd.
197 This should only be done after booting
199 into single-user mode.
200 It may also be possible to shutdown to single-user, providing that
201 the single-user mode processes are not using the swap partition.
207 .Dl Ic "xstreamtodev --input=miniroot.fs --rdb-name=\*[Lt]swap partition\*[Gt]"
209 where \*[Lt]swap partition\*[Gt] is the name you gave to the
211 partition to be used for swapping.
215 to determine the SCSI driver device name or the unit number
216 of the specified partition, you may also need to include the
219 .Dl Ic --device=\*[Lt]driver.name\*[Gt]
223 .Dl Ic --unit=\*[Lt]SCSI unit number\*[Gt]
225 To transfer the miniroot using
227 you should be booted up
228 in single user mode on the current
232 command to shutdown to single-user mode.
233 Then copy the miniroot using
236 .Dl Ic "dd if=miniroot.fs of=/dev/rsd0b"
240 should be the device path of the swap partition
241 your system is configured to use.
242 Once the file is copied, reboot back to
244 to boot the upgrade kernel.
247 Once you have started installation, if you abort it
248 and want to retry you must reinstall the
250 on the swap partition.