|[Home] [Credit Search] [Category Browser] [Staff Roll Call]||The LINUX.COM Article Archive|
|Originally Published: Monday, 17 July 2000||Author: Scott Nipp|
|Published to: learn_articles_firststep/General||Page: 1/1 - [Printable]|
Dual Boot Linux
Linux goes to great lengths to minimize the challenge of running more than one operating system on your computer. Most Linux distributions ship with a number of utilities to assist you in installing Linux as a second operating system on your computer, without having to reload your original operating system.
|Page 1 of 1|
Linux has been a "buzzword" in the computing world for quite a while now. Most people who are fairly computer savvy and follow the computer industry at all have at the very least heard of Linux. Many people, however, are limited to only having one computer at their disposal. This makes trying out a new operating system, such as Linux, a challenging task. Linux, however, goes to great lengths to minimize the challenge of running more than one operating system on your computer. Most Linux distributions ship with a number of utilities to assist you in installing Linux as a second operating system on your computer, without having to reload your original operating system.
First, let's cover some basic concepts. The hard drive is essentially a mass of free space divided into sections, known as partitions. To users of DOS and Windows, these partitions are seen as C: and D:. To users of Linux, they are known as /dev/hda1 and /dev/hda2. The purpose of a partition is to mark drive boundaries, allowing several different operating systems to share a single hard drive (potentially using different formats for organizing files, known as "filesystems," on each partition). Your computer probably came to you with a few partitions formatted with the FAT or FAT32 filesystems which contained Windows. The trick now is to move those partitions out of the way to make room for Linux, while not damaging any data contained in those partitions. That's where a tool called FIPS comes in.
FIPS is a utility that is included with many Linux distributions, and helps in installing Linux as a second operating system. FIPS is a program capable of "resizing" an existing Windows partition to allow you to free up unused space. "Resizing" your existing Windows partition can then provide you the necessary disk space to install Linux, without having to purchase and install a second hard drive for your computer. (It should be noted, however, that using a second drive is the ideal way to dual boot, if you have another one lying around somewhere). Before using FIPS, you must defragment your Windows partition to move all of the data to the "front" of the disk. You can then safely free up any unused space. (WARNING: Using FIPS can cause a loss of data, so backing up your system is STRONGLY recommended.) FIPS can be obtained from http://metalab.unc.edu/pub/Linux/system/install, and comes with a README file providing a good example of using it. Now that you have sufficient "free" disk space, you are able to proceed with installing Linux on the same hard drive that holds your Windows installation. Once again, this utility can cause a loss of data, and thus could require that you completely reload your system, so proceed with caution.
LILO (LInux LOader) has been the mainstay for providing the ability to "dual boot" between Linux and another operating systems for years now. LILO is a program that is configured to "boot" the desired operating system when you start the computer. "Booting" is simply the process of starting up the system when it is powered on. This includes checking your disks, loading necessary programs, and so on. LILO accomplishes this by reading a configuration file (/etc/lilo.conf) that defines each operating system on the computer, and how to actually access the "boot" program for those systems. This configuration file is created by the user and is capable of supporting a wide variety of operating systems. After making any modifications to lilo.conf, you must run a program (/sbin/lilo) to actually write those changes to the boot sector of the hard drive. LILO is capable of booting operating systems from multiple disks, as well as large disks with more than 1024 cylinders, which includes most all disks larger than 8GB in size. (Breaking the 1024 cylinder limit is a new feature for LILO, and may require updating to gain this functionality.) GRUB, a graphical replacement for LILO, is now becoming very common, and is even the default "boot loader" on some distributions. Whether you use GRUB, or LILO, the benefits are the same and provide you the flexibility to install and boot multiple operating systems on one computer.
Most Linux distributions have an installer that will detect your existing Windows partition, and set up LILO for you. Hopefully, you will not have to do this by hand. However, if you have no other option, you may need to edit the file /etc/lilo.conf as the root user. It may look a bit cryptic at first, so let's go through it and explain what the various lines mean. Please note that if you're using Windows NT or Windows 2000, you may also need to edit files on the Windows system. You'll see something like this:
boot=/dev/hda root=/dev/hda2 install=/boot/boot.b map=/boot/map image=/boot/vmlinuz label=Linux read-only other=/dev/hda1 label=windows table=/dev/hda
The section labeled "other" is the one we're interested in. You may need to add this section by hand. /dev/hda1 is the first partition on an IDE disk (C:, in Windows). The second partition (D:) would be /dev/hda2, and so on. Most likely, Windows is installed on your C: drive, so you would use /dev/hda1. This simply tells LILO which partition to boot from. The label is what you will type in at the boot prompt that appears when you start the system. It should say "LILO." Just enter the word "windows," and it should boot into that operating system.
This should work if you are using Windows 95 or 98. Please note that if you're using Windows NT or Windows 2000, you may also need to edit files on the Windows system. For more information on LILO itself, as well as getting it working with NT, take a look at this article.
Loadlin is another utility for booting multiple operating systems, but is quite different from Grub or Lilo. Loadlin is a DOS-based utility that is extremely useful for UMSDOS Linux installs. UMSDOS installation is outside the scope of this article, but is basically a method of installing Linux into your existing Windows filesystem without having suffer through the pains of repartitioning. The advantage of a UMSDOS installation is obvious: simplicity. The disadvantage of this type of installation is performance. Several distributions are capable of handling a UMSDOS installation, and this may be appealing for a first installation of Linux. More information about UMSDOS installations can be found in the UMSDOS HOWTO.
Here's how to proceed if you are installing a system from scratch, with no operating system on it to begin with. In the event that you have purchased a new hard drive, or a computer that you are going to load from scratch, you should load Windows first. The only thing to consider in the Windows installation is when initially partitioning the disk, leave yourself enough unpartitioned space to accommodate your Linux installation. Once you have installed Windows, and confirmed that it is working properly, then you will proceed with your Linux installation. The reason for installing Windows first is that Windows does not make provisions for booting multiple operating systems.
This means that if you were to install Linux first, and then Windows, once you reboot the system you will not have a Linux boot option. This is easy to avoid by simply installing Linux after Windows. If you have installed Windows after Linux for some reason, all you need to do is boot Linux from a floppy disk and then re-run LILO to overwrite the Windows boot program. By following these general steps, you can get both Windows and Linux up and running on a new system in a couple of hours.
Linux has always been known for flexibility. Linux is capable of "playing nice" with operating systems other than just Windows, but since Windows is the most common operating system available at this time, I have chosen to use it as an example. Linux also has the ability, built into the kernel, to allow you to read and write to your Windows partitions (although this is limited to read-only access for NT and 2000) to make dual booting that much more functional. While Windows can also read your Linux partitions, it requires the use of specialized applications such as LTOOLS. Installing Linux as a second operating system is a wonderful alternative for many people who are curious, or want to work with Linux, but would prefer to forego the cost of a second computer.
Scott Nipp is a Technical Solutions Consultant at Sprint Enterprise Network Services.
The views, information and opinions provided in this article are expressed and held solely by the author. Neither Sprint Enterprise Network Services nor Sprint Corporation or any of its affiliates assume any responsibility for any opinion or statement of fact presented in this article.
|Page 1 of 1|