Dual boot Linux and AIX
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:
- Select option 1, SMS.
- Select option 5, Boot Options.
- Select option 2, Select Boot Devices Sequence.
- Select option 5, Hard Drives.
- 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.
- From the Select Task menu, select M to return to the main menu.
- 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
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.
- 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.