Quantcast
Channel: AIX for System Administrators
Viewing all articles
Browse latest Browse all 67

RedHat 6 Install on IBM Power System

$
0
0

This blog post is written by Marcel Mages-Veidt.


RedHat 6 Install on IBM Power System

It contains the following chapters:
I.   PRE-REQUIREMENTS
II.  PREPARATION
III. BOOTING
IV.  INSTALL

------------------------------------
------------------------------------

I. PRE-REQUIREMENTS

This article will show you how to setup RedHat 6 Installation on a Power system via the network using existent AIX machines. In a first approach the steps are described for an installation by hand, but with certain scripting skills they can be automated or half automated as well. This description is as is and as I did it. I do not pretend this is best practise and I am always open for imporvements and corrections.

1.Environment

This showcase was done in a setup of two 8204-E8A ( also known as Power 550 Express ) machines with 4 cores/32GB RAM running microcode level EL350_149 managed by an HMC 7042-CR4 with HMC level V7R7.9.0 installed. The initial plan of installing RedHat 7 was destroyed by the support matrix. http://www-01.ibm.com/support/knowledgecenter/#!/linuxonibm/liaam/liaamdistrospower7.htm. So RedHat 6.6 should be worth to try.

2. Requirements

This article is focused on installing Red Hat on an classical AIX environment. So in this case why not using the existent NIM server with a little bit diskspace available to set up our Linux install environment. We need around 4GB disk space for the installation source for RedHat 6 and about 150MB for the IBM RHEL6 repository. The NIM runs on AIX 7.1 TL3 SP4.

# oslevel -s
7100-03-04-1441


------------------------------------
------------------------------------

II. PREPARATION

1.Create the LPAR

Use your common way to create an LPAR in your environment. To keep everything easy I recommend to let it have a minimum of 1 single vscsi DISK ( 25GB is plenty enough ) served by two VIO servers, one VETH adapter, 1 VP and 2 GB RAM.

------------------------------------

2.Download the RedHat 6.6 installation DVD

If you are not an RedHat customer, register at RedHat for a 60 days evaluation on https://idp.redhat.com/idp/. This link directs you to the download of the Installation DVD: https://access.redhat.com/downloads/content/74/ver=/rhel---6/6.6/ppc64/product-downloads. Even for the network installation on IBM Power you need the Installation DVD only.

------------------------------------

3.Extract the DVD iso to the NIM
Choose the directories how they fit best into your environment, I did it this way finally:

# mkdir -p /export/linux/install/rhel66/dvd
# loopmount -i /export/linux/iso/rhel-server-6.6-ppc64-dvd.iso -o "-V cdrfs -o ro" -m /mnt
# cp -r /mnt/* /export/linux/install/rhel66/dvd/
# umount /mnt


Still enough space? Yes.

# df -g /export/linux
Filesystem         GB blocks   Free   %Used   Iused %Iused Mounted on
/dev/nim_data_lv    505.88     41.52   92%   353561     4% /export/nim


Ok you got me, I only created a soft link not to create a separate filesystem in may case but I wouild really recommend this if you are using your NIM filesystem(s) in production. In my case it is just a test NIM with not so much storage allocated so I just used the /export/nim filesystem to avoid having spare capacity in a separate filesystem.

------------------------------------

4.Share the DVD via NFSv3

Sharing NFS on an running NIM master leads to create the share for NFSv3 as I do not start now testing if NIM works in an NFSv3/4 parallel setup. NFS v3 is the default setting for an AIX NFS share. I just used the -P option for a public mount and -t ro to be readonly. In an encapsulated test environment, this is enough. In an open intranet I strongly recommend to add the per hosts access list, because if you use this layout it will develop over the time and more and more things might be available to read which maybe should not.

# mknfsexp -d /export/linux/install -P -t ro
# showmount -e
# showmount -e
export list for nimt1:
[...]
/export/linux/install     (everyone)


Instead you can consider to set up an http share for sure. As I want to use an existong environment and as I do not want to add complexicity to my NIM master, I went for NFS. Using the NIM master is not necessary, you can do the same preparation on each other AIX machine where you can install easily your httpd service.

------------------------------------

