Dual Booting Linux and AIX
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.
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 7, Select Boot Options.
2. Select option 2, Select Boot Devices. This menu allows you to set the preferred order of boot devices and prepares the Multiboot menu (option 3 from the Select Boot Options menu) for later use.
3. From the Select Device Type menu, select option 5, Hard Drive.
4. 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.
5. From the next menu, Select Task; select M to return to the main menu.
6. 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
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@
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.
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.
•Find more helpful information in the IBM pSeries Library.
• Visit the Linux on POWER ISV Resource Center.
• For Linux developers looking to get started on Power Architecture, you’ll find a collection of articles and resources at the Linux on Power Architecture Developer’s Corner.