Setting Up Dual Boot in Itanium®-based Systems

Submit New Article

October 3, 2008 12:00 AM PDT


Introduction
by Khang Nguyen
Intel Corporation

To set up dual booting in Itanium®-based systems, Microsoft requires a new disk style called GUID Partition Table (GPT) instead of master boot record (MBR) in the Win64* build and later. (GUID stands for Globally Unique Identifiers. For more information, refer to the Extensible Firmware Interface (EFI) developer guide.) Using this new disk style wipes out the entire hard disk. Therefore, it is very difficult, if not impossible, to set up the dual boot configuration on a single disk for Windows* and Red Hat Linux* operating systems (OS). However, there is a way to install these two operating systems on two separate disks. The idea is to install so they are independent of each other, and let the EFI handle the boot selection.

Win64 Whistler* builds 2428 and 2462 do not allow you to set the boot option manually. You cannot start Windows from the EFI prompt by running ia64ldr.efi. You also cannot run launcher.efi because it no longer exists. The Windows installer creates a Windows boot option in the boot menu. What happens if the user accidentally deletes the Windows boot option? This article shows you how to recover the boot menu.

Setting Up Dual Boot on Two Separate Disks
Hardware Environment
The machine was a single processor Itanium-based system with the bios build 89B and a B3 CPU stepping. There were two hard drives: one 8-GB SCSI and one 8-GB IDE.

Software Environment
Microsoft already produced the final version of their 64-bit Windows XP software, and Red Hat introduced a newer version of their Linux product. Although the test was done using Windows Whistler beta 2 and Red Hat Linux beta 1, it can be applied to beta versions or final products.
Preparation
Important: Be sure that the IDE drive is not on the same IDE controller with the CD-ROM and floppy disk drives because this IDE drive will be disconnected during the Windows installation. You need to put this hard drive on the master IDE controller.

Assume that the two hard drives are unformatted. If the two hard drives are connected, and you are installing Windows, the style of the two drives changes to GPT. Let's assume that you want to install Win64 on the SCSI drive and Linux on the IDE drive. You can install either Linux or Windows first, and the other operating system second.

Make sure you take the cover off the system to allow access to the inside of.
Installing Red Hat Linux* Beta 1
Follow the normal Linux installation procedure. For this test, Linux was installed from the CD-ROM. Follow screen instructions until you encounter the partition stage. The screen looks somewhat like this:
Current Disk Partition
Mount Point Device < strong>Requested Actual Type
  hda 2045200M 2045200M 0xee
  sda 2097151M 2097151M 0xee
