Topic
1 reply Latest Post - ‏2013-11-05T02:27:40Z by JayFurmanek
mylap
mylap
9 Posts
ACCEPTED ANSWER

Pinned topic How to boot from NIM and use autoyast

‏2013-11-01T14:10:36Z |

Hi All,

Having read a few posts here I got my SuSe SLES 11sp3 booting via an AIX NIM server and then completing the full installation automatically via NFS with a autoyast file.

I also use the lpar_netboot command to save messing around with SMS screens.

I thought I'd post my notes in case anyone else finds them useful.

I would think the process for RedHat would be very similar.

Andy Thomas IBM UK.

 

Obtain the iso for Suse Linux - in this case Suse SLES 11 sp3 - copy it to the NIM server

On the AIX NIM server mount the iso file to a directory - /mnt

 

# loopmount -i SLES-11-SP3-DVD-ppc64-GM-DVD1.iso -o "-V cdrfs -o ro" -m /mnt

 

Copy the files we need to /tftpboot:

 

# cp /mnt/suseboot/inst64 /tftpboot/int64

# cp /mnt/suseboot/yaboot.ibm /tftpboot/yaboot.suse

# cp /mnt/suseboot/yaboot.cnf /tftpboot/yaboot.conf

# cp /mnt/suseboot/yaboot.txt /tftpboot/yaboot.txt

 

Note: yaboot.cnf must be renamed to yaboot.conf in /tftpboot

 

Setup /etc/bootptab to point at the suse boot image "yaboot.suse"

Add a line to /etc/bootptab that looks like this:

 

cts213:bf=/tftpboot/yaboot.suse:ip=192.168.148.213:ht=ethernet:sa=192.168.148.150:sm

=255.255.255.0:

 

cts213 (192.168.148.213) = my SUSE Linux hostname in this example  (check also there is an entry for cts213 in /etc/hosts)

cts150 (192.168.148.150) = IP address of my NIM server (also being used as an NFS server)

 

Edit /tftpboot/yaboot.txt to match what you want:

(eg. add a line for your powerlinux boot option)

 

# more /tftpboot/yaboot.txt

 

             Welcome to SuSE Linux Enterprise 11 sp3 for POWER!

 

Type  "powerlinux"   to start the install via NFS on cts150 (default)    

Type  "install"  to start the YaST installer on this CD/DVD

Type  "slp"      to start the YaST install via network

Type  "rescue"   to start the rescue system on this CD/DVD

            

 

 

Optional step : rename yaboot.conf - so it matches your specific  LPar's MAC address:

# mv yaboot.conf yaboot.conf-8a-26-b3-56-39-02

 

Copy the installation media to a directory on your NIM server

 

# mkdir -p /export/nim/sles11sp3

# cp -r /mnt/* /export/nim/sles11sp3

 

NFS Export this directory and check with showmount command:

Add a line to /etc/exports:

/export/nim/sles11sp3 -public,sec=sys:krb5p:krb5i:krb5:dh,ro

 

# exportfs -a

 

# showmount -e

export list for cts150:

/export/nim/sles11sp3 (everyone)

 

 

Now create a autoyast file, from an existing SUSE Installation. Perhaps the easiest way to do this is to clone an existing environment using:

 

#yast2 autoinst    and the clone button in each section       (is there an easier way form the command line ?)

 

You may also find an autoinst.xml file on your existing SuSE system from original system installation.

# cp  autoinst.xml   cts213.autoyast

 

Autoyast gives you the opportunity to include various pre and post installation scripts if they are required

 

Copy the autoyast file (cts213.autoyast) to the NFS server (cts150) - /export/nim/sles11sp3

 

 

Next - Edit the contents of yaboot.conf-8a-26-b3-56-39-02 to reference our NFS install tree and the autoyast file (see bold text)

 

# more /tftpboot/yaboot.conf-8a-26-b3-56-39-02

message=yaboot.txt

default=powerlinux

timeout=100