5.Set up the boot protocol server

yaboot is your bootloader of choice for Linux on Power so you have to set up your system to provide it to your LPAR. From the yaboot manpage:"Yaboot is an OpenFirmware ELF executable that bootstraps the Linux kernel." The /etc/bootptab is used by the NIM server as well to setup Client LPAR installations or recoveries, finally for loading the spot from /tftpboot. We have to configure it manually to load the yaboot bootloader from NIM's populated location.

# cat /etc/bootptab
[...]
rhel66:bf=/export/linux/install/rhel66/dvd/ppc/chrp/yaboot:ip=10.10.10.44:ht=ethernet:sa=10.10.10.36:gw=10.10.10.1:sm=255.255.255.0:


------------------------------------

6.Provide the yaboot.conf file

Best is to copy the default yaboot.con file from the dvd directory to /etc and edit it.

# cp /export/linux/install/rhel66/dvd/ppc/ppc64/yaboot.conf /etc/

We edit the the /etc/yaboot.conf file to make it fit our needs:

# cat /etc/yaboot.conf
init-message = "\nWelcome to the 64-bit Red Hat Enterprise Linux 6.6 installer!\nHit <TAB> for boot options.\n\n"
timeout=50
default=linux

image=rhel66/vmlinuz
        label=linux
        initrd=rhel66/initrd.img
        read-only


After the timeout of 50 tenth of a second yaboot will boot the default "linux" entry. The image is the place of the linux kernel "vmlinuz" relative to the tftpboot directory on the NIM server as well as the initial ramdisk image "initrd.img". So quickly do

# mkdir /tftpboot/rhel66
# cp /export/linux/install/rhel66/dvd/ppc/ppc64/vmlinuz /export/linux/install/rhel66/dvd/ppc/ppc64/initrd.img /tftpboot/rhel66


A you can see I created the /tftpboot/rhel66 directory to separate the linux stuff from NIM's AIX related tftp files.

------------------------------------

7.Set up tftpd

Now we know what we need to make available via tftpd on the NIM:

- /export/linux/install/rhel66/dvd/ppc/chrp/yaboot # The yaboot firmware executable
- /etc/yaboot.conf # The yaboot config file
- /tftpboot/rhel66/vmlinuz|initrd.img # The Linux kernel and the initial RAM disk.

So we have to configure the /etc/tftpaccess.ctl on the NIM as follows:

# cat /etc/tftpaccess.ctl
# NIM access for network boot
allow:/tftpboot
allow:/tftpboot/rhel66
allow:/export/nim/linux/install/rhel66
allow:/etc/yaboot.conf


...maybe we need some mor stuff inside the /export/.../rhel66 directory in the future for tftp...

------------------------------------
------------------------------------

III. BOOTING

1.Bootp boot

Let's get ready to rumble. Open the console of the SMS-booted LPAR. In the SMS menu, configure your network interface to boot with settings given in the /etc/bootptab of the NIM server.

PowerPC Firmware
 Version EL350_149
 SMS 1.7 (c) Copyright IBM Corp. 2000,2008 All rights reserved.
-------------------------------------------------------------------------------
 IP Parameters
Interpartition Logical LAN: U8204.E8A.0680E82-V10-C11-T1
 1.   Client IP Address                    [10.10.10.44]
 2.   Server IP Address                    [10.10.10.36]
 3.   Gateway IP Address                   [10.10.10.1]
 4.   Subnet Mask                          [255.255.255.0]


