Multi-Booting Solaris and Other Operating Systems: Mariusz Zynel Last Revised: 4 Sep, 2000
Multi-Booting Solaris and Other Operating Systems: Mariusz Zynel Last Revised: 4 Sep, 2000
Contents
I. Introduction . . . . . . . . . . . . I.1 Preface . . . . . . . . . . . Acknowledgments . . . . . . . . . Feedback . . . . . . . . . . . I.2 Legal notice . . . . . . . . . . Disclaimer . . . . . . . . . . . Copyright . . . . . . . . . . . Trademarks . . . . . . . . . . I.3 Applicability . . . . . . . . . . What IS this document about? . . . . . . What IS NOT this document about? . . . . II. Generalities . . . . . . . . . . . II.1 Geometry of a hard disk drive . . . . . . Basics . . . . . . . . . . . . Physical geometry . . . . . . . . . Logical geometry . . . . . . . . . II.2 Hard disk capacity limitations . . . . . . The Int 13h software interrupt . . . . . . The 504 MB barrier . . . . . . . . The 7.88 GB barrier . . . . . . . . II.3 BIOS geometry translation modes . . . . . BIOS geometry translation . . . . . . . Normal / Standard CHS Mode . . . . . . Extended CHS (ECHS) / Large Mode . . . . Logical Block Addressing (LBA) . . . . . II.4 Logical structure of a hard disk drive, boot process . Primary and extended partitions, file systems . . Master Boot Record (MBR) . . . . . . . Volume Boot Sector (VBS) . . . . . . . The boot process . . . . . . . . . III. Boot managers . . . . . . . . . . III.1 Solaris boot manager . . . . . . . . Primary boot . . . . . . . . . . Boot manager . . . . . . . . . . Secondary boot . . . . . . . . . Device Configuration Assistant . . . . . . Restoring Solaris boot manager . . . . . x86 Boot partition . . . . . . . . . III.2 NT Loader and boot.ini file . . . . . NT boot process . . . . . . . . . boot.ini file . . . . . . . . . . Booting NT . . . . . . . . . . Booting other than NT operating system . . . III.3 Linux Loader . . . . . . . . . . Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 1 1 2 2 2 2 2 2 3 3 3 3 3 3 4 4 4 5 6 6 6 6 7 8 8 9 10 10 11 11 11 12 12 12 13 13 14 14 14 15 16 17 17
-i-
Linux device naming convention . . . . . . . Lilo configuration . . . . . . . . . . . Using LILO . . . . . . . . . . . . Recovering LILO . . . . . . . . . . . Removing LILO . . . . . . . . . . . III.4 Third party boot managers . . . . . . . . OS-BS . . . . . . . . . . . . . Ranish Partition Manager . . . . . . . . . System Commander . . . . . . . . . . IV. Practical howto . . . . . . . . . . . . IV.1 First things first . . . . . . . . . . . Planning partitions . . . . . . . . . . . How to preserve an existing operating system? . . . . IV.2 Installation . . . . . . . . . . . . Hardware connection . . . . . . . . . . BIOS settings . . . . . . . . . . . . IV.3 Disks, partitions and slices under Solaris . . . . . Disk addressing conventions . . . . . . . . Slices and VTOC . . . . . . . . . . . Creating and mounting additional UFS file systems . . . Two Solaris partitions on the same drive . . . . . Mounting FAT partitions . . . . . . . . . V. Example installations . . . . . . . . . . . V.1 Single hard disk, Solaris, Windows NT . . . . . Overview . . . . . . . . . . . . . Partitioning . . . . . . . . . . . . Recipe . . . . . . . . . . . . . NT Loader as the default boot manager . . . . . . V.2 Single hard disk, Solaris, Linux, Windows NT . . . . Overview . . . . . . . . . . . . . Partitioning . . . . . . . . . . . . Recipe . . . . . . . . . . . . . LILO as the default boot manager . . . . . . . V.3 Single hard disk, Solaris, Linux, Windows NT, Windows 98 . Overview . . . . . . . . . . . . . Partitioning . . . . . . . . . . . . Recipe . . . . . . . . . . . . . LILO as the default boot manager . . . . . . . V.4 Two hard disks, Solaris, Windows NT - safety . . . . Overview . . . . . . . . . . . . . Partitioning . . . . . . . . . . . . Recipe . . . . . . . . . . . . . NT Loader as the default boot manager . . . . . . V.5 Two hard disks, Solaris, Windows NT - performance . . Overview . . . . . . . . . . . . . Partitioning . . . . . . . . . . . . Recipe . . . . . . . . . . . . . V.6 Two hard disks, Solaris, Linux, Windows NT, Windows 98 . Overview . . . . . . . . . . . . . Partitioning . . . . . . . . . . . . Recipe - variant A . . . . . . . . . . . LILO as the default boot manager - variant A . . . . Recipe - variant B . . . . . . . . . . . NT Loader as the default boot manager - variant B . . . VI. Back matter . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
17 17 19 19 19 19 19 20 20 20 20 20 21 22 22 22 23 23 24 24 25 26 26 26 27 27 27 27 28 28 28 28 29 30 30 30 30 31 31 31 31 32 32 33 33 33 33 33 34 34 34 35 35 36 36
- ii -
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
36 37 40 40 40
- iii -
I. Introduction
I.1 Preface
Growing popularity of Unix operating systems, including free Solaris and Linux, on desktop market and relatively low prices of large IDE hard disk drives raised the problem of having multiple operating systems on a single x86 machine. There are many reasons for installing alternative operating system along with Solaris: need of support for specific hardware, testing partability of the developed software, entertainment, kids etc. On summer 99, aproximately once a week one newbie question related to multi-booting Solaris x86 was asked on Solaris On Intel (http://www.egroups.com/solarisonintel) mailing list. Most people wanted to setup Solaris and Windows NT on their machines. I had a chance to went through this a couple of times, learned a lot about dual-booting, so I was doing my best answering questions and trying to help. That way I shared my experience with others. There were faqs devoted to Solaris x86, but information on dual-booting was incomplete and sometimes misleading. At that moment, I was visiting Shinshu University in Nagano, Japan, hardly working on Jordans curve theorem formalization using Mizar proof-checker. I needed some off-time and thought that writing a guide is a good idea. That was the begining. Now, this is the second approach to write a "perfect multi-booting guide". Thanks to feedback from users around the world, many corrections have been made. Numerous inquires indicated problems that should be coverd by the document. Hope this guide really helps.
Acknowledgments
Many thanks are due to the staff of Kiso Laboratory in the Shinshu University, Nagano, Japan for their support during preparation of this documentation. The author is greatly idebted to Bruce Riddle for initiative and encouragement. The author would like to express his gratitude for all who contributed to this documentation. Thanks go to (in alphabetical order): Richard Ji - for pointing out the performance issue when setting up two systems on two hard disk drives, Charles M. Kozierok - for providing whole sections on mysterious hardware and BIOS aspects, Michael Riley - for clearing up Solaris disk naming conventions and a hint on how to use multiple Solaris partitions on a single hard disk, Frank Sexton - for input on booting NT from a floppy disk, David N. Stivers - for details on setup and booting Solaris, NT and Linux. Special acknowledgement for authors referenced in this document for making their documentation freely available on the Internet. Special thanks also go to all whose inquires and feedback indicated issues worth explanation, confirmed or forced review of presented solutions.
Feedback
All suggestions, comments and corrections are very welcomed. If you find misspeled word, unclear phrase, broken link or your experiences related to the topics of the document are different please let me know. Please also do not hesitate to ask for help in case of problems. Just mail to [email protected] or [email protected].
-1-
Copyright
Copyright (c) 1999-2000 by Mariusz Zynel. Permission to copy all or part of this work is granted, provided that the copies are not made or distributed for resale and that the copyright notice and this notice are retained.
Trademarks
All trademarks used herein are the property of their respective owners.
I.3 Applicability
What IS this document about?
The document deals with the problem of making Sun Solaris Intel Edition operating system coexisting with other operating systems on a single x86 machine. It provides, however, general information that might be used for setting up any two, or more, opearting systems per a machine. The following operating systems were tested by the author and contributors, and are proved to coexist together: Sun Solaris 2.5.1, 2.6, 7, 8 Intel Edition, Linux, MS DOS 2.5 and above, MS Windows 3.x, 9x, MS Windows NT 4.0, 2000. This does not eliminate any other operating systems. The information provided may be unsatisfactory, or uncomplete in such a case though. Two variants of installation are discused: multiple operating systems on a single hard disk drive, as well as on separate hard disk drives. Factors, which should be considered when making decision on installation are presented. Instructions on how to preserve an existing operating system are given. Some generall issues are also covered to understand the problem better. There are sections on the x86 boot process, BIOS issues, connecting and partitioning hard disk drives. The document gives instructions on how to use Solaris, Linux and Windows NT boot managers. Some general information on third party boot managers is also provided. There are sections devoted to Solaris x86 maintenance. Disk naming conventions are explained with examples. There are instructions on how to partition hard disks, create slices, create and mount file systems under Solaris x86. Various example installations are presented. Their advantages and disadvantages are pointed out. Note: The term Windows NT used in the document reffers to Windows NT 4.0 as well as to Windows 2000 (NT 5.0), unless it is stated otherwise.
-2-
II. Generalities
II.1 Geometry of a hard disk drive
Basics
The generic term used to refer to the way the disk structures its data into platters, tracks and sectors, is its geometry. In the early days this was a relatively simple concept: the disk had a certain number of heads, tracks per surface, and sectors per track. These were entered into the BIOS set up so the PC knew how to access the drive. With newer drives the situation is more complicated. The simplistic limits placed in the older BIOSs have persisted to this day, but the disks themselves have moved on to more complicated ways of storing data, and much larger capacities. The result is that tricks must be employed to ensure compatibility between old BIOS standards and newer hard disks. Note: These issues are related to IDE/ATA hard disks, not SCSI, which use a different addressing methodology.
Physical geometry
The physical geometry of a hard disk is the actual physical number of head, cylinder, and sector used by the disk. On older disks this is the only type of geometry that is ever used. The original setup parameters in the system BIOS are designed to support the geometries of these older drives, in particular the fact that every track has the same number of sectors. All newer drives that use zoned bit recording must hide the internal physical geometry from the rest of the system, because the BIOS can only handle one number for sectors per track. These drives use logical geometry figures, with the physical geometry hidden behind routines inside the drive controller.
Logical geometry
Drive parameters obtained by its autodetection in the system BIOS setup, additional software such as ATAID, or those printed in a hard disks setup manual are the logical geometry parameters that the hard disk manufacturer has specified for the drive. Since newer drives use zoned bit recording and hence have ten or more values for sectors per track depending on which region of the disk is being examined, it is not possible to set up the disk in the BIOS using the physical geometry. Also, the BIOS has a limit of 63 sectors per track, and all newer hard disks average more than 100 sectors per track, so even without zoned bit recording, there would be a problem. To get around this issue, the BIOS is given bogus parameters that give the approximate capacity of the disk, and the hard disk controller is given intelligence so that it can do automatic translation between the logical and physical geometry. Virtually all modern disks use a logical geometry with 16 heads and 63 sectors, since these are the largest values allowed by the BIOS. The actual physical geometry is totally different, but the BIOS (and the system) knows nothing about this. As far as the system is concerned, the disk has 16 heads and 63 sectors on every track, and the hard disk itself takes care of all the "dirty work". The physical geometry is totally hidden from view.
-3-
Here is an example showing the difference between the physical and logical geometry for a sample drive, a 3.8 GB Quantum Fireball TM (from [Quantum]):
Specification Read/Write Heads Cylinders (tracks per Surface) Sectors Per track Total Sectors
Physical Geometry Logical Geometry 6 16 6,810 7,480 122 to 232 63 7,539,840 7,539,840
Table II.1.1: Physical and logical geometry of 3.8 GB Quantum Fireball TM.
The fact that both geometries equate to the same number of total sectors is not a coincidence. The purpose of the logical geometry is to enable access to the entire disk using terms that the BIOS can handle. The logical geometry could theoretically end up with a smaller number of sectors than the physical, but this would mean wasted space on the disk. It can never specify more sectors than physically exist, of course. The translation between logical and physical geometry is the lowest level of translation that occurs when using a modern hard disk. It is different from BIOS geometry translation, which occurs at a higher level, to overcome hard disk capacity limitations (cf. [Kozierok]).
-4-
Bits For Standard IDE/ATA BIOS Int 13h Combination Cylinder Number 16 10 10 Head Number 4 8 4 Sector Number 8 6 6 Total Geometry 28 24 20
Table II.2.1: The number of bits used for the geometry specification of IDE/ATA and BIOS standards, and their combination.
The maximum number supported for any parameter is 2^N, where N is the number in the table above. So this means that under IDE/ATA, 2^16 or 65,536 cylinders are supported. We can then multiply all the figures together to get a total number of sectors supported, and then multiply that by 512 bytes (per sector) to get the maximum supported capacity:
Maximum Heads Maximum Sectors Maximum Capacity 16 256 16 256 63 63 128 GB 7.88 GB 504 MB
Table II.2.2: The maximal capacity supported by IDE/ATA and BIOS standards, and their combination.
Note: The BIOS Int 13h limit for sectors is 63, and not 64, because by convention sectors are numbered starting from 1, not 0. The 504 MB figure is just 1,024 * 16 * 63 * 512; the problem is the combination of the limitations of the two standards. Due to the 16-head limitation of IDE/ATA, no IDE hard disk is ever specified with more than 16 logical heads; they always have a large number of cylinders instead. The problem is that when you put the disk in a machine with a standard, non-translating BIOS, it cant see more than 1,024 of the cylinders. There are several different ways that the system may react to a drive too large for it to handle. The normal solution to the 504 MB problem is to use BIOS geometry translation. Software drive overlays will also avoid the problem, but at a cost.
-5-
Note: Besides barrier described in this section, there are yet two another for IDE/ATA hard disk drives, called: 1.97 GB and 2 GB. More detailed discussion of this topic can be found in [Kozierok]. Note: Some older SCSI host adapters did have problems that made them unable to access hard disks over 1 GB in size, or some other arbitrary limits. Present host adapters should not have these limitations. Note: FAT-16 file system is restricted to 2 GB per partition. It is a file system issue, not a hardware or BIOS one. Note: Solaris 7 and earlier can access up to first 1024 cylinders (ca. 8 GB) on IDE/ATA hard disks.
-6-
Consider a 3.1 GB Western Digital CaviarTM hard drive, AC33100. This drive actually has a capacity of 2.95 binary GB, and logical geometry of 6,136 cylinders, 16 heads and 63 sectors. This is well within the bounds of the IDE/ATA limitations, but exceeds the BIOS limit of 1,024 cylinders. The BIOS picks a translation factor such that dividing the logical number of cylinders by this number will produce a number of cylinders below 1,024. Usually one of 2, 4, 8, or 16 are selected; in this case the optimal number is 8. The BIOS then divides the number of cylinders by 8 and multiplies the number of heads by 8. This results in a translated geometry of 767 cylinders, 128 heads and 63 sectors. Evidently, the capacity stays unchanged, and the new geometry fits quite nicely into the BIOS limits:
Standard IDE/ATA Limits Hard Disk Logical Geometry BIOS translation Factor BIOS translated Geometry BIOS Int 13h Limits
Table II.3.1: ECSH geometry translation applied to 3.1 GB Western Digital Caviar TM.
The BIOS presents the translated geometry to the operating system and the hard disk is seen as it has 767 cylinders, 128 heads and 63 sectors. Whenever the operating system or an application wants to use BIOS Int 13h calls, they use this geometry. The BIOS, when it executes its disk access routines, translates back to the real logical geometry used by the hard disk before sending its request to the disk. Extended CHS or large mode are, in practice, not that frequently used. Instead, LBA mode is more popular; it is similar in concept but does the translation differently.
-7-
the parameters used by these calls from the translated geometry to the drives logical geometry. With LBA, it translates from the translated geometry directly into a logical block (sector) number (cf. [Kozierok]).
-8-
running on the same machine. FAT-16 and FAT-32 are not compatible. NT 4.0 does not recognize FAT-32 without additional software while W2K fully supports it. Note: NTFS version 3 used by NT 4.0 is not compatible with NTFS version 5 introduced in Service Pack 4 for NT 4.0 and used by W2K. All NTFS volumes version 3 are automaticaly converted to version 5 when used under W2K. The operation can not be reversed, which makes them unusable in NT 4.0. Solaris UFS file system has been improved in Solaris 7 by acquisition of journal file system methods, which can save headakes with data restoration after the system crash or unattended power failure. The new feature is called "logging" and can be turned on when a file system is mounted. On the command line it is done by supplying -o logging file system specific option to mount command (see mount, mount_ufs man pages). To mount default file systems during boot process logging should be added to mount option field in /etc/vfstab configuration file (see vfstab man page).
Description Master Boot Code Partition #1 Partition #2 Partition #3 Partition #4 End of Master Boot Table marker - 0x55 0xAA
Note: Windows NT and W2K store the information on drive letter assignment in NT Disk Signature, which is unique for every hard disk drive. This signature is simply 4 bytes of MBR starting at byte 0x1B8 - right before the definition of partition number 1. Most of boot managers and partition managers do not preserve this bit of data, which may lead to troubles in case of non-standard drive lettering. Each partition entry in the Master Partition Table has its Partition ID, Activity Flag, Start Cylinder/Head/Sector, and End Cylinder/Head/Sector specified.
Description Activity Flag Start Head 0x0A bits for Start Cylinder, 0x06 bits for Start Sector Partition ID End Head 0x0A bits for End Cylinder, 0x06 bits for End Sector The number of the first sector of the partition, realtive to the entire disk The size of the partition measured in sectors
-9-
The Partition ID specifies the type of the partition (or to what OS it belongs), Activity Flag determines which primary partition should be booted, and the Start/End specify location of the partition [Richmond]. The following Partition IDs are mostly used:
Partition ID 0x01 0x04 0x05 0x06 0x07 0x0B 0x0C 0x63 0x81 0x82 0x83 0x85 0xA5 0xBE 0xEB
Description DOS12 (12-bit FAT) DOS16 (16-bit FAT) Extended DOS BIGDOS FAT-16 Windows NT (NTFS), OS/2 (HPFS) Windows FAT-32 Windows FAT-32 LBA Unix SysV/386 Linux/Minix Solaris x86 UFS, Linux swap Linux ext2fs Linux Extended FreeBSD, NetBSD, BSD/386 x86 Boot BeOS
If there is an extended partition on the disk, Master Partition Table holds a link to an Extended Partition Table that describes the first logical volume for the partition. That table contains information about that first logical volume, and a link to the next Extended Partition Table which describes the second logical volume on that partition, and so on. This allows for infite number of logical volumes, theoreticaly. To load an operating system, BIOS as a starting point of the boot process, needs to know where that operating system resides. Instead, BIOS loads Master Boot Code - small initial boot program in the MBR. This program eventually transfers control to the partition boot program stored at the first sector of the active partition.
- 10 -
On a hard disk, the first physical sector is its MBR, and the boot code is the Master Boot Code. First, MBR moves itself to 0x0000:0x0600, then loads the VBS of the first active primary partition on the boot disk to its original location 0x0000:0x7C00, and jumps to its first byte, unless a non-standard Master Boot Code is in use, such as Lilo or Ranish PM. This completes the standard PC hard disk sequence. For a floppy disk, the first physical sector is the VBS. The BIOS does not care whether it is loading an MBR or a VBS. When booting from a floppy disk, which has no partitioning information and therefore no MBR, only the VBS is effectively loaded (cf. [Locke]). After the BIOS passed control to either, MBR in case of booting from a hard disk, or VBS when booting from a floppy, the boot program specific to the operating system is started. Its behavior depends strictly on the operating system. Generally, ther rest of the boot process, as well as its initial part, is divided into more and more advanced boot stages. Some operating systems like Solaris, Linux, or NT allow for user interaction during the system load. All these systems offer their own boot managers, i.e. programs which give user some control over the boot process, and thus make coexistence of many operating systems on one machine easier. A boot manager need not to be the part of an operating system. There are many third party boot managers, from tiny OS-BS, to very powerful, though complex, System Commander. DOS and Windows 3.x/9x boot process is simplified. There is no user interaction. Volume Boot Code simply loads io.sys file, which then loads device drivers and starts user shell. Modern operating systems are not limited to boot off the local hard disk drive only. Solaris and NT are capable to boot accross the network. This makes possible to have fully functional workstations with no hard disk drives, which reduces costs of management and administration.
- 11 -
Boot manager
Programs bootblk and strap.com, loaded in result of primary boot, are very similar. Both contain Solaris boot manager code, which reads current disk partition information, and in case there is more than one primary partition, displays the table with all available partitions. It gives an oportunity to reboot another partition, in other words, another operating system. The default one is Solaris. The default timeout to make selection is 30 seconds. The difference between bootblk and strap.com is that, the first one is placed on UFS file systems and can not be configured, while the second is placed on FAT file systems (floppy disk or x86 Boot partition) and the timeout may be set in /solaris/strap.rc file.
Secondary boot
If Solaris partition is selected to boot off, the secondary boot - boot.bin - is loaded by the boot manager. The secondary boot is capable of reading and booting from a UFS file system on a hard disk or CD, or by way of LAN using NFS protocol. It switches the processor to 32-bit, paged, protected mode and performs some limited machine initialization. Then, it runs Device Configuration Assistant, which either, boots the system automaticaly, or let the user select boot device, depending on the state of auto-boot eeprom variable (see eeprom man page). After that, root file system specified in bootpath eeprom variable is mounted. Secondary boot is programmable, which makes it very flexible. If the root file system is successfully mounted, boot.bin invokes a command interpreter, that interprets /etc/bootrc script. The /etc/bootrc script lets the user to specify additional options for booting kernel, e.g. -r to reconfigure devices automaticaly.
- 12 -
- 13 -
All those files are placed on the root of the boot partition, not necessarily the same partition, where NT operating system files reside. In particular they may be placed on a boot floppy disk. The last file on the list: ntbootdd.sys is optional and absent in most cases. File ntldr contains the main boot program. In opposite to msdos.sys - MS DOS boot program - ntldr need not to reside at the first sectors of the boot partition, and may be copied without the use of special methods. This applies also to all previously listed files. NT Loader allows to load not only Windows NT, but almost all operating systems for IBM PC compatibles. To load other than Windows NT operating system, a file containing the VBS or Master Boot Record specific for that operating system is required. When it is the VBS or MBR depends on the behavior of the operating system and is explained in the latter section. User chooses operating systems from a text menu displayed by NT Loader. The NT boot process, including the menu for operating systems, may be configured within NT Loaders configuration file: boot.ini.
boot.ini file
boot.ini file contains configuration of the NT boot process. It is a regular Windows INI file, that is, it consists of sections which in turn contain variables we can asign values to. Its read-only flag is on by default, so you may need to switch it off before editing. Only part of options of that configuration file will be discussed in this document. For further details see [MS1] or [Russinovich]. An example of boot.ini file:
[boot loader] timeout=30 default=multi(0)disk(0)rdisk(1)partition(1)\WINNT [operating systems] multi(0)disk(0)rdisk(1)partition(1)\WINNT="MS Windows NT 4.0" multi(0)disk(0)rdisk(1)partition(1)\WINNT="MS Windows NT 4.0 [VGA mode]" /basevideo /sos C:\solaris.bin="Sun Solaris" C:\dos.bin="MS DOS 6.22" C:\floppy.bin="Boot floppy A:"
It is usually divided into two sections boot loader and operating systems. The meaning of variables of the first one is as follows: default Specifies the default operating system that will be loaded if a user does not make any choice in NT Loader menu.
- 14 -
timeout Specifies time in seconds, to wait before default operating system is loaded. Entries in the section operating systems, according to its name, configure NT Loader to boot operating systems and define NT Loader menu items. Each entry in this section is of the form: location = menu-item { option } where location Specifies the location of either, NT System Root, or the file containing the boot var of other then NT operating system. Accordingly, two different syntaxes are used, which we explain further. menu-item Text displayed in the NT Loader menu. option A switch that controls NT boot process (cf. [Russinovich]). It is possible to specify either none, one, or more switches in one entry. Commonly used are: basevideo Standard VGA display driver is used in GUI mode sos Print information about what drivers are being loaded as the system boots. win95 Emulate the boot process of Windows 9x and load Windows 9x. win95dos Emulate the boot process of Windows 9x and load DOS. Only 8 items may be displayed in the NT Loader menu, so only the first 8 entries will be available on this menu.
Booting NT
To boot Windows NT, an entry in the section Operating Systems of boot.ini file must contain location which specify the location of NT System Root. NT System Root is a directory where the files of Windows NT operating system reside. The NT environment variable %SystemRoot% points to that directory. NT operating system may be stored on a primary partition, as well as on a logical volume. When pointing to NT System Root the syntax for location is as follows: ( multi( X ) | scsi( X ) ) disk( Y ) rdisk( Z ) partition( W ) win-nt-dir Parameter multi is valid for both IDE and SCSI hard disk drives, and indicates to Windows NT that it should rely on the computers BIOS to boot the system. This means that the NT Loader will be using interrupt Int 13h calls to find and load the kernel of the system and any other files needed to boot Windows NT. In this case the X, Y, Z, and W parameters have the following meaning: X is the ordinal number of the adapter and should always be 0 (zero) since BIOS only identifies a single disk controller through Int 13h. Y is always 0 (zero) since BIOS specifies this parameter through Int 13h. Z is the ordinal for the disk on the adapter and is a number between 0 and 3, with limitations described below. W is the partition number. All partitions receive a number except for type 5 (Extended DOS) and type 0 (unused) partitions, with primary partitions being numbered first and then logical volumes. The first valid number for W is 1, as opposed to X, Y, and Z which start at 0 (zero).
- 15 -
When multi is used the following limitations apply: 1. In a pure IDE/ATA system, NT Loader may boot the system from one of up to four hard disk drives connected to the first dual-channel controller. 2. In a pure SCSI system, NT Loader may boot the system form the first two drives on the first SCSI controller, that is, the controller whose BIOS loads first. 3. In a mixed SCSI and IDE system, NT Loader may boot the system only from IDE/ATA drives on the first controller. Parameter scsi indicates that NT Loader will load a boot device driver and use that driver to access the boot partition. The device driver used is in the file ntbootdd.sys, which is a copy of the device driver for the drive controller in use. In this case the X, Y, Z, and W parameters have the following meaning: X is the ordinal number of the adapter as identified by the ntbootdd.sys driver. Y is the SCSI ID of the boot disk. Z is the SCSI logical unit number (LUN) of the boot disk. This number is almost always 0 (zero). W is the partition number as above. To determine the value of the X parameter, in case of multiple adapters that use different device drivers, only those adapters should be counted which are controlled by ntbootdd.sys. In that situation, to boot Windows NT from a hard disk on the adapter not controlled by ntbootdd.sys, the file ntbootdd.sys should be changed for the copy of appropriate device driver (cf. [MS1]). Summarizing, the part of the location string to the backslash specifies the controller, the hard disk drive and the partition, where NT operating system files are kept. Hence, the rest of that string win-nt-dir - is always the path to the NT System Root directory with the drive letter (and colon) truncated. Usually it is WINNT.
- 16 -
There is a serious limitation when using images of MBR or VBS. Only those operating systems may be booted this way, which boot partitions reside on the boot drive. It is imposed by the BIOS not NT Loader. There is no problem if we have a single hard disk drive. Problems arise when we want NT Loader to boot off the second drive. Say that the primary master IDE drive (C: in BIOS boot sequence) is a boot drive, and we want to boot with NT Loader an operating system which boot partition is placed on the secondary master drive (D: in BIOS lettering). VBS of that partition or MBR of the later drive is useless as it assumes the operating system is on the boot drive and reads from that one. The workaround is to use Bootpart program. It does not simply make images of VBSes or MBRs but creates its own, special boot code which switches the boot drive on the fly if it is necessary. If we use Bootpart in our example, the boot process could look as follows: NT Loader first loads a boot block created by Bootpart, it then switches the boot drive to D:, loads appriopriate VBS of boot partition and the boot process of the opearting system begins.
Lilo configuration
LILO is fully customizable. Its configuration file is /etc/lilo.conf. LILO is initially preconfigured during the Linux installation process. With these, default settings LILO knows nothing about other operating systems installed on a machine, and can boot only Linux. In this situation it behaves simply as DOS or Windows 9x, which cant boot anything but themselves. The syntax of the /etc/lilo.conf file is simplified. It contains variables that can have values assigned to, and switches. Some variables implicitly determine sections. We discuss only those variables and switches which are necessary to configure LILO to boot Linux and other operating
- 17 -
systems. For more details refer to LILO documentation distributed along Linux, [Veselosky] or [Skoric]. An example /etc/lilo.conf may look as follows: boot=/dev/hda map=/boot/map install=/boot/boot.b compact prompt timeout=50 image=/boot/vmlinuz-2.0.39 label=linux root=/dev/hda3 read-only other=/dev/hda1 label=nt other=/dev/hda2 label=solaris This example file is taken from the system with one IDE/ATA hard disk drive with NT installed on the first primary partition, Solaris on the second one and Linux on the third one. LILO is installed into MBR and is used as the default boot manager. Used variables and switches have the following meaning. boot Determines where LILO will be installed. Any device address associated with a fixed media or any partition address is a valid value. Usually it points to either MBR of the boot drive, or VBS of Linux boot partition. E.g. /dev/hda tells LILO to install into MBR of a primary master IDE/ATA hard disk drive. /dev/hdb3 means third primary partition on a primary slave drive, and /dev/sda5 means the first logical volume on the extended partition on the first SCSI drive. map Variable used internally by LILO. install Specifies the file containing Volume Boot Code. compact Switch that makes LILO read the hard drive faster. prompt This is a switch that tells LILO to prompt a user at boot time to choose an operating system or enter parameters for the Linux kernel. timeout Specifies how long to wait at the prompt before booting the default operating system. Measured in tenths of a second. 50 means 5 seconds; 0 or not present variable at all causes LILO to wait endlessly or boot immediately as prompt switch is specified or not. image Specifies the name of a Linux kernel for LILO to boot, e.g. /boot/vmlinuz-2.0.39. This variable begins a section, and the lines that follow give specific paramters for this particular kernel. You may have up to sixteen image sections, but one should suffice. The first image listed in the file is the default, unless you specify otherwise. label The name that is used to identify this image at the LILO boot prompt. Typing this identifier will select this image. Usually set to linux. root Specifies the volume where the root (/) file system resides, in other words, the boot volume of Linux. Note that it may be either a primary partition or a logical volume. This file system will be mount at the boot time. If LILO is installed into VBS, this value should be equal to the value of boot.
- 18 -
read-only This switch is usually present and causes the Linux kernel to initially mount the root file system as read-only and remount as read-write later. other This variable is optional and has similar meaning for other than Linux operating system as image has for Linux. It begins a section for such a system. Its value points to the boot partition of that operating system. LILO will simply load and execute the VBS of this partition at boot time. label Same as the label above. Specifies an identifier to refer to the operating system at LILO boot prompt. Every time /etc/lilo.conf is modified, we have to apply changes to take effect. To do that run as root : /sbin/lilo Successfull configuration of Linux and other operating systems specified in /etc/lilo.conf is reported by displaying "Added label". An asterisk indicates the default operating system to boot.
Using LILO
Though LILO realizes relatively advanced tasks, its usage is simplified. It is not menu driven, instead a prompt "LILO:" for user input is displayed. LILO then waits the amount of time specified in /etc/lilo.conf and if there is no user input, it loads the default operating system. Operating systems are selected by their labels specified in /etc/lilo.conf. To list all available identifiers TAB key may be pressed. Additional parameters to Linux kernel may be given after the Linux identifier.
Recovering LILO
When Linux is installed prior other operating system, LILO that was written into MBR may no longer be available. This happens when e.g. DOS, Windows, including NT and W2K, or Solaris are installed after Linux. LILO might be wiped out not only during other opearting system installation, but also by certain disk utilities or anti-virus software. In case we want LILO to manage the boot process from its very begining, it needs to be restored. This is done the same way changes to LILO configuration are applied. So, Linux must be booted some other way, e.g. by Loadlin or Linux boot floppy, and /sbin/lilo must be run by root. Keep in mind that this procedure restores Master Boot Code only, not Master Partition Table. That is in case of disaster, when entire MBR is lost, restoring LILO as described above will not fix the problem. In general this means that the data on the hard disk drive is lost. To avoid such problems MBR should be backed up after every modification.
Removing LILO
Discusing LILO and its configuration we should mention that it is posible to remove LILO from MBR safely. Before LILO is installed the original Master Boot Code is saved for future restoration. This feature may be used when one decides to uninstall Linux. It is done by running /sbin/lilo with option -u. If Linux can not be loaded we may also try DOS fdisk utility or Ranish PM to rebuild MBR.
- 19 -
System Commander
System Commander (http://www.v-com.com/) is a very sophisticated boot manager, which can boot all operating systems for IBM PC compatibles. It is a commercial software. System Commander installs into MBR and requires FAT-16 partition to store its code and configuration data. It can change active partitions and hide partitions on the fly. Its OS Wizard prepares system for installation of a new operating system. Newly installed operating systems are automatically detected and included to the main menu. It is possible to setup users with different privileges for booting operating systems, so that the access to the machine is controlled by passwords.
- 20 -
2.
3.
4. 5.
6. 7.
8. 9. 10. 11.
data and applications could be placed in logical volumes. Safety. When installing two or more operating systems, it is most safe to install them into separate, dedicated hard disk drives. This will prevent data loss of one system when another accidentally crashes the hard disk. Also repartitioning of one system does not influence the other. In this case only one of the hard disks works at the time. Performance. In contrast to the above, safe model, getting all hard disk drives working for one operating system may improve performance significantly. It can be achived by partitioning hard disks so that every operating system uses at least one volume on each hard disk. The performance depends also on how long distance hard disk heads have to go to access requested data. So, frequently used files like swap should be stored near the middle of the hard disk, and volumes that belong to one operating system should lay side by side. Provide a file system for data exchange between operating systems. It must be suported by all systems. Most broadly supported is FAT-16. Solaris 7 and earlier do not support IDE hard disk drives larger than 8 GB, that is, they may access only the first 1024 cylinders of such a disk. Since the problem is on Solaris fdisk side, the workaround is quite strightforward: 1. Using Linux fdisk program on Linux installation floppy, or Ranish PM create a Linux swap primary partition. It is also possible to create e.g. DOS partition and change its ID to 0x82 (Solaris ID) with a favourite hex-editor and BOOT program, or a disk editor. 2. Boot Solaris from e.g. its installation CD. 3. Run format utility and create slices on Solaris partition. 4. Run newfs to construct file systems on all created slices. Solaris 2.6 and earlier do not support FAT-32. Windows NT up to the Service Pack 4 do not support hard disk drives larger than 8 GB. The only way to solve this is to install updated in SP4 ATAPI driver. Separate driver may be downloaded and installed, as well as entire SP4. Windows NT boot partition may not exceed 4 GB. This was solved in SP4. MS DOS, Windows 3.x and Windows 95 up to OSR2 do not support hard disks larger than 8 GB. FAT-16 partition may not exceed 2 GB. Multiple extended partitions are not broadly supported, though NT supports such.
- 21 -
To copy file by file of Windows 9x, NT or W2K, an extra operating system that can handle that must be used. That is, if we intend to copy NT on NTFS file by file, the system prohibits opening some files (e.g. registry files) and we have to boot additional copy of NT or W2K to do the job. This requires additional hard disk drive and plenty of storage room.
IV.2 Installation
Hardware connection
Before we present examples of a system setup we would like to discuss some basic, though general, hardware issues required to install software successfully. All SCSI devices on the system must be connected so that they form a chain terminated on its both extreme ends. All devices that lay between the ends must have their termination disabled. Termination is done with a jumper or micro switch on internal devices, and by a terminating plug on external devices. Modern SCSI adapters terminate themselves automaticaly. Each device attached to the SCSI host bus adapter, as well as the host adapter itself, must have a unique SCSI ID number (target number, usually 0 through 7 or 0 through 15). Those IDs are set manually with jumpers or micro switches, or automaticaly by the host adapter BIOS if SCAM (SCSI Configured AutoMatically) protocol is supported by all devices in the chain. Almost every modern system board is equipped with two channel EIDE (Extended IDE) controller (older boards have only one channel controller). To every channel up to two devices may be connected, which makesfour IDE devices possible. In practice, IDE devices that share a channel, in contrast to SCSI devices on the same chain, always work with the speed of the slower device. E.g. a CD-ROM that supports only PIO mode 3 connected as a slave, slows down a modern master hard disk supporting PIO mode 4. To improve the performance connect hard disks to the primary channel and other devices like CD-ROMs, CD burners, DVD, ZIP drives to the secondary channel.
BIOS settings
Currently available hard disk drives on the market go far beyond 8 GB barrier. As for now there is no BIOS geometry translation that might overcome that limitation. Modern operating systems like: Solaris 8, Linux, NT 4.0 + SP4, W2K, or Windows 98 override BIOS disk routines and use Int 13h extensions. This allows to use such large hard disks. On the BIOS level, however, the problem still persists. BIOS cannot access cylinders past 1024-th one, and therefore is not able to boot partitions past 1024-th cylinder. 1024 cylinders correspond to 504 MB or 7.88 GB as LBA is disabled or enabled in BIOS. This is meanigless on systems where operating systems are installed on separate hard disk drives, and such a drive may be set to Normal, LBA or Auto. Large is not recommended. When multiple operating systems are installed on a single drive LBA should be enabled. Note: Do not change BIOS geometry translation after an operating system has been installed, or that system will not boot any more. Solaris keeps track on physical connection of devices. Sometimes, there are situation in which such a behaviour might be considered a serious limitation, but actually, this makes Solaris stable and reliable. In case of DOS or succesors, when a new hard disk drive is attached one always wonders how drive letters will be rearranged. NT is a bit smarter with its Disk Signature but suffers the same weakness. During installation of a new operating system on a separate hard disk drive, it is safe to disconnect the unused one. Swapping hard disks is not recommended. This causes physical addresses to be different during installation and after it. When you usually boot off primary master and want that hard disk to be turned off during installation on a slave or secondary drive, change BIOS boot sequence setting instead of swaping drives.
- 22 -
Note: The generall rule for temporary booting off other than usuall drive is: do not swap cables, reconfigure your BIOS instead. Most modern BIOSes are capable of setting boot sequence (refer to your BIOS manual for more details). Available values of the BIOS boot sequence entry, that is, boot devices and their order, vary from BIOS to BIOS. Letters C, D, E and F in this entry refer to IDE hard disk drives. To boot from SCSI drive, SCSI option should be selected in BIOS boot sequence. In some BIOSes there is no SCSI option available in this entry, but there is HDD sequence SCSI/IDE entry instead. It determines which controler SCSI or IDE should be searched first during bootup. The order of SCSI devices is setup in the SCSI controller BIOS. Older BIOSes may have no option to boot from SCSI at all.
- 23 -
1. Primary - FAT-16 2. Primary - FAT-16 3. Extended 3.1. FAT-16 3.2. FAT-16 4. Extended 4.1. FAT-16 4.2. FAT-16 Table IV.3.1: Example partitioning and Solaris addresses.
Though the partitioning is valid some volumes can not be accessed using addresses containing entire disk specification p0. This addressing schema correspond to DOS one with drive letters. Using partition addresses pP we can access every volume. Observe that the later schema makes no distinction between primary partitions and logical volumes, they are simply volumes within partitions. Note: The above example was prepared and tested only under Solaris 8 and may not apply to earlier versions.
- 24 -
fdisk /dev/rdsk/c0d1/p0 This task is relatively easy since the above command runs fdisk in the interactice mode. It allows to delete partitions that we no longer need. Next step is to create slices on the new Solaris partition. Run program format, which also offers the interactive mode. We will probbaly see something like this: AVAILABLE DISK SELECTIONS: 0. c0d0 /pci@0,0/pci-ide@4,1/ide@0/cmdk@0,0 1. c0d1 /pci@0,0/pci-ide@4,1/ide@1/cmdk@0,0 Specify disk (enter its number): Solaris automaticaly recognized its own partition on c0d1 and you do not need to remember which one it was. After selecting 1 a menu with format options shows up. partition submenu is responsible for slice management. format shows only 0 through 9 slices though 16 are allowed. Keep in mind that slices 2, 8,9 are reserved, and the 0-th slice should begin at sector 3. Command label should be invoked before quiting partition. When the new Solaris partition is already sliced, type: newfs /dev/rdsk/c0d1s0 to construct UFS file system on the 0-th slice. You need to contruct file system on every slice you defined. Last step to perform is mounting: mount /dev/rdsk/cod1s0 /export/home1 This will mount 0-th slice on /export/home1 (/export/home1 must exist prior mounting). To have new slices mounted at boot time add them to /etc/vfstab (read vfstab man page).
- 25 -
c0t0d0, so run format and create exactly one slice 0 in p3, so that it starts in 0-th sector and fills entire p3, much like slice 2. New UFS file system is created with: newfs /dev/rdsk/c0t0d0s0 New file system is ready to mount. Restore the identifier of p1 back to 0x82, reboot Solaris as usuall, and mount p3: mount /dev/dsk/c0t0d0p3 p3 acts like a single slice and that is the trick. The interesting question arises: where is the VTOC of p3 now?
1. Primary - NTFS - Windows NT 2. Primary - UFS - Solaris - active 3. Primary - Linux ext2fs - Linux 4. Extended 4.1. Linux swap 4.2. Linux ext2fs 4.3. FAT-16 4.4. NTFS 4.5. NTFS
To access FAT-16 partition it must be mounted. Type as root: mount -F pcfs /dev/c0t0d0p4:e /mnt and FAT partition content will be available below /mnt directory. The above command is valid for SCSI hard disks. For IDE drives drop t0. File system mounting, as in the example above, requires superuser intervention and the file system will be unmounted after system reboot. To mount FAT partition permanently in directory /share, create this directory first, and add the following line to /etc/vfstab file: /dev/dsk/c0t0d0p4:e /share pcfs yes -
Remember to end this line with a line feed character (break the line typeing Return). This will mount FAT partition automatically during bootup. The same commands apply to both FAT-16 and FAT-32. Read mount_pcfs and vfstab man pages for more details.
V. Example installations
V.1 Single hard disk, Solaris, Windows NT
- 26 -
Overview
In this example there is a single one hard disk on the system. It might be either IDE or SCSI. Two operating systems are installed: Solaris and Windows NT. FAT-16 volume is created to provide data exchange between them. After the installation is complete, at the boot time a user is presented the Solaris boot manager menu to select which operating system to load.
Partitioning
The hard disk will be partitioned as follows (proportions are meaningless):
1. Primary - NTFS - Windows NT 2. Primary - Solaris UFS - Solaris - active 3. Extended 3.1. FAT-16 3.2. NTFS 3.3. NTFS
Recipe
1. Connect hardware and configure BIOS (see IV.1 for details). 2. Install Windows NT. Create one primary partition with NTFS as a file system (see notes on the size). This will be C: drive. 3. Install Solaris. Tell installator not to use the entire disk space by Solaris. With Solaris fdisk program create one Solaris primary partition after the NT partition. Be careful not to remove exising NT partition. Solaris boot partition becomes the active one. Solaris boot manager becomes the default, and despite Solaris does not recognize NTFS file system NT may be booted from its menu. 4. With NT Disk Administrator create an extended partition and logical volumes. Create at least one FAT-16 file system to enable communication between Solaris and NT. In case of Solaris 7 or earlier, FAT-16 file system must end before 1024-th cylinder to be accessable by Solaris. Additional NTFS volumes help in organizing NT user data and applications. They become D:, E: and so on. 5. Under Solaris, create /share directory, and add the following line to /etc/vfstab file under Solaris: /dev/dsk/c0t0d0p3:c /share pcfs yes -
FAT-16 partition will be mounted automatically at the boot time (see notes on mounting FAT partitions). If the hard disk is IDE drop t0. Remarks: It is also possible to setup Solaris before Windows NT. If that is the case, to boot Solaris either, activate Solaris boot manager, or install some third party boot manager. To activate Solaris boot manager make the Solaris partition active. Use DOS fdisk program on DOS boot floppy, or NT Disk Administrator.
- 27 -
respectively. When the system is setup according to the description in the previous section, perform the following steps: 1. Boot system into DOS with DOS boot floppy. 2. Create an image file of the MBR. Issue the following command at the DOS prompt: boot /r /drive:0 mbr solaris.bin 3. Setup OS-BS boot manager. Run program os-bs.com (or osbs20b8.com), set NT as the only operating system, give it whatever label you like, set timeout to 1 second. Leave Solaris partition active and order OS-BS boot manager not to change it. 4. Restart the system and boot Windows NT. 5. Copy the file solaris.bin from the floppy disk to the root of the NT boot partition. 6. Edit boot.ini file so that it contains the following entries:
[boot loader] timeout=30 default=multi(0)disk(0)rdisk(0)partition(1)\WINNT [operating systems] multi(0)disk(0)rdisk(0)partition(1)\WINNT="MS Windows NT 4.0" multi(0)disk(0)rdisk(0)partition(1)\WINNT="MS Windows NT 4.0 [VGA mode]" /basevideo /sos C:\solaris.bin="Sun Solaris"
After the system is rebooted the NT Loader menu should appear. Now, it contains an entry to boot Solaris. When Solaris is selected its own boot manager appears.
Partitioning
The hard disk will be partitioned as follows (proportions are meaningless):
1. Primary - NTFS - Windows NT 2. Primary - Solaris UFS - Solaris - active 3. Primary - Linux ext2fs - Linux 4. Extended 4.1. Linux swap 4.2. Linux ext2fs 4.3. FAT-16 4.4. NTFS 4.5. NTFS
Recipe
1. Connect hardware and configure BIOS (see IV.1 for details). 2. Install Windows NT. Create one primary partition at the beginning of the hard disk and format it with NTFS (see notes on the Ref iv/1#partitioning size>).
- 28 -
3. Install Solaris. Tell installator not to use the entire disk space by Solaris. With Solaris fdisk program create one Solaris primary partition after the NT partition. Solaris boot partition becomes the active one. Solaris boot manager becomes the default and lets to boot Solaris and NT. 4. Install Linux. Remember that Linux needs a swap file system, which must be placed in a logical volume (no more primary partitions are allowed, and we need a FAT-16 volume) and its type is 0x82, the same as already existing Solaris partition. So, with Linux fdisk create one primary partition of type ext2fs - 0x83 for at least / and /boot file systems, an extended partition, one logical volume for swap of type 0x82 and as many logical volumes of type ext2fs - 0x83 for other file systems, as you need. For desktop Linux you will probably put /, /boot, /var, /tmp and /usr file systems into the fdisk primary partition, swap and /home file systems into separate logical volumes. Before, read notes on the size and placement of Linux primary partition, and [Koehntopp], [Veselosky] for organizing Linux file systems. Install Lilo into /dev/sda3 - Linux primary partition. At this point, Linux partition is marked active and no other system can be booted. 5. Under Linux, mark Solaris partition as active with Linux fdisk. This will make Solaris boot manager the default one, and all three systems can be booted. 6. Create FAT-16 volume on the extended partition with Linux fdisk. 7. Under Linux, create /share directory, and add the following line to /etc/fstab file: /dev/sda7 /share vfat user,rw,exec 0 0
This will make FAT-16 prtition automatically mounted at the boot time. 8. Use NT Disk Administrator to create separate NTFS logical volumes for applications and user data. You may assign drive letters so that D: and E: will be NTFS volumes, and FAT-16 volume F: or e.g. S: (share). 9. Under Solaris, create /share directory, and add the following line to /etc/vfstab file under Solaris: /dev/dsk/c0t0d0p4:e /share pcfs yes -
FAT-16 partition will be mounted automatically at the boot time (see notes on mounting FAT partitions). Remarks: If the hard disk is IDE use hda instead of sda and drop t0.
- 29 -
Partitioning
The hard disk will be partitioned as follows (proportions are meaningless):
1. Primary - FAT-16 - Windows 98 2. Primary - Solaris UFS - Solaris - active 3. Primary - Linux ext2fs - Linux 4. Extended 4.1. Linux swap 4.2. Linux ext2fs 4.3. NTFS- Windows NT 4.4. NTFS 4.5. NTFS 4.6. FAT-16 4.7. FAT-32
Recipe
1. Connect hardware and configure BIOS (see IV.1 for details). 2. Install Windows 98. Create one primary FAT-16 partition for Windows 98 system only (see notes on the size). This could be FAT-32 in case of W2K. 3. Install Solaris. With Solaris fdisk program create a Solaris primary partition. 4. Install Linux. Remember that the type of Linux swap volume, is 0x82, the same as already existing Solaris partition. With Linux fdisk create one primary partition of type ext2fs 0x83 for /, /boot and other system file systems, an extended partition, one logical volume for swap of type 0x82 and one logical volume of type ext2fs 0x83 for /home file system (read notes on Linux installation in V.2). Install Lilo into /dev/sda3 - Linux primary partition. At this point, Linux partition is marked active and only Linux may be booted. 5. Under Linux, mark Solaris partition as active with Linux fdisk. This will make Solaris boot manager the default one, which allows to boot other systems. 6. Install Windows NT. NT setup program detects FAT-16 partition and Windows 98 installation. Windows 98 can be selected to boot in the NT Loader menu. Create a NTFS logical volume on the extended partition to install NT system into. 7. With NT Disk Administrator create NTFS volumes D:, E: for user data and applications. Create FAT-16 volume to provide communication between operating systems. 8. Use NT Disk Administrator to set Solaris partition to active. 9. If necessary create one or more FAT-32 volumes for Windows 98. Use Windows 98 fdisk and format utilities or W2K Disk Administrator. 10. Under Linux, create /share directory, and add the following line to /etc/fstab file:
- 30 -
/dev/sda10
/share
vfat
user,rw,exec
This will make FAT-16 prtition automatically mounted at the boot time. 11. Under Solaris, create /share directory, and add the following line to /etc/vfstab file: /dev/dsk/c0t0d0p4:f /share pcfs yes -
FAT-16 partition will be mounted automatically at the boot time (see notes on mounting FAT partitions). Remarks: If the hard disk is IDE use hda instead of sda and drop t0.
Partitioning
Hard disks will be partitioned as follows (proportions are meaningless):
- 31 -
HDD-2 1. Primary - NTFS - Windows NT - active 2. Extended 2.1. NTFS 2.2. NTFS
Recipe
1. Connect hardware and configure BIOS. Set HDD-2 as the boot drive (see IV.1 for details). 2. Install Windows NT. During setup, create a primary NTFS partition on HDD-2 for NT system. This will allow boot HDD-2 directly in case of problems (see notes on the size). After that you should be able to boot NT. The primary partition is C:. 3. Boot NT and use its Disk Administrator to create an extended partition and NTFS logical volumes on HDD-2, for user data, applications, archives etc. Assign drive letters D:, E:, etc. for all created volumes and CD-ROM(s). 4. Use NT Disk Administrator to create a primary FAT-16 partition on HDD-1. Assign it first free or later drive letter. The partition will be used to exchange data between operating systems and to boot Windows NT. Its size should not exceed 1 GB to get resonable cluster size. 5. From root of C: copy files 1. ntldr, 2. ntdetect.com, 3. boot.ini, 4. ntbootdd.sys if HDD-1 is SCSI. to the FAT partition on HDD-1. 6. Edit the copy of boot.ini file in FAT partition and change all rdisk(0) entries to rdisk(1). In case of mixed IDE/SCSI environments read notes on booting NT. 7. Reboot the machine to BIOS setup and change BIOS boot sequence to boot from HDD-1. Do not swap hard disk cables (see notes on hardware and BIOS for details). Now, you should be able to boot NT from FAT partition on HDD-1. 8. Install Solaris. Select HDD-1 for installation and create a primary Solaris partition on the remainder of HDD-1. This partition becomes active and Solaris boot manager will appear after reboot. To boot NT select 1, i.e. FAT-16 partition, in the manager. 9. Under Solaris, create /share directory, and add the following line: /dev/dsk/c0t0d0p1:c /share pcfs yes -
to /etc/vfstab file, in order to have FAT-16 partition mounted automatically at the boot time (see notes on mounting FAT partitions). If HDD-1 is an IDE drive drop t0. If HDD-1 is SCSI and HDD-2 IDE, then HDD-1 is addressed by c1t0d0. Remarks: The above procedure seems complicated. It could be simplified by setting HDD-1 as the boot drive at the very beginning, creating FAT-16, and then installing NT. This order, however, causes that FAT-16 becomes C: and there could be problems with booting NT directly from HDD-2.
- 32 -
Partitioning
Hard disks will be partitioned as follows (proportions are meaningless):
HDD-2 1. Primary - Solaris UFS 2. Extended 2.1. FAT-16 2.2. NTFS 2.3. NTFS
Recipe
1. Connect hardware and configure BIOS. Set HDD-1 as the boot drive (see IV.1 for details). 2. Install Windows NT. During setup, create a primary NTFS partition on HDD-1 for NT system (see notes on the size). After that you should be able to boot NT. The primary partition becomes C:. 3. Install Solaris. Select HDD-1 and HDD-2 for installation. Create primary Solaris partitions: one on the remainder of HDD-1 and one on HDD-2. Slice those partition according to your needs. You may put swap file system on HDD-1 and /usr on HDD-2. This can improve performance, but is unsafe since Solaris will not boot with HDD-2 disconnected. The Solaris partition on HDD-1 becomes active and Solaris boot manager will appear after reboot. To boot NT select 1, i.e. NTFS partition, in the manager. 4. Boot NT and use its Disk Administrator to create an extended partition on HDD-2. Create FAT-16 logical volume and assign it some later drive letter e.g. S: (like share). Its size should not exceed 1 GB to get resonable cluster size. Create NTFS logical volumes, for user data, applications, archives etc. Assign drive letters D:, E: etc. for all created volumes and CD-ROM(s). 5. Under Solaris, create /share directory, and add the following line: /dev/dsk/c0t1d0p2:c /share pcfs yes -
to /etc/vfstab file to mount FAT-16 volume automatically at the boot time (see notes on mounting FAT partitions). If HDD-2 is an IDE drive use c0d1p2:c, if it is slave on the primary channel, or c1d0p2:c if it is master on the secondary channel. Remarks: Linux can be added easily as a third operating system. It is enough to leave some space on HDD-1 during Solaris setup, and on extended partition on HDD-2. Then install Linux according to instructions in section 2.
- 33 -
Overview
As usuall, there are many possible ways to install the system which satisfies criteria given in the title of this section. Exceptionally, we present two of them instead of one. There are two hard disk drives on the machine and the following operating systems are installed: Solaris, Linux, Windows NT, Windows 98. In the first variant Solaris boot manager is used to boot all systems, in the second, Linux Loader LILO.
Partitioning
Hard disks will be partitioned as follows (proportions are meaningless):
Variant A
HDD-1 1. Primary - FAT-32 - Windows 98 2. Primary - NTFS - Windows NT 3. Primary - Solaris UFS - Solaris - active 4. Primary - Linux ext2fs - Linux
HDD-2 1. Primary - Solaris UFS 2. Extended 2.1. Linux ex2fs 2.2. Linux swap 2.3. NTFS 2.4. NTFS 2.5. FAT-32 2.6. FAT-16
Variant B
HDD-1 1. Primary - FAT-32 - Windows 98 2. Primary - NTFS - Windows NT - active 3. Extended 3.1. NTFS 3.2. NTFS 3.3. FAT-32 3.4. FAT-16
HDD-2 1. Primary - Solaris UFS - Solaris - active 2. Primary - Linux ext2fs - Linux 3. Extended 3.1. Linux ex2fs 3.2. Linux swap
Recipe - variant A
1. Connect hardware and configure BIOS so that HDD-1 is the boot drive (see IV.1 for details). 2. Install Windows 98. Create one FAT-32 primary partition at the beginning of HDD-1. It may not exceed 1GB. It is enough to keep Windows 9x system files. Applications and user data may be stored on FAT-32 logical volumes on an extended partition (see notes on the size). 3. Install Windows NT. NT 4.0 will not recognize FAT-32 and Windows 98 installation contrary to W2K. In both cases create new primary partition and construct NTFS file system. It need not to be large since applications and user data can go to logical volumes on HDD-2. 4. Install Solaris. Tell installator not to use the reminder of the disk space and leave room for Linux. With the Solaris fdisk program create one Solaris primary partition on HDD-1 and one on HDD-2. 5. Install Linux creating the fourth primary partition. This partition should start before 1024-th cylinder of the disk to make Linux possible to boot by the BIOS. This partition will be adressed by /dev/sda4. Take care not to destroy Solaris partition as Linux swap partition has the same ID 0x82. Create Linux swap partition on en extended partition on HDD-2. Create also additional partition for /home file system. It will be /dev/sdb5. See notes on Linux installation in V.2.
- 34 -
6. 7. 8. 9. 10.
Install LILO into /dev/sda4. Using Linux fdisk make Solaris partition active to instruct BIOS to load Solaris boot manager at the system bootup. With NT Disk Administrator create NTFS volumes on HDD-2 for applications and user data. Assign drive letters according to your likes. With Windows 98 fdisk and format utilities, or W2K Disk Administrator create FAT-32 volume on HDD-2. Create FAT-16 volume on HDD-2 for data exchage. Under Solaris, create /share directory, and add the following line: /dev/dsk/c0t1d0p2:h /share pcfs yes -
to /etc/vfstab file to mount FAT volume at bootup (see notes on mounting FAT partitions). 11. Under Linux, create /share directory, and add the following line: /dev/sdb10 /share vfat user,rw,exec 0 0
to /etc/fstab file. Remarks: If W2K is installed, FAT-32 may be used to exchange data and FAT-16 can be avoided. Note that the address of FAT-32 volume is /dev/dsk/c0t1d0p2:g in Solaris, and /dev/sdb9 in Linux. For IDE drives use hda instead of sda and drop t0, t1. If HDD-1 is SCSI and HDD-2 IDE, then HDD-1 is addressed by c1t0d0 and HDD-2 by c0d0.
Recipe - variant B
1. Connect hardware and configure BIOS so that HDD-1 is the boot drive (see IV.1 for details). 2. Install Windows 98 (see variant A step 2). 3. Install Windows NT (see variant A step 3).
- 35 -
4. With NT Disk Administrator create an extended partittion on HDD-1 and NTFS volumes for applications and user data. Assign drive letters according to your likes. 5. With Windows 98 fdisk and format utilities, or W2K Disk Administrator create FAT-32 volume(s) on HDD-1. 6. Create FAT-16 volume on HDD-1 for data exchage. 7. Change BIOS boot sequence to boot from HDD-2 (do not swap cables). 8. Install Solaris. Tell installator not to use the entire HDD-2. With the Solaris fdisk program create one Solaris primary partition on HDD-2. 9. Install Linux (see variant A step 5). Install LILO into /dev/sdb i.e. into MBR of HDD-2. 10. Configure LILO as follows (see notes on LILO configuration): boot=/dev/sdb map=/boot/map install=/boot/boot.b compact prompt timeout=50 image=/boot/vmlinuz-2.0.39 label=linux root=/dev/sdb2 read-only other=/dev/sda1 label=win98 other=/dev/sda2 label=nt other=/dev/sdb1 label=solaris 11. Under Linux, create /share directory, and add the following line: /dev/sda8 /share vfat user,rw,exec 0 0
to /etc/fstab file. 12. Under Solaris, create /share directory, and add the following line: /dev/dsk/c0t0d0p3:f /share pcfs yes -
to /etc/vfstab file to mount FAT volume at bootup (see notes on mounting FAT partitions).
- 36 -
-AActivity Flag
-Bboot Solaris Windows NT boot.ini file boot manager Linux Solaris Windows NT third party boot process
-Ttranslation
VI.2 Glossary
A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z -AATA Advanced Technology Attachment - a disk drive interface standard based on the IBM PC ISA 16-bit bus but also used on other personal computers. The ATA specification deals with the power and data signal interfaces between the motherboard and the integrated disk controller and drive. The ATA "bus" only supports two devices - master and slave. ATA-2 Advanced Technology Attachment Interface with Extensions - a standard which extends the Advanced Technology Attachment interface while maintaining compatibility with current IBM PC BIOS designs. ATA-2 provides for faster data rates, 32-bit transactions and (in some drives) DMA. Optional support for power saving modes and removable devices is also in the standard.
- 37 -
-BBIOS boot sequence An entry in most moder BIOSes. Specifies where the BIOS should look first for an operating system. Enables to select devices in various order. Commonly available options are: A, C, C only, C, A, D, A, CD-ROM, C, A, SCSI, C ,A or LAN, C, A.
-Ccylinder The set of tracks on a multi-headed disk that may be accessed without head movement. That is, where multiple discs are mounted on the same axle, the collection of disk tracks which are at the same distance from the spindle about which the disks rotate. Each such group forms the shape of a cylinder. Placing data that are likely to be accessed together in cylinders reduces the access significantly as head movement (seeking) is slow compared to disk rotation and switching between heads.
-EEIDE Extended Integrated Drive Electronics - ATA-2. extended partition A partition of a hard disk drive divided into smaller logical sections - logical volumes. Developed to break the limit of 4 partitions per a hard disk drive, related to small size of MBR.
-FFAT, FAT-16, FAT-32 File Allocation Table. File systems based on the idea of File Allocation Table. Older FAT-16 are used by all MS opearting systems, newer FAT-32 is used since MS Windows 95 OSR2 was released. FAT-32 is recognized by Windows 98 and W2K, while NT 4.0 needs additional software to use FAT-32. file system 1. A method of arrangement of directories and files, connected with an operating system which implements it. 2. A collection of directories and files.
-Hhead An electronic device that reads/writes data from/to a disk. It is an interface between the magnetic physical media on which the data is stored and the electronic components that make up the rest of the hard disk. A head converts bits to magnetic pulses and stores them on a platter, and then reverses the process when the data is read back.
-IIA Intel Architecture - IBM PC compatible architecture or machine. IDE Integrated Drive Electronics - ATA.
-LLBA Logical Block Addressing - A translation method used by BIOS of IBM PC compatibles to change the size limit of a hard disk drive from around 528MB to 8.4GB. The number of cylinders of a hard disk drive is decreased while the number of heads is proportionaly increased, so that both parameters stay below their limits. The limits are 1024 for cylinders,
- 38 -
256 for heads and 64 for sector per track. logical volume A section of an extended partition that contains a file system.
-MMBR Master Boot Record - The first sector of a hard disk drive. It stores information about partitions on that disk, the partition id, activity flag, starting cylinder/head/sector, and ending cylinder/head/sector. Four partitions are allowed.
-NNT Disk Signature An entry in the MBR where Windows NT and W2K stores information on volume letter assignment. It occupies 4 bytes starting at 0x1B8 byte.
-Ooperating system (OS) A low-level software interface between hardware and applications. Sometimes comes with GUI - Graphic User Interface, and additional software.
-Ppartition On IA machines, logical section of a hard disk drive. On UNIX systems sometimes called slice. Generally, two types of partitions are distinguished: primary and extended. primary partition Usually bootable partition of a hard disk drive that contains an operating system.
-SSCSI Small Computer System Interface - A processor-independent standard for system-level interfacing between a computer and intelligent devices including hard disks, floppy disks, CD-ROM, printers, scanners and many more. sector 1. Physically, a continuous range of rotational angle of a disk, a segment of a track. Usually, physical sectors are staggered in order to give enough time to deal with one sector before the next is accessible. 2. Logically, a smallest portion of information that can be read/write at the time from/to disk, typicaly 512 bytes. On Macintosh and UNIX drives, sectors usually are grouped into blocks that function as the smallest data unit permitted. The terms block and sector are sometimes used interchangeably. slice On x86 machines, a logical section of a partition, common for Unix operating systems. Sometimes identified with partition on these systems. Usually contains a file system, e.g. /, /var, /usr or /export.
- 39 -
-VVBS Volume Boot Sector - The first sector of a partition. If the partition is bootable, it stores an executable program to load an operating system. VTOC Volume Table Of Contents - A table containing information on slices within a Solaris partition. The definition of a slice consists of 5 fileds: slice number, tag, flag, starting sector and size. There is room for 16 slices per partition. VTOC occupies the second and third sector of the Solaris parrtition. volume A primary partition or a logical volume.
VI.3 References
Literature
1. Howe, Denis, Free On-Line Dictionary of Computing (http://foldoc.doc.ic.ac.uk/foldoc/index.html), 1999. 2. Koehntopp, Kristan and Harris, Tony Linux Partition HOWTO (http://www.linuxdoc.org/HOWTO/mini/Partition.html), June 12, 2000. 3. Kozierok, Charles M., PC Guide (http://www.pcguide.com/), April 25, 1999. 4. Locke, Jason C., The NTLDR Hacking Guide (http://www.dorsai.org/~dcl/publications/NTLDR_Hacking), September 15, 1996. 5. Microsoft, Article ID: Q102873 (http://support.microsoft.com/support/kb/articles/q102/8/73.asp), January 14, 1999. 6. Quantum Corporation, Quantum Fireball TM Product Manual, 1996. 7. Richmond, Jay, Installing and Using FreeBSD With Other Operating Systems (http://www.freebsd.org/tutorials/multios/multios.html), August 6, 1996. 8. Russinovich, Mark, BOOT.INI Option Reference (http://www.sysinternals.com/bootini.htm), March 12, 1999. 9. Skoric, Miroslav, Lilo mini-Howto (http://www.linuxdoc.org/HOWTO/mini/LILO.html), 24 July, 2000. 10. Sun Microsystems, Inc., Reference Manual Collection, docs.sun.com. 11. Veselosky, Vince, Control-Escape: Alternative Software (http://www.control-escape.com/), 1999.
Software
ATAID (ftp://ftp.cdrom.com/.3/sac/utildiag/ataid011.zip), Boot (http://www.dorsai.org/~dcl/publications/NTLDR_Hacking/boot.zip), BootPart (http://ourworld.compuserve.com/homepages/gvollant/bootpart.htm), OS-BS and other FreeBSD Tools (ftp://ftp.freebsd.org/pub/FreeBSD/tools), Ranish Partition Manager (http://www.users.intercom.com/~ranish), System Commander (http://www.v-com.com/). Last revised: Sep 3, 2000.
- 40 -