image[64bit]=inst64

  label=install

  append="quiet sysrq=1 insmod=sym53c8xx insmod=ipr            "

image[64bit]=inst64

  label=slp

  append="quiet sysrq=1 install=slp           "

image[64bit]=inst64

  label=rescue

  append="quiet sysrq=1 rescue=1              "

image[64bit]=inst64

 label=powerlinux

 append="quiet autoyast=nfs://192.168.148.150/export/nim/sles11sp3/cts213.autoyast install=nfs://192.168.148.150/export/nim/sles11sp3 vnc=1 vncpassword=passw0rd gateway=192.168.148.1 hostip=192.168.148.213 netmask=255.255.255.0 dns=192.168.164.21"

 

Notes on the new entry above:

vnc=1 vncpassword=passw0rd    -  enables vnc access for the install

hostip=192.168.148.213  - this is necessary otherwise install will try dhcp to get and address and then stop

install=nfs://192.168.148.150/export/nim/sles11sp3 - nfs location of our install media

autoyast=nfs://192.168.148.150/export/nim/sles11sp3/cts213.autoyast  - NFS location of our autoyast file

 

Setup access to the HMC (hmc1) from the NIM server:

# cd /

# ssh-keygen -t rsa

# mykey=`cat .ssh/id_rsa.pub`

# ssh hscroot@hmc1 mkauthkeys -a  \"$mykey\"

Password: xxxxxxxx

 

Check we have access to the HMC from the NIM server:

# ssh hscroot@hmc1 date

Mon Oct 28 13:30:37 GMT 2013

 

Now boot the LPar - using the HMC command line (so you don't have to use the SMS menu etc)

# ssh hscroot@hmc1 lpar_netboot -f -i -t ent -T off -s auto -d auto  -S 192.168.148.150 -G 192.168.148.1 -C 192.168.148.213 -K 255.255.255.0 "SLES11_213" "default" "Server4-E4A-SN10DDF21"

 

lpar_netboot: Error : Close command sent/bin/stty: standard input: Invalid argument

# Connecting to SLES11_213.

# Connected

# Checking for power off.

# Power off complete.

# Power on SLES11_213 to Open Firmware.

# Power on complete.

# Getting adapter location codes.

# Network booting install adapter.

# spanning tree.

# bootp sent over network.

# Network boot proceeding, lpar_netboot is exiting.

# Finished.

Several minutes later you should have a running SUSE Linux system running in your LPar !

If you don't most likely there's problem with your autoyast file - so open a vnc viewer and track the installation.

 

The lpar_netboot command is documented here:

http://publib.boulder.ibm.com/infocenter/aix/v6r1/index.jsp?topic=%2Fcom.ibm.aix.cmds%2Fdoc%2Faixcmds3%2Flpar_netboot.htm

As well as using it to start the boot of an LPar you can use it to get the MAC addresses of your virtual adapters - so you can rename your yaboot.conf file to be specific to a MAC address as I did above. There are examples of this on the link.

 

Updated on 2013-11-01T14:20:05Z at 2013-11-01T14:20:05Z by mylap
  • JayFurmanek
    JayFurmanek
    91 Posts
    ACCEPTED ANSWER

    Re: How to boot from NIM and use autoyast

    ‏2013-11-05T02:27:40Z  in response to mylap

    Great job, Andy!

     

    A couple notes:

    - While you may be doing the install from the AIX server that has NIM installed, you are not necessarily using NIM here, so maybe the subject line should change. NIM is a set of scripts and a SMIT/ODM front end that lets you manage and deploy mksysb images. That said, this *is* the way you want to do things when using AIX as a boot/install server for Linux. You can do much the same thing from a Linux server, but in that case you use DHCP for BOOTP support in place of bootpd.

    - Love the remote ssh command to the HMC! Great idea!  BTW, when DHCP is used for BOOTP support, it can recognize servers by their MAC so you can just boot the LPAR from the network (no SMS configuration needed). The DHCP server will recognize and boot the server into the installer.