After sucessfully checking the ping, go on booting via "BOOTP" and "Normal Mode Boot" via this interface.
You could speed this manual configuration up of course with an "easy" lpar_netboot command from the HMC ( please don't let me explain all flags right now :P ):

lpar_netboot -v -f -D -i -t ent -s auto -T off -d auto -S 10.10.10.36 -C 10.10.10.44 -G 10.10.10.1 -K 255.255.255.0 rhel66_LPAR rhel66_profile rhel66_managedsys

So after yaboot has been loaded from the NIM it tries to download the yaboot configuration file via tftp and the way it is doing that looks some kind of hardcoded. If the filename yaboot tries to download does not exist, yaboot tries to download the next file in the list. So if you have to wait for the last fallback the while procedure takes a little time.

 1.  /etc/01-76-b3-7c-e4-6f-0b # filename is MAC address of downloading interface in this format with dashes only
 2.  /etc/0a0a0a2C # filename is the IP adress of the downloading interface in hexadecimal format
 3.  /etc/0a0a0a2 # filename is the IP adress of the downloading interface in hexadecimal format reduced by the last byte of the IP address
 4.  /etc/0a0a0a # filename is the IP adress of the downloading interface in hexa format reduced by the last two bytes of the IP address
 5.  /etc/0a0a0
 6.  /etc/0a0a
 7.  /etc/0a0
 8.  /etc/0a
 9.  /etc/0
 10. /etc/yaboot.conf # the final fallback

In my environment this took 2 minutes and 20 seconds!

------------------------------------

2.Yaboot executable is loaded

TFTP BOOT ---------------------------------------------------
Server IP.....................10.10.10.36
Client IP.....................10.10.10.50
Gateway IP....................10.10.10.1
Subnet Mask...................255.255.255.0
( 1  ) Filename................./export/linux/install/rhel66/dvd/ppc/chrp/yaboot
TFTP Retries..................5
Block Size....................512
FINAL PACKET COUNT = 516
FINAL FILE SIZE = 263760  BYTES


------------------------------------

3.Loading yaboot config file

See here the first attempt with the MAC-address:

Try to netboot


claim of 0x2000000 at 0xe000000 returned 0xe000000

TFTP BOOT ---------------------------------------------------
Server IP.....................10.10.10.36
Client IP.....................10.10.10.50
Gateway IP....................10.10.10.1
Subnet Mask...................255.255.255.0
( 1  ) Filename.................\etc\01-76-b3-78-80-26-0b
TFTP Retries..................5
Block Size....................512
1
2
3

        !EA017021 !

Error, can't read config file


Go on with the IP-addess in hexadecimal:

claim of 0x2000000 at 0xe000000 returned 0xe000000

TFTP BOOT ---------------------------------------------------
Server IP.....................10.239.44.36
Client IP.....................10.239.44.50
Gateway IP....................10.239.44.1
Subnet Mask...................255.255.255.0
( 1  ) Filename.................\etc\0a0a0a2c
TFTP Retries..................5
Block Size....................512
1
2
3
        !EA017021 !

Finally the config file is found at the last fallback

TFTP BOOT ---------------------------------------------------
Server IP.....................10.239.44.36
Client IP.....................10.239.44.50
Gateway IP....................10.239.44.1
Subnet Mask...................255.255.255.0
( 1  ) Filename.................\etc\yaboot.conf
TFTP Retries..................5
Block Size....................512
FINAL PACKET COUNT = 1
FINAL FILE SIZE = 232  BYTES
Config file read, 232 bytes



Welcome to the 64-bit Red Hat Enterprise Linux 6.6 installer!
Hit <TAB> for boot options.


Welcome to yaboot version 1.3.14 (Red Hat 1.3.14-43.el6)
Enter "help" to get some basic usage information
boot: linux
Please wait, loading kernel...


------------------------------------

4.Loading the kernel and ramdisk
Loading the kernel via tftp:

claim of 0x2000000 at 0xe000000 returned 0xe000000

TFTP BOOT ---------------------------------------------------
Server IP.....................10.239.44.36
Client IP.....................10.239.44.50
Gateway IP....................10.239.44.1
Subnet Mask...................255.255.255.0
( 1  ) Filename.................rhel66\vmlinuz
TFTP Retries..................5
Block Size....................512
FINAL PACKET COUNT = 33243
FINAL FILE SIZE = 17020288  BYTES
   Elf64 kernel loaded...


Loading the initial ramdisk via tftp:

Loading ramdisk...


claim of 0x2000000 at 0xe000000 returned 0xe000000

TFTP BOOT ---------------------------------------------------
Server IP.....................10.239.44.36
Client IP.....................10.239.44.50
Gateway IP....................10.239.44.1
Subnet Mask...................255.255.255.0
( 1  ) Filename.................rhel66\initrd.img
TFTP Retries..................5
Block Size....................512
FINAL PACKET COUNT = 55080
FINAL FILE SIZE = 28200703  BYTES
ramdisk loaded at 03880000, size: 27539 Kbytes


Congratulations, the installation routine is starting:

Preparing to boot Linux version 2.6.32-504.el6.ppc64 (mockbuild@ppc-019.build.eng.bos.redhat.com) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC) ) #1 SMP Tue Sep 16 01:52:45 EDT 2014
------------------------------------
------------------------------------

