.\" $NetBSD: prep,v 1.28 2009/04/23 01:56:48 snj Exp $ . You will need an .Tn AmigaDOS hard drive prep tool to prepare your hard drives for use with .Nx*M . HDToolBox is provided with the system software and on floppy installation disks since Release 2.0 of .Tn AmigaDOS , so we will provide instructions for its use. .Pp Note that .Nx can't currently be installed on disks with a sector size other than 512 bytes (e.g., .Dq 640 MB 90mm M-O media). You can, however, mount ADOSFS partitions on such M-O's. . .Ss2 Preparing your hard disk with HDToolBox . .Pp A full explanation of HDToolBox can be found with your .Tn AmigaDOS manuals and is beyond the scope of this document. .Pp The first time you partition a drive, you need to set its drive type so that you have working geometry parameters. To do this you enter the .Dq Change drive type menu, and either use .Dq read parameters from drive or set them manually. .Pp Note that you will be modifying your HD's. If you mess something up here you could lose everything on all the drives that you configure. It is therefore advised that you: .(enum -offset indent Write down your current configurations. Do this by examining each partition on the drive and the drives parameters (from Change drive type.) .It Back up the partitions you are keeping. .enum) .Pp What you need to do now is partition your drives, creating at least root and swap partitions. .Pp This should be done as the HDToolBox manual describes. One thing to note is that if you are not using a Commodore controller you will need to specify the device your SCSI controller uses, e.g., if you have a Warp Engine you would: .(tag From\ cli -offset indent .It From cli .Dl Ic "hdtoolbox warpdrive.device" .It From wb Set the tooltype .Pp .Dl Ic "SCSI_DEVICE_NAME=warpdrive.device" .tag) .Pp The important things you need to do above and beyond normal partitioning include (from Partition Drive section): .(enum Marking all .Nx partitions as non-bootable, with two exceptions: the root partition .Pq Pa / if you want to boot .Nx directly, or the swap partition if you want to boot the installation miniroot directly. .It Changing the file system parameters of the partitions to .Nx ones. This must be done from the partitioning section and .Dq Advanced options must be enabled. .enum) .Pp To make the needed changes: .Pp .(enum -compact -offset indent Click the .Dq Adv. Options button .It Click the .Dq Change file system button .It Choose .Dq Custom File System .It Turn off .Dq Automount if on. .It Set the dostype to one of these three choices: .(disp root partition : 0x4e425207 (NBR\\007) swap partition : 0x4e425301 (NBS\\001) other partitions: 0x4e425507 (NBU\\007) .disp) .Pp Here .Sq Li other refers to other partitions you will format for reading and writing under .Nx (e.g., .Pa /usr ) .Pp Make sure you press .Key RETURN to enter this value as some versions of HDToolBox will forget your entry if you don't. .It Turn custom boot code off .It Set Reserved Blocks start and end to 0. .It Click Ok. .enum) .Pp On the root .Pq Pa / (and, for installation, swap) partition: .Pp .(enum -compact -offset indent Turn custom boot code on .It Set Reserved Blocks start and end to 0. .It Set Number of Custom Boot Blocks to 16. .It Set Automount This Partition on .It Click Ok. .Pp Mask and maxtransfer are not used with .Nx . .enum) .(tag Caveat: .It Em Caveat: The swap (for installation) and the root partition (if you plan to use the bootblocks) .Em "must be within the first" 4 gigabytes of the disk! The reason for the former is that xstreamtodev uses trackdisk.device compatible I/O-calls, the reason for the latter is that the bootblock gets a 32bit partition offset from the operating system. .tag) .Pp Once this is done .Nx*M will be able to recognize your disks and which partitions it should use. . .Ss2 Transferring the miniroot file system . The .Nx*M installation or upgrade now uses a .Em miniroot file system which is installed on the partition used by .Nx for swapping. This removes the requirement of using a floppy disk for the file system used by the installation or upgrade process. It also allows more utilities to be present on the file system than would be available when using an 880 KB floppy disk. .Pp Once the hard disk has been prepared for .Nx , the miniroot file system .Pq Pa miniroot.fs is transferred to the swap partition configured during the hard disk prep (or the existing swap partition in the case of an upgrade). The xstreamtodev utility provided in the .Pa \*M/installation/misc directory can be used on .Tn AmigaDOS to transfer the file system for either a new installation or an upgrade. The file system can also be transferred on an existing .Nx system for an update by using dd. This should only be done after booting .Nx into single-user mode. It may also be possible to shutdown to single-user, providing that the single-user mode processes are not using the swap partition. .Pp On .Tn AmigaDOS , run the command: .Pp .Dl Ic "xstreamtodev --input=miniroot.fs --rdb-name=\*[Lt]swap partition\*[Gt]" .Pp where \*[Lt]swap partition\*[Gt] is the name you gave to the .Nx partition to be used for swapping. If .Ic xstreamtodev is unable to determine the SCSI driver device name or the unit number of the specified partition, you may also need to include the option .Pp .Dl Ic --device=\*[Lt]driver.name\*[Gt] .Pp and/or .Pp .Dl Ic --unit=\*[Lt]SCSI unit number\*[Gt] .Pp To transfer the miniroot using .Nx , you should be booted up in single user mode on the current .Nx system, or use the .Ic shutdown now command to shutdown to single-user mode. Then copy the miniroot using .Ic dd : .Pp .Dl Ic "dd if=miniroot.fs of=/dev/rsd0b" .Pp where .Li /dev/rsd0b should be the device path of the swap partition your system is configured to use. Once the file is copied, reboot back to .Tn AmigaDOS to boot the upgrade kernel. .(tag Caveat: .It Em Caveat: Once you have started installation, if you abort it and want to retry you must reinstall the .Pa miniroot.fs on the swap partition. .tag)