Drive Summaries
Drive Geom[C/H/S] Total Used Free
hda [16383/16/63] 8063M 2045200M -2037137M [##########]
sda [1116/255/63] 8754M 2097151M -2088397M [##########]

The IDE and SCSI drives are about 8 GB each. Red Hat Linux Beta 1 installer does not understand the format of the GUID partition table. Therefore, it did not read the disk size correctly. The actual size of the IDE drive is 8063 MB, but Linux thinks that 2045200 MB have been used on that disk, and the disk space remaining is -2037137MB.

To install Linux on the IDE drive, the disk style has to be MBR, not GPT. You can change the disk style back to MBR by selecting the "hda" drive:

sda 2097151M 2097151M 0xee

and press the Delete button to remove that partition. Next, create three partitions for Linux:

Mount Point Device Requested Type
/boot/Extensible Firmware Interface (EFI) hda1 128M Dos 16-bit <32M (or FAT32 <2GB)
  hda2 256M Linux Swap
/ hda3 7678M Linux Native

Note: The File Allocation Table (FAT) format partition hda1 is required for EFI and Windows to set up the boot opti on. You can have more than three partitions, depending on whether the Linux machine is a server or a workstation.

Follow screen instructions to finish the Linux installation.
Installing Win64 Whistler* build 2428 and 2462
Important: After installing Linux, disconnect the IDE drive so that Windows cannot access that drive. Otherwise, the Windows installer will destroy the content of the IDE drive.

Follow normal Windows installation. Let the Windows installer automatically set the three partitions, and select Format NTFS* (quick). You must use the FAT32* format if you want it visible to the Linux64.

Note: Reconnect the IDE drive after you finish installing Windows.

How to Recover the Boot Option
To create a boot option, go to the boot option maintenance menu. There are many ways to create a boot option. (For information on how to set up a boot menu without using the boot option maintenance menu, refer to the paper "Extensible Firmware Interface (EFI) Shell and Scripting" by Khang Nguyen). However, Windows Whistler build 2428 cannot be started manually or from the shell script. Red Hat Linux beta 1 does. If the Linux boot option is corrupted or gets deleted, you can always use the boot option maintenance menu or other methods in the above paper to recreate it. This section will show you how to recover a boot option, including the Windows boot option, if, by accident, gets deleted from the boot menu.
To recover the boot option in Windows Whistler Build 2428
  1. Boot to the Extensible Firmware Interface (EFI) prompt.
  2. Go to the disk containing Windows (fs1, for example).
  3. Go to the MSUTIL directory.
  4. Run the program nvrboot.efi. The screen looks similar to this:
    NVRBOOT: OS Boot Option Maintenance Tool Revision: 1.0
    1 Microsoft Windows Whistler Advanced Server
    2 Extensible Firmware Interface (EFI) Shell [Built-In]
    3 Red Hat Linux Beta 1
    (C)opy (S)ave (R)estore (E)rase (A)dd (P)ush (H)elp (Q)uitSelect>
  5. Type S to save the boot option for the recovery process (required), and press Enter. The screen displays:
    Save 3 boot options...
    Save boot options to file: osbootdata
    Use Restore command to retrieve saved boot options
    Press Enter to continue
    Press Enter to continue and create the osbootdata file in the root directory of the Windows disk (fs1).
  6. Select R to recover the boot option, and press Enter. The screen displays:
    This will erase all OS boot options before restoring. Are you sure?
  7. Type Y. At the second prompt Are you sure? type Y again, and press Enter.
    Restore boot option from file:osbootdata
    Press Enter to continue
  8. Press Enter. Type Q to quit, and press Enter.
  9. Cold reboot the machine for the change to take effect.
To recover the boot option in Windows Whistler Build 2462
  1. Boot to the Extensible Firmware Interface (EFI) prompt.
  2. Go to the disk containing Windows (fs1, for example).
  3. Go to the MSUTIL directory
  4. Run the program nvrboot.efi. The screen will look similar to this:NVRBOOT: OS BootOptions Maintenance Tool (Revision:1.0b)
         1. Red Hat Linux Beta 1
         2. Extensible Firmware Interface (EFI) Shell [Built-In]
    *   3. Microsoft Windows Whistler Advanced Server
    * = Windows OS Boot Option
    (D)isplay (M)odify (C)opy E(x)port (I)mport (E)rase (P)ush (H)elp (Q)uit Select>
  5. Type X (for Export) to save the boot option, and press Enter. The screen displays:
    Enter OS boot option to export (* = All):
    Type: 3
    Enter EXPORT file path:
    Type: win_option
    Saving boot option 3-
    Saved Boot Option 3 to file: win_option
    Use Import command to retrieve saved boot option
    Press enter to continue
    Note: The number 3 means you select to save the Windows boot option, and win_option is the name of the file created in the root directory of the partition. To save all boot options, type *.
  6. To recover the boot option, type I (for Import), and press Enter. The screen displays:
    Enter IMPORT file path:
    Type: win option
    Import Boot Options from file: win option
    Press enter to continue
  7. Press Enter to continue, then type Q to quit, and press Enter.
  8. Cold reboot the machine for the change to take effect.
Note: If you select an option and find out that you made a mistake, press the Backspace key to erase the incorrect letter, and press Enter twice to get out.

References
To obtain a copy of Red Hat Linux, contact Red Hat*.

To find out more about the Extensible Firmware Interface (EFI), refer to this Web site: http://developer.intel.com/technology/efi/index.htm
About the Author
Khang Nguyen is an applications engineer working with Intel Software Solutions Group.