There may be times when you find it necessary to develop in both the Linux™ and AIX® operating environments. This article describes dual booting Linux and AIX on the same IBM® eServer™ pSeries® (including eServer p5), eServer i5™, or eServer OpenPower™ server.

Matt Davis, Linux Power Technical Consultant, IBM 

Matt Davis is a Linux on POWER consultant for the IBM eServer Solutions Enablement organization at IBM living in Austin, TX. He has authored more than a dozen research reports and papers on Linux, Linux on POWER, and UNIX competitive analysis since coming to IBM in May 2000.



25 April 2005 (First published 15 November 2004)

Introduction

On IBM eServer servers that support logical partitioning, you should have Linux running in a separate partition from AIX. However, not all configurations support logical partitioning, and sometimes you need all of the resources available on the hardware. In these cases, dual booting the Linux and AIX operating systems can be an efficient way to provide each platform as you require. Unlike Linux for x86 servers, there is no common boot loader for both operating systems. Fortunately, OpenFirmware allows for multiple boot devices to enable dual booting. This utility eliminates the need to manually swap drives in and out of the machine. Manual disk swapping can lead to confusion about which disk is the primary, both for the user and for the operating system. This document assumes that the reader is familiar with installing both Linux for POWER™ and AIX.


Configuring for dual boot from OpenFirmware

It is critical to use the OpenFirmware interface to select the boot device. Never attempt to change the boot order by physically unplugging drives. Unplugging drives may result in confusion about the drive order, subsequent inability to boot your disks, and potential data loss.

The boot device configuration menu is located within the OpenFirmware menu system. After powering the machine on, press the 1 key when the LCD status panel reads "E1F1 to reach OpenFirmware." At the main menu, perform the following steps:

  1. Select option 1, SMS.
  2. Select option 5, Boot Options.
  3. Select option 2, Select Boot Devices Sequence.
  4. Select option 5, Hard Drives.
  5. Select option 1, SCSI, from the next menu. This menu allows you to select which disk you prefer to boot by default. This menu also allows you to order additional disks for placement in the Multiboot menu.
  6. From the Select Task menu, select M to return to the main menu.
  7. Repeat these steps as necessary to properly order your boot disks.

In order to boot a particular disk in the future, return to the Select Boot Options menu, and select option 3, Multiboot menu. This menu allows you to set the OpenFirmware to always pause at the Multiboot menu on startup (such that the 1 key does not have to be pressed). It also allows you to select from the disks you arranged in the method described above.


Configuring the boot device from within the operating system

In Linux, you can configure the boot-device that will be used on the next boot with the nvsetenv tool (located in /sbin). This tool must be used as root.

Using a simple script, you can set alternative reboot commands to have your machine reboot in Linux or in AIX. The format for the /sbin/nvsetenv boot-device entry is the same as the format provided in OpenFirmware. You can view the device name in OpenFirmware (see previous section) and copy that information into the command line issued with /sbin/nvsetenv. For example:

/sbin/nvsetenv boot-device=/pci@400000000111/pci@2,2/scsi@1/sd@1,0:1,\ppc\bootinfo.txt /pci@
400000000110/pci@2,4/scsi@1/sd@8,0


Note: This is all one line, with the only space coming after txt.

In AIX, you can do the same using the bootlist command. Please see the nvsetenv and bootlist man pages for additional instruction on each tool.


Summary

Never physically swap disks in an attempt to reorder the boot devices. Instead, use either the console interface to the OpenFirmware or the utilities provided in Linux or AIX to alter the boot-device. This protects your data and makes system maintenance easier.

Resources

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into Linux on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Linux, AIX and UNIX
ArticleID=86933
ArticleTitle=Dual boot Linux and AIX
publish-date=04252005