General overview of the LPAR system
The logical partitioning functionality of the iSeries platform enables the virtualization of the machine's resources (memory, disk, processors, and so on), thus providing a way to run multiple independent instances of OS/400® operating systems, or other operating systems, concurrently on the same hardware.
Figure 1. Logical partitioning of an iSeries
There are two types of partitions in this environment:
- One and only one primary partition. This partition will be in charge of managing the other partitions. To run Linux™ in the iSeries environment, the primary partition has to be running OS/400 V5R1 or higher. Linux is not supported as the sole operating system on the machine.
- Several secondary partitions. Secondary partitions represent all the remaining partitions on the system. They can run other instances of OS/400, possibly with different levels, or even radically different operating systems.
A type of secondary partition, guest partitions, enable guest operating systems (such as Linux) to run natively on the iSeries hardware. Guest partitions are themselves divided in two categories:
- Hosted partitions for which all I/O is managed by an OS/400 partition
- Non-hosted partitions for which all I/O is native and managed by the guest OS
Since the V5R1 release of OS/400 and improvements that have been made to the new processors, it is now possible to pool processor resources and allocate fractional amounts of a CPU to a logical partition, with a minimum of 10 percent of a CPU and increments of 1 percent. This opens up some very interesting possibilities for the primary partition or some secondary partitions, as the tasks they are accomplishing may not require the use of a full CPU.
Communication is also greatly enhanced in this environment as OS/400 provides 16 1-GB Virtual Ethernet channels between partitions without requiring additional hardware resources.
The primary partition that will be running OS/400 requires at least 256 MB of main memory, and the Linux guest partition requires at least 64 MB of main memory (128 MB or greater is recommended).
A maximum of 31 guest partitions can be defined.
In case the machine doesn't support the shared processor capabilities, the QPRCMLTTSK system value should be set to 0. You can verify this using the following command:
Create the guest partition
The first step to take is creating the guest partition that will host Linux.
- Launch System Service Tools by entering the
- Choose 5: Work with system partitions.
- On the next screen, choose 3: Work with partition configuration.
- On the next screen, choose 5: Create a new partition.
- On the next screen, select 2: Guest as the type of partition to create.
- On the upcoming screen (see Figure 2), specify the following:
- The name of the partition (for example, LNXCTCC6)
- A numeric identifier for the partition (3, in this example; a value of 0 always refers to the primary partition)
- The number of processors to allocate to the partition. To use shared processors, press F10, and pick 1=Yes to use the shared processor pool. This will enable you to enter fractional amounts of CPU.
- The size of the partition main storage. (Remember that 64 MB is the minimum for a Linux partition).
Figure 2. Creating a new partition
- Specify a Virtual LAN port for the partition. Figure 3 shows that LAN 0 is activated -- Virtual Ethernet Identifier 0 has a 1 beneath it.
Figure 3. Configuring Virtual Ethernet
- On the Work with Partition Configuration panel, press the F23 key to get more options, and then type 13 (Change Host) next to the Linux partition.
- On the next screen, enter 1 next to the partition that will host the Linux partition resources.
Figure 4. Selection of Host Partition
- Return to the Work with Partition Configuration screen and press the F10 key (Work with Virtual LAN). Ensure that the host partition is configured to use the Virtual LAN.
Create a Network Server Description
The Network Server Description gives the iSeries machine a way to start and stop a guest partition and its associated Virtual LAN. It can be paralleled with the boot loaders found on xSeries® machines to launch a Linux partition.
- Launch the Create Network Server Description assistant using the
CRTNWSDcommand (see Figure 5).
- Provide the following information:
- Network server description (for example, LNXCTCC6)
- Resource name (*NONE means that you are not referencing physical resources)
- Network server type (*GUEST)
- Partition (name of the partition where Linux will be installed; LNXCTCC6 in this example)
- Code Page (437; the default (*LNGVER) is not supported)
Figure 5. Creating a Network Server Description
- Configure the IPL parameters for the Network Server Description (see Figure 6):
- Port number: *NONE
- Synchronize date and time: *TYPE
- IPL Source: Define where the kernel is located, as follows:
- *NWSSTG sets the boot source on a virtual disk defined in the NWSD. It must have a partition formatted as a primary partition of type 0x41 (PReP Boot) bootable. The optimal size should be 8 MB.
- *STMF looks for the boot source in a file located in the Integrated File System (IFS). This includes a CD-ROM (used for a CD installation) mounted under the QOPT directory in the IFS.
- A or B means that the Linux system boots from slot A or B. To do this, the /proc file system is used with a command as follows:
dd if=/usr/src/linux/vmlinux of=/proc/iSeries/mf/A/vmlinux.
- *PANEL means that the IPL source is specified in the SST Partition Configuration panel.
- IPL stream file: Type in the stream file if the IPL Source is set to *STMF; *NONE otherwise. For example, for SUSE type:
- IPL parameters: Loader parameters
Figure 6. Creating a Network Server Description
Create a Network Server Storage Space
Network Server Storage Spaces are stream files from the IFS that appear as local hard drives in the network server environment.
- Launch the Create Network Server Storage Space assistant using the
CRTNWSSTGcommand (see Figure 7).
- Provide the following information:
- Network server storage space: Give a name to the space (for example, USERDATA).
- Size: No more than 64 GB per storage space
- From storage space: *NONE
- Format: *OPEN, because it allows the operating system to format the drive
- Auxiliary storage pool ID: 1
- Text 'description' : *BLANK
Figure 7. Creating Network Server Storage Space
Link a Network Storage Space to a Network Server
In order for the Network Server to actually be able to access the Network Storage Space, they must be linked together.
- Launch the Network Server Storage Link creation assistant using the
ADDNWSSTGLcommand (see Figure 8).
- Provide the following information
- Network server storage space: The name of the space (USERDATA)
- Network server description: The name of the NWSD (
- Dynamic storage link: *YES
- Network server type: *NWSD
- Drive sequence number: *CALC
- Access: *UPDATE
Figure 8. Adding a Network Server Storage link
Configuring Network Address Translation
In order to use the graphical installer of SUSE, there must be a direct network connection to the partition that will host the system. However, because the system is set up with only one physical adapter, you need to use a technique known as Static Network Address Translation to make the Linux partition appear as if it were plugged directly on the public network. To do that, configure a new IP address for the host and have it forward all traffic to and from this address to the private address of your Linux partition that is hooked on the Virtual LAN 0.
First, let's configure the public address of the Linux partition.
- Launch the TCP/IP Configuration utility using the command
- Select 1. Work With TCP/IP Interfaces.
- Use option 1 for Add, and configure the IP Address (the public one), Netmask, and Line Description (name of the physical network interface). (See Figure 9.)
Figure 9. Adding a TCP/IP Interface
Now, use the iSeries Navigator to edit the NAT rules.
- Launch the iSeries Navigator, and connect to the iSeries machine.
- Navigate to Network -> IP Policies -> Packet Rules.
- Right click, and select Rules Editor.
Figure 10. Launching the Packet Rules Editor
- When prompted, choose to Create a new packet rules file.
- In the editor, right click, and choose Insert -> Address.
Figure 11. Inserting a Network Address
- Enter a name for the private IP address of the Linux partition and associate it with the IP address.
Figure 12. New address definition
- Add another address for the public address of the Linux partition.
- Now, add the NAT rule. Right click, and select Insert -> Map.
Figure 13. Inserting a new address map
- Map your private address name to your public address name, and select the line name of your physical network adapter.
Figure 14. Mapping the IP addresses
The file should look like this:
Listing 1. Packet rules file
ADDRESS LNXCTCC6_VLAN0 IP = 192.168.100.4 ADDRESS LNXCTCC6_LGE_FR IP = 184.108.40.206 MAP LNXCTCC6_VLAN0 TO LNXCTCC6_LGE_FR LINE = ETH01 JRN = OFF
- Finally, from the File menu, select Verify, then Save, and then Activate.
Your Linux partition is now directly accessible at the public IP address you have defined for it. Packets will be automatically forwarded to the logical partition through the virtual LAN.
Launching the installer
This section shows how to launch the installer from SUSE Linux Enterprise Server V9 and configure the installation process in graphical mode.
First, change the parameters of the Network Server Description so that it boots from the CD-ROM containing the SUSE distribution installer.
- Launch the Change Network Server Description assistant by entering the
CHGNWSDcommand (see Figure 15).
- Change the IPL source to *STMF.
- For the stream file, enter the full path to the SUSE PPC kernel:
- To use the graphical installation mode of SUSE, you need to pass some boot parameters to this kernel so that it activates VNC support. Set the IPL parameters to 'vnc=1 vncpassword=suseinst'.
Figure 15. Changing the IPL Source
- Vary on (activate) your Network Server Description that will host the Linux installation. The distribution's installer will be launched. To do so, you can use the
WRKCFGSTS *NWScommand, and then use the options 1 and 2 to Vary on/Vary off the partition (see Figure 16).
Figure 16. Varying on the partition
- You now need to access the virtual console attached to your Linux partition. To do this, connect a simple telnet client to port 2301 of the iSeries machine. It will bring up a window with the list of all available partitions (see Figure 17). I recommend that you use a good telnet client, such as PuTTY (see Resources for a link), because the default Windows telnet client may not handle some functionality correctly.
- Enter the number of the partition you want to connect to, and press the Enter key. (Note that you will be prompted for your Service Tools UserID and password at this point.)
Figure 17. Connecting to the virtual console
When the partition becomes active, you will be presented with your favorite distribution's installer.
Installing SUSE Linux Enterprise Server V9
When the installer starts, it will probe the hardware available to the partition. It will detect that you have configured networking support and will prompt you for configuration parameters. Remember that the Linux partition lives on a virtual LAN that you configured earlier. Therefore, you won't be using Dynamic Host Configuration Protocol (DHCP) to setup the network card.
- Enter the IP address of the Linux partition (chosen in the VLAN range, that is, 192.168.100.4).
- For the Gateway IP address, enter the IP address of the host partition on the VLAN (192.168.100.1).
- Configure the IP address of your name server, if your network has one (skipped in this example).
The installer will move on and load the necessary files to provide the graphical interface.
- When it is done loading all the necessary information, it will come up with a screen asking you to connect to the Linux partition using a VNC client.
- Launch your VNC client. But instead of providing the private IP address (192.168.100.4), enter the public IP address that you declared at the time of the NAT configuration (220.127.116.11). Don't forget to add :1 as the display number, as requested.
Figure 18. Setting up VNC
VNC will connect to the SUSE installer and will prompt you for the password you entered in the IPL Parameters (suseinst).
Congratulations! You are now connected to YaST, the SUSE installer. Read the license agreement and continue.
YaST will prompt you for some configuration information so that it installs SLES V9 to your liking.
- Configure your installation language.
Figure 19. Language selection
- Check out the detected hardware.
Figure 20. Detecting hardware
The install process will analyze your system and suggest installation settings, including a suggested partitioning scheme. Normally, the suggestion includes a swap partition of approximately twice the size of your installed memory and the remainder of free space mounted as / (the root of your new filesystem).
You can safely explore at this point because your choices will not be written to disk until you confirm your intentions in the last installation dialog.
Figure 21. Partitioning
- Select the packages you wish to install.
Figure 22. Package selection
- The Filter dropdown at the top left allows you to view more granular package groups or to search for individual packages. Use it now to look for "Shells" under the System group, and verify that you are installing the pdksh package, which is required for several of the IBM middleware packages.
- Select your boot-loading configuration.
Figure 23. BootLoader setup
Selecting the boot method: One advantage of starting the IPL from a file in the IFS is that several NWSDs can use the same kernel. Systems that only use native I/O can be booted without NWS and, therefore, are less dependent on OS/400. If you use a different kernel, be sure to install the needed modules. This subject is covered in detail in the IBM Redbook Linux on the IBM eServer iSeries Server: An Implementation Guide (developerWorks, 2002).
- If you have a PReP boot partition, use it.
- Select Slot B if you do not have any virtual disks.
- If you want all partitions to use the same kernel, select Generate a Boot File for *STMF Booting, and specify the path to vmlinux.
Figure 24. Boot installation
- When YaST has collected all the information it needs, it will tell you it's ready to install SUSE on the system, and the installation will proceed.
At the end of the Basic Installation process, YaST will perform some configuration tasks to prepare the system for its first boot.
Finally, it will reboot the partition. You will therefore have to go back to the terminal to check what is going on. Eventually, it will come up with a message asking you to reconnect using VNC, just like you did before in step 5. You will also have to provide some more information to finish the setup of the system.
- Set the administrator's password.
Figure 25. Setting the password for root
- You can define the password encryption algorithm.
Figure 26. Password encryption
- Setup your network configuration.
Figure 27. Network configuration
Figure 28. Network card configuration
Figure 29. Network address setup
- Define how you will go out on the Internet by providing proxy settings.
Figure 30. Proxy configuration
- You can decide to activate Remote Administration so that you can take over your machine's display from a remote location using VNC.
Figure 31. Remote administration
- Once this has been done, YaST will offer to test the connection to the Internet to make sure your setup is correct.
Figure 32. Internet connection test
- You will be able to provide configuration for default services, such as Certificate Authority Management, LDAP, and so on.
Figure 33. Service configuration
- Select how the users of the system will be authenticated (using local files or network wide directories).
Figure 34. User authentication method
- I suggest that you create a user account at this time. (Use the root account only for system administration tasks.) Both user names and passwords are case sensitive. It is common in UNIX® and Linux systems to use lowercase user names. Use the Details... button to view or change details such as user number, home directory, and so on. The Password settings button allows you to control password expiration rules, and you can use the Additional users/groups button to add or edit additional users and groups.
Figure 35. Local users
- Configure the devices attached to you system.
Figure 36. Device configuration
That's it! The installation is over!
Vary off the partition. Change the IPL source to B, and clear the IPL parameters. When you vary on the partition again, you will have a SUSE Enterprise Linux Server V9 ready to go!
Log in as root, using the password you specified in step 13. For most of your work, though, you should not log in as root. Read "Basic tasks for new Linux developers" (developerWorks, 2003) for instructions on how to temporarily switch to a different user.
In this paper, you have seen how to prepare the iSeries environment to receive SUSE Linux Enterprise Server V9 as a guest operating system. You've also learned the major steps in the Linux installation and configuration process, including setting up networking.
- The PuTTY homepage will let you download the free PuTTY telnet client.
- Linux on the IBM eServer iSeries Server: An Implementation Guide goes into more detail on installing Linux on iSeries machines.
- For more information on SUSE Linux, go to the SUSE Web site.
- The Real VNC home page goes into more detail on Virtual Network Computing.
- For help in doing tasks in Linux, review "Basic tasks for new Linux developers" (developerWorks, 2003).
- To learn how to use the vi editor to edit in Linux, take the tutorial vi intro -- the cheat sheet method (developerWorks, 2000).
- To develop your proficiency in using the Emacs editor to edit in Linux, take the Living in Emacs tutorial (developerWorks, 2002).
- Find more resources for Linux developers in the developerWorks Linux zone.
- Download no-charge trial versions of IBM middleware products that run on Linux, including WebSphere® Studio Application Developer, WebSphere Application Server, DB2® Universal Database, Tivoli® Access Manager, and Tivoli Directory Server, and explore how-to articles and tech support, in the Speed-start your Linux app section of developerWorks.
- Get involved in the developerWorks community by participating in developerWorks blogs.
- Browse for books on these and other technical topics.
Dig deeper into Linux on developerWorks
Get samples, articles, product docs, and community resources to help build, deploy, and manage your cloud apps.
Keep up with the best and latest technical info to help you tackle your development challenges.
Software development in the cloud. Register today to create a project.
Evaluate IBM software and solutions, and transform challenges into opportunities.