IV. INSTALLATION

Here we are:

Welcome to Red Hat Enterprise Linux for ppc64

                    +--------¦ Choose a Language +--------+
                    ¦                                     ¦
                    ¦ What language would you like to use ¦
                    ¦ during the installation process?    ¦
                    ¦                                     ¦
                    ¦      Catalan                ?       ¦
                    ¦      Chinese(Simplified)    ¦       ¦
                    ¦      Chinese(Traditional)   ?       ¦
                    ¦      Croatian               ¦       ¦
                    ¦      Czech                  ¦       ¦
                    ¦      Danish                 ¦       ¦
                    ¦      Dutch                  ¦       ¦
                    ¦      English                ?       ¦
                    ¦                                     ¦
                    ¦               +----+                ¦
                    ¦               ¦ OK ¦                ¦
                    ¦               +----+                ¦
                    ¦                                     ¦
                    ¦                                     ¦
                    +-------------------------------------+

  <Tab>/<Alt-Tab> between elements  | <Space> selects | <F12> next screen


After for sure choosing English for the installation language we have to choose the installation method

Welcome to Red Hat Enterprise Linux for ppc64



                        +---¦ Installation Method +---+
                        ¦                             ¦
                        ¦ What type of media contains ¦
                        ¦ the installation image?     ¦
                        ¦                             ¦
                        ¦        Local CD/DVD         ¦
                        ¦        Hard drive           ¦
                        ¦        NFS directory        ¦
                        ¦        URL                  ¦
                        ¦                             ¦
                        ¦   +----+       +------+     ¦
                        ¦   ¦ OK ¦       ¦ Back ¦     ¦
                        ¦   +----+       +------+     ¦
                        ¦                             ¦
                        ¦                             ¦
                        +-----------------------------+



  <Tab>/<Alt-Tab> between elements  | <Space> selects | <F12> next screen

You remember, we shared out installation source via NFS, so let's select "NFS directory" and go for a manual IPv4 config.

                 +------------¦ Configure TCP/IP +------------+
                 ¦                                            ¦
                 ¦ [*] Enable IPv4 support                    ¦
                 ¦        ( ) Dynamic IP configuration (DHCP) ¦
                 ¦        (*) Manual configuration            ¦
                 ¦                                            ¦
                 ¦ [ ] Enable IPv6 support                    ¦
                 ¦        (*) Automatic                       ¦
                 ¦        ( ) Automatic, DHCP only            ¦
                 ¦        ( ) Manual configuration            ¦
                 ¦                                            ¦
                 ¦        +----+              +------+        ¦
                 ¦        ¦ OK ¦              ¦ Back ¦        ¦
                 ¦        +----+              +------+        ¦
                 ¦                                            ¦
                 ¦                                            ¦
                 +--------------------------------------------+

       +----------------¦ Manual TCP/IP Configuration +-----------------+
       ¦                                                                ¦
       ¦ Enter the IPv4 and/or the IPv6 address and prefix (address /   ¦
       ¦ prefix).  For IPv4, the dotted-quad netmask or the CIDR-style  ¦
       ¦ prefix are acceptable. The gateway and name server fields must ¦
       ¦ be valid IPv4 or IPv6 addresses.                               ¦
       ¦                                                                ¦
       ¦ IPv4 address: 10.10.10.50_____ / 255.255.255.0___              ¦
       ¦ Gateway:      10.10.10.1_______________________________        ¦
       ¦ Name Server:  20.20.20.33______________________________        ¦
       ¦                                                                ¦
       ¦             +----+                        +------+             ¦
       ¦             ¦ OK ¦                        ¦ Back ¦             ¦
       ¦             +----+                        +------+             ¦
       ¦                                                                ¦
       ¦                                                                ¦
       +----------------------------------------------------------------+


