Build a dual-boot Linux system on a single hard drive (1)

Source: Internet
Author: User
Tags websphere application server

Multiple Linux installations that can be used allow you to easily test different libraries of the same program and observe how your program interacts with other programs, or you can just adjust the parameters everywhere to see what will happen. This will be useful for development and testing-and customer support sooner or later. Suppose you do not have many machines? Don't worry-installing multiple Linux instances on a single machine is easy because you will soon find this point from this tip, this article was written by IBM intern Chuks Onwuneme and Farhan Khawaja.

As a partner of IBM Developer Relations, our task involves helping technical support personnel answer customer's questions (in other words, we Help Desk ). We mainly use IBM WebSphere products-one of the most common cases is the need to work with machines to reproduce actual customer problems.

In terms of words, recreating each problem means having the same system as the customer, of course, partitioning and running multiple systems on each drive is much more effective than using a separate machine for each system. Therefore, several months ago, we converted the method from one machine in each system to multiple systems in each machine.

Now, we can (for example) run two different versions of IBM WebSphere Application Server on the same operating system. All you have to do is divide the large drive (usually 19 GB in our lab drive) into two partitions and install the operating system on each partition, then, install a version of Websphere Application Server on each partition. In this way, we have multiple copies running in a similar environment on a machine.

In the IBM lab, we use a variety of operating systems, including several Microsoft Windows and NT derivative systems (Windows 2000 Server and Professional, NT Server and NT Professional) and AIX and Linux (Red Hat 6.2 ).

The Microsoft system contains a utility for installing multiple operating systems and is easy to convert. However, we are new to Linux, and the Red Hat system brings us some trouble, especially because it is difficult to find simple and clear documents to guide us. Therefore, we have provided this article, hoping that new Linux users who may face the same problem will easily find this document and find it clear, refined, and easy to use. If we succeed, please be sure to tell us (you can find our email address at the top and bottom of this Article ).

Our Tip article involves installing multiple instances of the same Linux release on a single drive (we use Red Hat in the Lab ). However, as long as you make a slight adjustment (or with the help of some of the documents listed in the references), for creating a machine with a dual-boot combination of different Linux or Linux and non-Linux operating systems, there should be no problem.

In this article, we use an old version of Red Hat because we tried to build a system that is exactly the same as the customer. Therefore, the Red Hat version used here is a few years ago and uses the earlier 2.2 kernel. Compared with the new Linux kernel, the multi-boot mode is different. For security reasons, it is wise to upgrade to a newer Linux 2.4 (. x) kernel version whenever possible. In addition, most Linux installations now provide GRUB to replace LILO or supplement LILO. This feature provides a more advanced way to handle Linux multi-boot features. In this way, if you are using a newer version without LILO, the following techniques may not be very useful-but if your version uses LILO, it is indispensable.

Red Hat Dual Boot: installation instructions

When you are about to start this process, first shut down the system and then restart it. Then, add the Red Hat Linux CD to the drive.

The Red Hat Linux installation routine guides you through a simple installation process. You must complete some basic system configurations, such as selecting the default language and keyboard type. Enter the correct information until the "Partitions" Screen appears.

When the screen appears, click "add" and select "Linux Native" as the operating system type. For "size", enter 16 (MB) and select/boot as the partition type. The remaining configurations are given below. For specific partitions, you can repeat the preceding commands to complete the configuration.

/Boot sda1 16 M Linux native

/Sda5 1024 M Linux native

Swapsda6 256 M Linux swap

/Varsda7 200 M Linux native

/Tmpsda8 200 M Linux native

Note that these directory locations are for SCSI drives. For IDE drives, simply replace s in sdal with h (Make Your hda1 A/boot drive and hda5 a root drive ).

Note that the above sizes are suitable for our hardware-they are not mandatory. You can flexibly choose any size suitable for your hardware, especially because the current newer hardware supports various configurations. However, do not allocate too much space to the "/boot" partition, because most of the space will eventually be wasted-on the latest hardware, you may want a boot area that is smaller than our boot partition. Similarly, you can use other sizes for other partitions.

Installation tag 2

Now, you are preparing to install the second Linux kernel instance. Follow the following simple principles:

Install lilo again on the Master Boot Record (MBR)

Linear mode (strictly required for SCSI drives)

Leave few Kernel Parameters empty

The initial installation partition should still be marked as "Not Set ". Keep them as Not Set, and then add five new partitions by clicking "add" and installing as specified above. You only need to add new partitions all the time and do not need to delete or edit the previously installed partitions.

The remaining installation remains unchanged. You can use any of your favorite names (we use linux2 ). However, if there are multiple characters in the label, ensure that they are enclosed in quotation marks (that is, if you want to retain spaces, use "Linux 2 "). Of course, be sure to mark the second installation with a different name than the first one.

After the installation, the system restarts and prompts. Press the Tab key to display the second Linux installation label. Enter "linux2" (or any name you specify for the second image) and press Enter. This will bring up the second Linux system you just installed.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.