COHERENT manpages
This page displays the COHERENT manpage for hard disk [Technical Information].
List of available manpages
Index
hard disk -- Technical Information The hard disk is the primary means of storing and accessing data under the COHERENT system. This article introduces some aspects of the COHERENT system that affect the care and feeding of your hard disk. Device Drivers The COHERENT system comes with two drivers for hard disks: the at drivers, for AT-style hard disks (i.e., IDE, ESDI, MFM, or RLL disks); and hai, for the SCSI family of hard disks. hai is a host adapter-independent SCSI driver and also supports SCSI devices other than hard disks, e.g., SCSI tape. which is the old-style driver for Adaptec SCSI devices. For details on each driver, see its entry in the Lexicon. The following describes how to enable or disable a given hard-disk driver in your kernel. To disable a hard-drive controller, log in as the superuser root and then execute the following commands: cd /etc/conf bin/idenable -d disk_driver bin/idmkcoh -o /kernel_name where kernel_name is the name you wish to give to the new kernel, and disk_driver is one of at, aha, ss, or hai. To enable a hard disk, again log in as root; then type the following commands: cd /etc/conf bin/idenable -e disk_driver # if you are installing the hai driver: # hai/mkdev bin/idmkcoh -o /kernel_name where disk_driver is one of at, aha, ss, or hai. Partitioning The COHERENT command fdisk displays information about how your hard disk is currently configured. You can also use it to repartition your hard disk and reassign partitions from MS-DOS to COHERENT, or vice versa. This is an extremely powerful command, with which you can create much mayhem on your system. Like any powerful tool, it should be treated carefully and with respect. See the article on fdisk in the Lexicon for details on how to use this command. Partitioning your hard drive can be an uncomplicated procedure. We offer these guidelines in an effort to make it as simple as possible. Before attempting any partitioning you should first back-up all the data currently on your hard drive. If you do not do this you risk losing data permanently. You should also know the correct physical parameters of your hard drive. This information can be obtained from your machine documentation or from the drive manufacturer. It is best not to rely on the parameters given in the BIOS: these may be translation parameters. If your drive is formatted for MS-DOS, it is advisable to run MS-DOS fdisk before you start to install COHERENT. If the whole drive is taken up by DOS partitions, you must use MS-DOS fdisk to create a non-DOS area on the drive. It is not sufficient to have an empty MS-DOS logical drive set aside for COHERENT. COHERENT does not recognize MS-DOS logical drives, it only sees the whole partition. The following diagram shows the way the MS- DOS fdisk sees your drive: =========================== | DOS Root Partition | |=========================| | DOS Extended Partition | |=========================| | ===================== | | | Logical Drive 1 | | | ===================== | | - - - - - - - - - - - - | | ===================== | | | Logical Drive 2 | | | ===================== | | - - - - - - - - - - - - | | ===================== | | | Logical Drive 3 | | | ===================== | =========================== And the following diagram shows the way the COHERENT fdisk sees your drive: =========================== | DOS Root Partition | |=========================| | | | | | DOS Extended Partition | | | | | =========================== If you use COHERENT fdisk to repartition MS-DOS space, you risk causing MS- DOS fdisk to hang. One further word of warning. If you have an automated disk formatting and partitioning utility on your MS-DOS partition such as Disk Manager or Speedstor, you should operate it in ``manual'' mode, not in ``automatic''. Some hard drives have more than 1,024 cylinders. COHERENT can only recognize a drive up to this limit. You may have a utility such as Speedstor that allows you to place MS-DOS partitions beyond that boundary. COHERENT will not see those partitions, but you can still access them as usual through MS-DOS. When partitioning a drive with more than 1,024 cylinders, be sure to run the partitioning utility before you start to install COHERENT. You should create a non-DOS partition that falls completely within the 1,022-cylinder boundary. Your next MS-DOS partition should start no sooner than the 1,026th cylinder. Adding a COHERENT Partition The following describes how to add a new COHERENT partition on your hard disk. During your initial installation of COHERENT, the installation program handled the details of preparing your hard disk for COHERENT. Adding a partition after the system is installed is not difficult, but it requires that you understand the operation of the following commands: badscan, chmod, chown, fdisk, fsck, mkfs, and mount. See the Lexicon articles for each of these commands for further information before you attempt to add a partition. In general, the following steps are required when creating a partition for use by COHERENT. Please note that you must not change the size of your existing root partition, or you may no longer be able to boot COHERENT from the hard disk. 1. Completely back up all partitions on your hard disk. Be sure to back up the COHERENT partitions, as well as any non-COHERENT partitions (e.g., those for MS-DOS or OS/2). Verify that your backups are readable and correct. 2. Log in as the superuser root. Make sure all other users are off the system; then invoke the command /etc/shutdown. This shuts down COHERENT and returns the system to single-user mode. Type the command sync to flush all buffers. 3. Invoke the COHERENT command fdisk and add the COHERENT partition to your disk, as described above. Be sure to write down the device name associated with your new partition (e.g., /dev/at0c) and its size. 4. The command badscan checks the device for bad blocks. If your partition resides on a non-SCSI device, run the command badscan as follows: /etc/badscan -v -o /conf/proto.device raw_device xdevice where device specifies the four-character block-special device name for the partition (e.g., at0c), raw_device is the full device path name for the character-special device associated with the partition (e.g., /dev/rat0c), and xdevice names the partition-table device for the disk drive (e.g., /dev/at0x). 5. Invoke the command mkfs to create a COHERENT file system on the new partition, as follows: /etc/mkfs /dev/device /conf/proto.device This invocation forces mkfs to use the contents of the ``proto'' file that badscan created when it built the bad_block list for the new partition. 6. If need be, use the command mkdir to create a directory to use as a mount point for the newly created file system. The mount point is the directory onto which this directory's file system will be appended. Usually, this directory is located under `/', also called the root directory. You can, however, mount a file system onto any directory that already exists. If you create a new directory (e.g., /w or /mydir), use the commands chown and chmod to set an appropriate ownership and mode for for the directory. 7. Edit the file /etc/mount.all and add a line of the following form: /etc/mount device /mount_point where device is the full path name of the device that specifies your new partition (e.g., /dev/at0c), and mount_point is the name of the directory that you created in the earlier step. 8. Finally, edit the file /etc/checklist and add the character special device name (e.g., /dev/rat0c) of the new COHERENT partition to it. This will ensure that COHERENT will automatically run fsck on that partition's file system whenever you boot the system. This can be vital in recovering from a system crash. Adding Another Hard Disk If you wish to add another hard disk to your system, you may have to run some low-level routines that are hardware specific. See the documentation that accompanies your hardware for details. In brief, when you install the hard disk, you must partition it, as you did your original hard disk when you first installed COHERENT. If you wish to add non-COHERENT operating systems to one or more partitions, do so first; then add COHERENT to the remaining partitions, as described above. Changing the Size of the Root Partition Changing the size of your root file system requires that you reinstall COHERENT. It is strongly advised that you back up all partitions of your system before you attempt to do this. In addition, to reduce the time involved in restoring your data files, make an additional backup of all directories and files that have changed form your original COHERENT installation. The command find will help you locate all such files; see its Lexicon entry for details. You should then follow the directions given in the release notes for installing COHERENT. Note that when you attempt to install COHERENT over an existing COHERENT partition, COHERENT will ask you if you are sure you know what you're doing before the installation procedure creates a new file system on the partition. Be sure to request that a new file system be created, or the installation will fail. After installing the COHERENT distribution onto your new root partition, restore any data files and directories from the second set of backups that you performed. See Also Administering COHERENT, at, badscan, chmod, chown, fdisk, fsck, hai, ideinfo, mkfs, mount Notes For information on how an IDE drive is configured, use the command ideinfo. For details on how to use this command, see its entry in the Lexicon. Some users have attempted to use Norton Utilities or similar tools to rearrange the partition table, only to find that COHERENT no longer boots. That is because the kernel has embedded within it the name of the partition on which it and its root file system live. By using Norton Utilities to shuffle the partition table, the kernel will no longer be able to find any of the files or utilities it needs to boot your system. If you still wish to shuffle your disk's partition table, be sure to change the name of the root device within the kernel before you change the partition table.