The next part is to configure the NFS share. Here ist is important to make sure that we want to talk NFSv3 with our NIM server otherwise the installation will fail with a not reachable mount after a long long time (which we usually do not have) .So better add the option "vers=3".Instead of the NFS server IP address you can choose the FQDN as well as we configured the DNS server before.

  +------------------------------¦ NFS Setup +------------------------------+
  ¦                                                                         ¦
  ¦ Please enter the server and NFSv3 path to your Red Hat Enterprise Linux ¦
  ¦ installation image and optionally additional NFS mount options.         ¦
  ¦                                                                         ¦
  ¦      NFS server name:                    10.10.10.36____________       ¦
  ¦      Red Hat Enterprise Linux directory: inux/install/rhel66/dvd_       ¦
  ¦      NFS mount options (optional):       vers=3__________________       ¦
  ¦                                                                         ¦
  ¦              +----+                             +------+                ¦
  ¦              ¦ OK ¦                             ¦ Back ¦                ¦
  ¦              +----+                             +------+                ¦
  ¦                                                                         ¦
  ¦                                                                         ¦
  +-------------------------------------------------------------------------+

Now it is time for a coffee until the installation repository has been loaded...

Who needs VNC? We use the text mode.

              +----------¦ Would you like to use VNC? +----------+
              ¦                                                  ¦
              ¦ Text mode provides a limited set of installation ¦
              ¦ options.  It does not allow you to specify your  ¦
              ¦ own partitioning layout or package selections.   ¦
              ¦ Would you like to use VNC mode instead?          ¦
              ¦                                                  ¦
              ¦     +-----------+         +---------------+      ¦
              ¦     ¦ Start VNC ¦         ¦ Use text mode ¦      ¦
              ¦     +-----------+         +---------------+      ¦
              ¦                                                  ¦
              ¦                                                  ¦
              +--------------------------------------------------+

               +---------¦ Red Hat Enterprise Linux +----------+
               ¦                                               ¦
               ¦ Welcome to Red Hat Enterprise Linux!          ¦
               ¦                                               ¦
               ¦                                               ¦
               ¦                    +----+                     ¦
               ¦                    ¦ OK ¦                     ¦
               ¦                    +----+                     ¦
               ¦                                               ¦
               ¦                                               ¦
               +-----------------------------------------------+


Ups, got me again that was not my first installation smile I have to destroy what was left first of all. With having only one disk, choose "Re-initialize all" safely.

 +--------------------------------¦ Warning +---------------------------------+
 ¦                                                                            ¦
 ¦         Error processing drive:                                 ?          ¦
 ¦                                                                 ?          ¦
 ¦         mpatha                                                  ¦          ¦
 ¦         51919MB                                                 ¦          ¦
 ¦         WWID 36:00:00:97:00:00:29:26:01:31:25:33:03:14:53:83:0  ¦          ¦
 ¦                                                                 ¦          ¦
 ¦         This device may need to be reinitialized.               ¦          ¦
 ¦                                                                 ¦          ¦
 ¦         REINITIALIZING WILL CAUSE ALL DATA TO BE LOST!          ¦          ¦
 ¦                                                                 ¦          ¦
 ¦         This action may also be applied to all other disks      ¦          ¦
 ¦         needing reinitialization.                               ?          ¦
 ¦                                                                            ¦
 ¦  +--------+   +------------+   +---------------+   +-------------------+   ¦
 ¦  ¦ Ignore ¦   ¦ Ignore all ¦   ¦ Re-initialize ¦   ¦ Re-initialize all ¦   ¦
 ¦  +--------+   +------------+   +---------------+   +-------------------+   ¦
 ¦                                                                            ¦
 ¦                                                                            ¦
 +----------------------------------------------------------------------------+

