Topic
16 replies Latest Post - ‏2013-03-28T09:57:46Z by asingh1583
asingh1583
asingh1583
22 Posts
ACCEPTED ANSWER

Pinned topic How to use kickstart file with /etc/bootptab for automated installation of Plinux

‏2013-03-14T04:48:15Z |
 Hi All,
 
I am able to automate the creation of lpar, assigning disk,assigning network and start installation with /etc/bootptab entry, but there i need to install manually, now the next option is to use the kickstart file @open firmware prompt.
The same i need to automate, means i shouldn't run this command on open firmware prompt.

0 > boot network:<serverIP>,,<clientIP>,<gatewayIP> linux ks=nfs:server.example.com/mydir/ks.cfg ksdevice=eth0 ip=<clientIP> netmask=<clientNetMask> gateway=<gatewayIP> noipv6

This command i need to run manually from OFP.
Is there any way to automate this command through script?
 
Any help would be highly appreciated.
 
Updated on 2013-03-28T09:57:46Z at 2013-03-28T09:57:46Z by asingh1583
  • anibal.carvalho
    anibal.carvalho
    15 Posts
    ACCEPTED ANSWER

    Re: How to use kickstart file with /etc/bootptab for automated installation of Plinux

    ‏2013-03-14T13:06:19Z  in response to asingh1583
     You can use the ks=nfs:server.example.com/mydir/ks.cfg parameter directly on the lpar related yaboot.conf on your netboot server.
    • JayFurmanek
      JayFurmanek
      59 Posts
      ACCEPTED ANSWER

      Re: How to use kickstart file with /etc/bootptab for automated installation of Plinux

      ‏2013-03-14T16:40:42Z  in response to anibal.carvalho
       To clarify Anibal's statment, that line can go into the append line of the kernel entry in the yaboot.conf file.
       
      Something like:
       
       image=/ppc64/RHEL6.3/vmlinuz
              label=powerlinux
              initrd=/ppc64/RHEL6.3/initrd.img
              append="ks=nfs:server.example.com/mydir/ks.cfg ksdevice=eth0 ip=1.2.3.4 netmask=255.255.255.0 gateway=1.1.1.1"
              read-only

       
      To automate the IP assignment (so you dont have to enter the "boot network:<serverIP>,,<clientIP>,<gatewayIP>" part, you'll need to use DHCP as the BOOTP daemon instead of bootpd.   This has the benefit of working on Linux boot servers in addition to your AIX one. Helpful if you ever need to migrate or replicate the environment and don't have another AIX box.
       
      A DHCP entry may look like:
       
       host myhost.example.com {
              fixed-address 1.2.3.4
              hardware ethernet aa:bb:cc:dd:ee:ff
              filename "yaboot";
      }

      This entry tells a booting server with MAC addr aa:bb:cc:dd:ee:ff to take IP address 1.2.3.4, and then download the file yaboot via TFTP. This file is the actual yaboot binary. It will know to also grab the yaboot.conf file, which will contain info on where to download the install kernel and initrd, as well as your ks parameters to send to the install kernel.
       
      After all of this is set up, you should be able to just boot the server from the network from SMS, and it'll just go.
      Updated on 2013-03-14T16:40:42Z at 2013-03-14T16:40:42Z by JayFurmanek
      • asingh1583
        asingh1583
        22 Posts
        ACCEPTED ANSWER

        Re: How to use kickstart file with /etc/bootptab for automated installation of Plinux

        ‏2013-03-15T05:12:29Z  in response to JayFurmanek
         Hi Jay,
         
        Thanks for information, but still after appending ks file, the installation not going automatically.  Do we need to /etc/bootptab if using yaboot.conf?
        as i think its not reading the yaboot.conf file.
         
        Kindly give me some more details on this.
         
         
        • JayFurmanek
          JayFurmanek
          59 Posts
          ACCEPTED ANSWER

          Re: How to use kickstart file with /etc/bootptab for automated installation of Plinux

          ‏2013-03-15T15:55:52Z  in response to asingh1583
           Does the system boot into the installer? If it does, then it likely found your yaboot.conf because otherwise it wouldn't have found the proper kernel and initrd for the installer.
           
          What does your bootpdtab entry look like?
           
          A couple things to note:
           - If the kickstart file is incomplete, or only answers a subset of the questions the installer asks, then the installer will have to default to interactive mode to retrieve that information.
           - If the installer can't access the specified kickstart file, it'll default to asking you where it is. Make sure the URL format is right.
           
          I may have had the format wrong in the above example..missing the colon after the system name (:)
          append="ks=nfs:server.example.com:/mydir/ks.cfg ksdevice=eth0 ip=1.2.3.4 netmask=255.255.255.0 gateway=1.1.1.1"
          • asingh1583
            asingh1583
            22 Posts
            ACCEPTED ANSWER

            Re: How to use kickstart file with /etc/bootptab for automated installation of Plinux

            ‏2013-03-17T04:35:24Z  in response to JayFurmanek
             Hi Jay,
             
            giving u the complete info. 
             
            bootptab entry 
             
            linux_test bf:/tmp/rhel/images/netboot/ppc.64img : client ip:serverip:gateway 
             and kickstart file kept under /tmp/rhel...
             and in yaboot
             linux_test
            label=linux 
            initrd.img=/tmp/rhel/ppc/ppc64/vmlinuz
            append=same as u explained 
            one more entry for ramdisk.gz 
            while booting its boot but donot take the kickstart file. 
            Also to mention thatwe r not using dhcp. 
            not aware whether its reading yaboot.conf file or not,how to boot with yaboot, means what settings i require to achieve this?
            • JayFurmanek
              JayFurmanek
              59 Posts
              ACCEPTED ANSWER

              Re: How to use kickstart file with /etc/bootptab for automated installation of Plinux

              ‏2013-03-18T15:30:47Z  in response to asingh1583
              So, for RHEL6, the ppc64.img file to too big for the firmware to pull over by itself (this is documented in the RHEL release notes). Instead, you must set your bootfile to the actual yaboot binary (the file called "yaboot" found at /ppc/chrp/yaboot on the RHEL media).
               
              Once yaboot is retrieved and started, it will automatically look in <TFTP_dir> and <TFTP_dir>/etc for the yaboot.conf file and retrieve it.
               
              From there, as long as it gets the correct kernel entry and the formats are all correct, it should work ok.
              • asingh1583
                asingh1583
                22 Posts
                ACCEPTED ANSWER

                Re: How to use kickstart file with /etc/bootptab for automated installation of Plinux

                ‏2013-03-19T04:38:56Z  in response to JayFurmanek
                 Hi Jay,
                 
                I tried as per your instruction, i guess m missing something in configuration, can you please look at my configuration details and suggest me how to proceed further?
                 
                In Bootptab i have made entry like this:


                linux_test:bf=/tmp/Rhel53_CD/ppc/chrp/yaboot:ip=1.2.3.4:ht=ethernet
                :sa=NIM IP :sm=255.255.255.0

                In /tftpaccess.ctl

                allow:/tftpboot
                allow:/tmp/Rhel53_CD/ppc/chrp/yaboot

                Copied yaboot.conf file in /tftpboot/etc,and made entry like this

                image=/tftpboot/ppc/ppc64/vmlinuz
                        label=linux
                        initrd=/tftpboot/ppc/ppc64/ramdisk.image.gz
                        append="ks=nfs:NIM IP:/tmp/Rhel53_CD/ks.cfg ksdevice=eth0 ip=1.2.3.4 netmask=255.255.255.0 noipv6"
                        read-only

                Also made directory ppc and ppc64 in /tftpboot
                copied VMLINUZ and ramdisk.image.gz

                While booting in sms mode:

                ( 1  ) Filename................./tmp/Rhel53_CD/ppc/chrp/yaboot
                TFTP Retries..................5
                Block Size....................512
                FINAL PACKET COUNT = 297
                FINAL FILE SIZE = 152052  BYTES

                Elapsed time since release of system processors: 401441 mins 55 secs



                Response to the First BOOTP request was not received

                BOOTP Parameters:
                ----------------
                chosen-network-type = ethernet,auto,none,auto
                server IP           = 0.0.0.0
                client IP           = 0.0.0.0
                gateway IP          = 0.0.0.0
                device              = /vdevice/l-lan@30000002
                MAC address         = 26 87 41 e0 54 2
                loc-code            = U8202.E4B.063993R-V3-C2-T1

                BOOTP request retry attempt: 1
                BOOTP request retry attempt: 2
                BOOTP request retry attempt: 3
                BOOTP request retry attempt: 4
                        !BA01B015 !

                and after some time:

                /vdevice/l-lan@30000002::-1,/etc/yaboot.conf: Unknown or corrupt filesystem
                Can't open config file
                Welcome to yaboot version 1.3.13 (Red Hat 1.3.13-7.el5)
                Enter "help" to get some basic usage information
                boot:

                /vdevice/l-lan@30000002::-1,/etc/yaboot.conf: Unknown or corrupt filesystem
                Can't open config file
                Welcome to yaboot version 1.3.13 (Red Hat 1.3.13-7.el5)
                Enter "help" to get some basic usage information
                boot:
                can't get <device_type> for device:
                Please wait, loading kernel...
                can't get <device_type> for device:
                :-1,/vmlinux: Unable to open file, Invalid device

                 
                • JayFurmanek
                  JayFurmanek
                  59 Posts
                  ACCEPTED ANSWER

                  Re: How to use kickstart file with /etc/bootptab for automated installation of Plinux

                  ‏2013-03-19T14:48:56Z  in response to asingh1583
                   Probably just use one TFTP boot directory. So either use the /tmp/Rhel directory, or /tftpboot, not both. TFTP is not very flexible (on purpose).
                   
                  Perhaps just use /tftpboot and have your resources look like:
                     /tftpboot/
                     /tftpboot/yaboot
                     /tftpboot/etc/yaboot.conf
                     /tftpboot/ppc/ppc64/ramdisk.image.gz
                     /tftpboot/ppc/ppc64/vmlinuz
                   
                  Make sure all of these files are world-readable.
                   
                  Also, in your yaboot.conf, you don't need the "/tftpboot" in the paths. The TFTP environment only knows one directory as it's home and refers to it as /.
                   So, try this:
                   
                  image=/ppc/ppc64/vmlinuz
                          label=linux
                          initrd=/ppc/ppc64/ramdisk.image.gz
                          append="ks=nfs:NIM IP:/tmp/Rhel53_CD/ks.cfg ksdevice=eth0 ip=1.2.3.4 netmask=255.255.255.0 noipv6"
                          read-only 
                   
                  You can test your environment using a TFTP client. Use it to log into your boot server and try to fetch the yaboot resources. If it works, you know you have your boot server set up right.
                  To test to make sure the ks file is reachable, from a different machine, attempt to NFS mount this location: nfs:NIM IP:/tmp/Rhel53_CD
                  If it mounts ok, you should be good.
                   

                  Updated on 2013-03-19T14:48:56Z at 2013-03-19T14:48:56Z by JayFurmanek
                  • asingh1583
                    asingh1583
                    22 Posts
                    ACCEPTED ANSWER

                    Re: How to use kickstart file with /etc/bootptab for automated installation of Plinux

                    ‏2013-03-20T10:45:27Z  in response to JayFurmanek
                     Hi Jay,
                     
                    Still error is the same. Tested bootp and nfs mount but still is not responding to bootp parameters.
                     
                    Still its giving yaboot.conf unknown or corrupted. Do i need to install rpm files for yaboot on AIX NIM?
                     
                    Does "yaboot" support for RHEL 5.3?
                     
                    Do i need to use DHCP?is it Mandatory? I am using NIM Aix 7.1 and trying to automate power linux RHEl5.3
                     
                    Please help me out, i am complete blank now, how to proceed on this.
                     

                    Updated on 2013-03-20T10:45:27Z at 2013-03-20T10:45:27Z by asingh1583
                    • JayFurmanek
                      JayFurmanek
                      59 Posts
                      ACCEPTED ANSWER

                      Re: How to use kickstart file with /etc/bootptab for automated installation of Plinux

                      ‏2013-03-20T15:20:35Z  in response to asingh1583
                       Did you change you bootptab entry to point to /tftpboot/yaboot?
                       
                      yaboot is the Linux bootloader on Power, so yes RHEL5.3 uses it.  RHEL5.3 is very old, however. Maybe the yaboot that is packaged with it doesn't work well.
                      You can always try a new version. Yaboot project home is here: http://yaboot.ozlabs.org/
                       
                      Also make sure to do a directed boot. You readout above shows 0's for the client and server IP addresses. Since you have no DHCP to give your client an address you have to set one in SMS. Use the Remote IPL menus I mentioned.
                       
                      If you're still stuck, maybe try the workaround discussed in this bug report:
                       https://bugzilla.redhat.com/show_bug.cgi?id=462663
                       
                      This is about as far as I can help on the forum here. If you have IBM or RedHat support, definitely make use of it.
                      • asingh1583
                        asingh1583
                        22 Posts
                        ACCEPTED ANSWER

                        Re: How to use kickstart file with /etc/bootptab for automated installation of Plinux

                        ‏2013-03-21T09:11:23Z  in response to JayFurmanek
                         Hi Jay,
                         
                        Thanks, for your great help in this issue, but unfortunately this is not working.
                         
                        Yes i have set bootp entry as /tftp/yaboot and used another yaboot and yaboot.conf file.Tried with workaround as well but that also not working here is the  detail of error.
                         

                        TFTP BOOT ---------------------------------------------------

                        Server IP.....................10.1.7.129

                        Client IP.....................10.1.7.124

                        Gateway IP....................10.1.4.1

                        Subnet Mask...................255.255.252.0

                        ( 1  ) Filename................./tftpboot/yaboot

                        TFTP Retries..................5

                        Block Size....................512

                        FINAL PACKET COUNT = 302

                        FINAL FILE SIZE = 154316  BYTES

                         

                        Elapsed time since release of system processors: 404550 mins 3 secs

                         

                        TFTP BOOT ---------------------------------------------------

                        Server IP.....................10.1.7.129

                        Client IP.....................10.1.7.124

                        Gateway IP....................10.1.4.1

                        Subnet Mask...................255.255.252.0

                        ( 1  ) Filename.................\etc\yaboot.conf-------------------------------------àReaching to /etc/yaboot.conf but not reading this.

                        TFTP Retries..................5

                        Block Size....................512

                        1

                        2

                        3

                                !BA017021 !

                        Error, can't read config file------------------------------------------------------------àis not able to read yaboot.conf file which has been kept under /etc/yaboot.conf

                        Welcome to yaboot version 1.3.13 (Red Hat 1.3.13-10.el5_5.1)

                        Enter "help" to get some basic usage information

                        boot:

                        I have no any support with IBM and redhat as i am trying to automate the installation. Rather than this can you suggest me any way to run the open firmware prompt command automatically from HMC using script.
                         
                        This would be a great help for me if i find anyway.
                         
                         
                        • JayFurmanek
                          JayFurmanek
                          59 Posts
                          ACCEPTED ANSWER

                          Re: How to use kickstart file with /etc/bootptab for automated installation of Plinux

                          ‏2013-03-21T18:34:27Z  in response to asingh1583
                          " Error, can't read config file" will be displayed if it TFTP client can't find the file.
                           
                          Remember that when a TFTP client connects to a TFTP server, it can see only the base directory and what's beneath it. So if the TFTP server is set to have a base dir or /tftpboot then the client will see that as /
                          Recheck you TFTP server configuration. And attempt to connect to it using a TFTP client installed on a running system. That will prove the TFTP works.
                           
                          I would recommend building a newer version of Yaboot from the link I sent.  Back in the RHEL5 days, most people just booted the /netboot/ppc64.img directly, so the netboot function in that RHEL5.3 Yaboot might be faulty.  You should be able to netboot using the ppc64.img file, but that method goes directly into the installer and doesn't ever give you a boot prompt to send kernel parameters, forcing you to issue OpenFirmware commands to send the kickstart parameters. If you want to maintain an environment like this, you'll probably want the latest Yaboot anyway.
                           
                          If you attempt to use a newer version of Yaboot, be aware that it will initially look for the yaboot.conf file by a different name. Since many machines could have many different configuration needs, the newer versions of Yaboot first look for a file named after the MAC address that is requesting it. So if your MAC is aa:bb:cc:dd:ee:ff, then newer yaboots will look for a config file called aa-bb-cc-dd-ee-ff on the TFTP server. If it doesn't find it, it falls back to looking for yaboot.conf.
                          • asingh1583
                            asingh1583
                            22 Posts
                            ACCEPTED ANSWER

                            Re: How to use kickstart file with /etc/bootptab for automated installation of Plinux

                            ‏2013-03-28T09:57:46Z  in response to JayFurmanek
                             Hi Jay,
                             
                            Everything went fine and i am now able to automate everything.
                             
                            Some correction i want to add in this, the yaboot.conf file should be put under /etc not /tftpboot/etc.
                             
                            and PPC directory should be under "/". and here you go for your installation.
                             
                            Please let me know if you have any queries on this.
      • asingh1583
        asingh1583
        22 Posts
        ACCEPTED ANSWER

        Re: How to use kickstart file with /etc/bootptab for automated installation of Plinux

        ‏2013-03-15T05:13:37Z  in response to JayFurmanek
         Also in our environment we can't use DHCP.
        • JayFurmanek
          JayFurmanek
          59 Posts
          ACCEPTED ANSWER

          Re: How to use kickstart file with /etc/bootptab for automated installation of Plinux

          ‏2013-03-15T15:59:23Z  in response to asingh1583
          You'll have to resort to a directed network boot then, which is a manual step.
          In SMS, this is called a Remote IPL (RIPL). You can use the SMS menus to set client and server IPs. Then allow it to boot from the network.
    • JayFurmanek
      JayFurmanek
      59 Posts
      ACCEPTED ANSWER

      Re: How to use kickstart file with /etc/bootptab for automated installation of Plinux

      ‏2013-03-14T16:45:32Z  in response to anibal.carvalho
       Also, if you are using NIM, read the link below on how to incorporate DHCP into a NIM environment:
       
      http://pic.dhe.ibm.com/infocenter/aix/v7r1/index.jsp?topic=%2Fcom.ibm.aix.commadmn%2Fdoc%2Fcommadmndita%2Ftcpip_dhcp_nim.htm