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.
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 _d_i_s_k___d_r_i_v_e_r
bin/idmkcoh -o /_k_e_r_n_e_l___n_a_m_e
where kernel_name is the name you wish to give to the new kernel, and disk_driver is one of aatt, aahhaa, ssss, or hhaaii.
To enable a hard disk, again log in as root; then type the following commands:
cd /etc/conf
bin/idenable -e _d_i_s_k___d_r_i_v_e_r
# if you are installing the hai driver:
# hai/mkdev
bin/idmkcoh -o /_k_e_r_n_e_l___n_a_m_e
where disk_driver is one of aatt, aahhaa, ssss, or hhaaii.
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 ffddiisskk before you start to install COHERENT. If the whole drive is taken up by DOS partitions, you must use MS-DOS ffddiisskk 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 ffddiisskk sees your drive:
And the following diagram shows the way the COHERENT ffddiisskk sees your drive:
If you use COHERENT ffddiisskk to repartition MS-DOS space, you risk causing MS-DOS ffddiisskk 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.
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.
/etc/badscan -v -o /conf/proto._d_e_v_i_c_e _r_a_w___d_e_v_i_c_e _x_d_e_v_i_c_e
/etc/mkfs /dev/_d_e_v_i_c_e /conf/proto._d_e_v_i_c_e
/etc/mount _d_e_v_i_c_e _/_m_o_u_n_t___p_o_i_n_t
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.
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.
A 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.