Timezone

                    +-------¦ Time Zone Selection +-------+
                    ¦                                     ¦
                    ¦ In which time zone are you located? ¦
                    ¦                                     ¦
                    ¦ [*] System clock uses UTC           ¦
                    ¦                                     ¦
                    ¦  Europe/Athens                   ?  ¦
                    ¦  Europe/Belgrade                 ¦  ¦
                    ¦  Europe/Berlin                   ?  ¦
                    ¦  Europe/Bratislava               ¦  ¦
                    ¦  Europe/Brussels                 ?  ¦
                    ¦                                     ¦
                    ¦      +----+          +------+       ¦
                    ¦      ¦ OK ¦          ¦ Back ¦       ¦
                    ¦      +----+          +------+       ¦
                    ¦                                     ¦
                    ¦                                     ¦
                    +-------------------------------------+


After providing the root password, we use the entire drive.

       +---------------------¦ Partitioning Type +---------------------+
       ¦                                                               ¦
       ¦ Installation requires partitioning of your hard drive.  The   ¦
       ¦ default layout is suitable for most users.  Select what space ¦
       ¦ to use and which drives to use as the install target.         ¦
       ¦                                                               ¦
       ¦                 Use entire drive                              ¦
       ¦                 Replace existing Linux system                 ¦
       ¦                 Use free space                                ¦
       ¦                                                               ¦
       ¦   Which drive(s) do you want to use for this installation?    ¦
       ¦             [*] mpatha    51919 MB (AIX VDASD) ?              ¦
       ¦                                                ?              ¦
       ¦                                                               ¦
       ¦                      +----+   +------+                        ¦
       ¦                      ¦ OK ¦   ¦ Back ¦                        ¦
       ¦                      +----+   +------+                        ¦
       ¦                                                               ¦
       ¦                                                               ¦
       +---------------------------------------------------------------+


The configuration is being brought to the disk...

           +---------------------¦ Formatting +---------------------+
           ¦                                                        ¦
           ¦ Creating physical volume (LVM) on /dev/mapper/mpathap3 ¦
           ¦                                                        ¦
           ¦                                                        ¦
           +--------------------------------------------------------+


...and the installation is preparing

     +---------------------¦ Installation Progress +---------------------+
     ¦                                                                   ¦
     ¦ Retrieving installation information for Red Hat Enterprise Linux. ¦
     ¦                                                                   ¦
     ¦                                                                   ¦
     +-------------------------------------------------------------------+


and after a while:

     +---------------------------¦ Complete +----------------------------+
     ¦                                                                   ¦
     ¦ Congratulations, your Red Hat Enterprise Linux installation is    ¦
     ¦ complete.                                                         ¦
     ¦                                                                   ¦
     ¦ Please reboot to use the installed system.  Note that updates may ¦
     ¦ be available to ensure the proper functioning of your system and  ¦
     ¦ installation of these updates is recommended after the reboot.    ¦
     ¦                                                                   ¦
     ¦                            +--------+                             ¦
     ¦                            ¦ Reboot ¦                             ¦
     ¦                            +--------+                             ¦
     ¦                                                                   ¦
     ¦                                                                   ¦
     +-------------------------------------------------------------------+


Congratulations, we are done.

Unfortunately the bootlist consists only of the LAN interface so it will bootp the NIM server again. We have to interrupt the installation and boot from the given (V)SCSI harddisk.

 PowerPC Firmware
 Version EL350_149
 SMS 1.7 (c) Copyright IBM Corp. 2000,2008 All rights reserved.
-------------------------------------------------------------------------------
 Select Device
 Device  Current  Device
 Number  Position  Name
 1.        -      SCSI 50 GB Harddisk
        ( loc=U8204.E8A.0680E82-V10-C2-T1-L8100000000000000 )

[...]

Red Hat Enterprise Linux Server release 6.6 (Santiago)
Kernel 2.6.32-504.el6.ppc64 on an ppc64

rhel66 login: root
Password:
[root@rhel66 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.6 (Santiago)
[root@rhel66 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_rhel66-lv_root
                       42G  866M   39G   3% /
tmpfs                1003M     0 1003M   0% /dev/shm
/dev/mapper/mpathap2  477M   49M  403M  11% /boot
/dev/mapper/vg_rhel66-lv_home
                      4.0G  8.3M  3.8G   1% /home
[root@rhel66 ~]#


Have fun...

Viewing all articles
Browse latest Browse all 67

Trending Articles