Download Operating system flexibility - La page d`accueil du P:L:O:U:G

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Copland (operating system) wikipedia , lookup

Spring (operating system) wikipedia , lookup

Library (computing) wikipedia , lookup

OS-tan wikipedia , lookup

Distributed operating system wikipedia , lookup

OS/2 wikipedia , lookup

Mobile operating system wikipedia , lookup

Unix security wikipedia , lookup

System 7 wikipedia , lookup

Caldera OpenLinux wikipedia , lookup

VS/9 wikipedia , lookup

Linux adoption wikipedia , lookup

Smallfoot wikipedia , lookup

CP/M wikipedia , lookup

Security-focused operating system wikipedia , lookup

Master boot record wikipedia , lookup

Booting wikipedia , lookup

Windows NT startup process wikipedia , lookup

Transcript
.................
Advanced search
IBM home | Products & services | Support & downloads | My account
IBM developerWorks : Linux : Linux articles
Operating system flexibility
Setting up a multi-boot machine with Linux and other operating system
T. W. Burger ([email protected])
Owner, Thomas Wolfgang Burger Consulting
December 2000
The author likes Linux best, but sometimes a job for a client or access to an old data
format requires the use of those other so-called operating systems. Installing a new
operating system over your old one and then switching back again is a painful process.
Alternatively, devoting an entirely new computer to an OS you use only occasionally is not
a realistic option for most of us. The solution is to make one computer capable of booting
any of a number of operating systems from a menu when you first start the machine. Linux
is very adaptable to this, and with a few changes can share the same machine with one or
more other operating systems.
Contents:
Before you begin
Step 1: Back up everything!
Step 2: Confirm the old and
new OS media, and create a
boot floppy disk
Step 3: Repartition the drive
Step 4 (last): Configure the
OS selection
Hardware-based options
Conclusion
Most of the instructions for making a computer multi-OS capable are like the Steve Martin joke
about how to get a million dollars and never pay taxes. (Step one: Get a million dollars.) Many of Resources
the planning steps and preliminary requirements are left out or only vaguely alluded to. This
About the author
article will try to explain all of the planning and set-up required before installing the multi-boot
Rate this article
system.
Before you begin
To install multiple operating systems on a single computer, the details of hard drive organization must be understood. Readers
familiar with the boot process, hard drive formats, and partitioning can skip ahead to Step 1.
What are partitions?
A partition is a physical section of a drive that can be logically formatted for a desired file system or is used to create further
logical divisions. There are three types of partitions: primary, extended, and logical. There can be up to four primary partitions
on a single drive. A primary partition cannot be broken down into smaller units and is used primarily as the location of an
operating system. An extended partition is also a primary partition. It differs in that it has the extended capability of being
broken down into logical partitions. This allows the drive to be organized into multiple logical divisions in excess of the four
primary partition limit. Each partition can be logically formatted to support the file systems that a particular operating system
requires.
The boot process
The "boot" process comes from the term "boot strap". It is a play on the concept of pulling one's self up by one's own boot
straps. What actually happens is that when the computer is powered up, the CPU runs the startup code implanted in the
system's ROM BIOS (Read Only Memory Basic Input Output System). This startup program contains the code that tests the
computer and sets up the hardware for use. Its last step is to load and run a program stored on the first sector of the first drive.
This is the master boot record (MBR), and the program is the master boot program (MBP). The MBP looks to see where the
primary partitions are and which one is set as the active partition. The active partition has its own boot record, and this contains
a program designed to start the operating system located on that partition. A partition boot record is usually referred to as the
partition root superblock.
Step 1: Back up everything!
It cannot be stressed enough: take the time to back up all the files on the drive before attempting to make major configuration
changes to the boot process. The following steps will change the fundamental method of loading the operating system to the
computer. A single mistake will render the hard drive inaccessible, and there is a possibility that files will not be recoverable. It
is best to back up a complete image of the hard drive if you have the capacity. If not, at least back up data files that cannot be
easily reproduced, such as resumes, pictures, databases, and accounting files.
Step 2: Confirm the old and new OS media, and create a boot floppy disk
After backing up all of the important files and before making the changes, make sure that the sources of the existing operating
system and the new OS to be installed are on hand and complete. This includes updates, patches, utilities, and service releases.
They should all be on hand on easily accessible media. Easily accessible means in a format that can be loaded without
complicated driver setups. A floppy diskette is best. Nothing is more frustrating than to be halfway through an installation and
discover you have an older copy of a release file on the floppy and the new one is on the hard drive you can not access at this
time or that your cousin Vicky borrowed the latest kernel release CD and you are stuck until she comes back from camping.
Before altering the hard drive, please make sure that the bootable floppy is available with the utilities required to restore the
drive if problems occur. A typical problem occurs when a new Linux user is trying to keep Windows 95 on the same machine
on which Linux is to be installed. The Linux installation goes well until the user is asked where to install LILO (the Linux
loader program). Instead of placing LILO in the new Linux logical partition superblock, it is placed in the master boot record.
When the computer is rebooted, neither Linux nor Windows 95 is available. The solution is simply a matter of having a WIN95
boot floppy with FDISK.EXE on it and, after booting from it, issuing the command FDISK /MBR to restore the master boot
record from the copy LILO made.
Step 3: Repartition the drive
Different operating systems have different limitations on how and where they can be installed on the hard drive. Linux is
probably the most adaptable OS for multi-boot systems. It will boot from both primary and logical partitions and from a
secondary hard drive. Other operating systems have very limited abilities when it comes to the type and location of their
partitions. The most common limitation is the offset allowed to the start of the partition superblock. In some cases the
limitation is at the 1024 cylinder boundary of the hard drive. This depends on the size and type of hard drive, the file format,
the computer's BIOS, and the operating system.
Partition requirements of some operating systems
Operating
Approx.
System
Space
Needed
Linux
OS/2
DOS
Windows
Windows
Windows
Windows
Boots from
Root
Has to be
Primary or
Superblock
Format
on First
Logical Drive
Boundary
Drive
95
98
NT
2000
Either
Either
Primary
Primary
Primary
Primary**
Primary
8
4
2
8
8
8
8
GB
GB
GB
GB
GB
GB
GB
Linux Ext2
FAT or HPFS
FAT
FAT or FAT32*
FAT or FAT32
FAT*** or NTFS
FAT, FAT32 or NTFS
Partition
250 MB
110 MB
8 MB
90 MB
175 MB
117
600 MB
No
No
Yes
Yes
No
Yes
Yes
Notes:
* Only the Windows 95 OEM Service Release 2 version supports FAT32.
** NT needs only the NT boot files NTLDR, NTDETECT.COM, and BOOT.INI in
the primary partition.
*** NT cannot use FAT32 partitions.
Due to the flexibility of Linux and the limitations of other operating systems, it is best to place Linux in a logical partition and
on a secondary hard drive if available. This allows maximum flexibility for using other operating systems and allows Linux to
preserve the MBR for the use of other operating systems.
To create or modify the hard drive partitions, there are several programs available. For Linux there is Linux FDISK and Disk
Druid. Make sure that you have the latest version. Older versions can cause partition tables to be unreadable to other operating
systems. The newer versions of Linux FDISK and Disk Druid will not cause problems. Commercial programs are more
powerful and will allow moving, resizing, merging, and reformatting of partitions as well as creating and deleting partitions.
One of the best is Partition Magic from PowerQuest. This program runs under Windows and Linux and will allow almost any
change to the hard drive without disturbing the operating systems, programs, and data already on the drive.
Step 4 (last): Configure the OS selection
There are three ways to manage the selection of an operating system:
● Use a boot management program
● Configure a dual-boot system managed by an OS
● Manually set an OS "active" using a utility to mark the partition as active or manually editing the master boot record
Boot management programs offer the most flexibility and the ease of menu selection. The program is installed in the MBR of
the primary hard drive, replacing the OS boot program that would simply select the active partition and load the OS boot
program from the root superblock. Two programs that can do this are Boot Manager from IBM and BootMagic from
PowerQuest.
Dual boot configurations can be created using LILO in Linux and Windows NT's boot loader. The OS loader can be changed
so that when it starts, an alternate OS can be selected. This works very well and does not require the purchase of additional
software. A moderate degree of technical knowledge is required to reconfigure the OS loader to load alternate operating
system. See Resources for additional information.
DOS FDISK or PowerQuest PQBoot command-line utilities can alter the active partition attribute so that the OS on the primary
partition selected on the first physical hard disk is allowed to load. This is a useful method for those who only wish to change
operating systems only occasionally. It does limit selection to the primary partitions of the first hard drive.
Hardware-based options
An alternative to all of the complexity of creating new partitions and setting up OS boot selections is to reconfigure the
computer to attempt booting from media other than the hard drive. Most new computers can be set up in the BIOS
configuration to attempt booting from not only the floppy drive but from the CD ROM drive and SCSI devices. There are
limitations as to what can be run this way, and often there are technical difficulties.
Linux and other CD ROM-distributed operating systems are bootable from the CD ROM drive, with limitations. No version of
Windows will function from the CD ROM as it is a read-only device.
Floppy disk boots are slow but flexible. If you usually run Linux but also require occasional use of Windows NT, an NT boot
disk can be created by formatting a diskette in NT and copying the NT boot files NTLDR, NTDETECT.COM, and BOOT.INI
to it. When the computer boots, it will find the NT partition and load NT.
An excellent alternative if you can afford it and the computer is capable of doing so is to boot from large capacity removable
media like an Iomega Zip or Jazz drive. Changing the OS is simply a matter of changing the removable disk.
Swappable hard drives offer the ultimate in hardware-based OS selection. The drawback is the very high cost involved.
Conclusion
The ability to select from two or more operating systems at boot time will save the cost of a second machine to run the alternate
OS or the time required to delete and install a new OS. Changing the machine to allow the selection of multiple operating
systems can involve a lot of work: changing the partitions of a hard drive, adding or changing software, and changing the
master boot record. This software approach is complex but manageable with proper planning. It also has the advantage of being
inexpensive or even free.
Hardware solutions using removable or swappable media are simple, but can be very expensive. Options such as booting from
a floppy or a CD ROM drive are slow and have limitations.
Resources
● Modifying the NT loader:
❍ "Tips on how to install Windows NT and Linux on the same System"
❍
"Dual Booting Windows NT and Linux"
❍
"LILO loader from NT bootmenu"
●
Modifying the Linux loader LILO:
❍ LILO mini-HOWTO
●
For a good general resource as well as links to other sources mentioned in this article, see this Multiboot How To.
●
Good advice is also in "Partition planning tips" on developerWorks.
About the author
Thomas Wolfgang Burger is the owner of Thomas Wolfgang Burger Consulting. He has been a consultant, instructor, analyst
and applications developer since 1978. He can be reached at [email protected].
What do you think of this article?
Killer! (5)
Good stuff (4)
So-so; not bad (3)
Comments?
Submit feedback
About IBM | Privacy | Legal | Contact
Needs work (2)
Lame! (1)