User Tools

Site Tools


netbooting_of_a_sles_12_sp3_powervm_lpar_with_an_aix_nim_server

Netbooting of a SLES 12 SP3 PowerVM LPAR with an AIX NIM Server

For this example the following settings are assumed:

  • A HMC called hmc manages managed-system.
  • A LPAR named mysles12sp3 is already defined on managed-system.
    • All required network and storage adapters as well as disk storage have been created up front.
    • The designated IP address is 192.168.10.75/24.
  • The AIX NIM server nim has the IP address 192.168.10.10/24.
  • The network adapter used for netbooting has the following mac address: 96:0d:e1:c7:5b:03.
  • Access to the HMC hmc via password-less SSH is possible from a central system.
  • The SUSE AutoYaST XML file used for the installation is accessible through a web server (IP address 192.168.10.120/24) at this URL:
    http://<web-server>/SLES_AutoYaST/mysles12sp3.xml


How to create a SLES AutoYaST XML file is beyond the scope here, please check your SUSE documentation on how to do it!

This picture shows the example setup in detail:

1) Create the files for netbooting on a different SLES system

[root@pkvm-sles12sp3 ~]$ grub2-mknetdir --net-directory=/var/lib/tftpboot
Netboot directory for powerpc-ieee1275 created. Configure your DHCP server to point to
/boot/grub2/powerpc-ieee1275/core.elf

2) Transfer the SLES netboot infrastructure to the AIX NIM server

[root@pkvm-sles12sp3 ~]$ cd /var/lib/tftpboot
[root@pkvm-sles12sp3 tftpboot]$ tar cf /tmp/sles12sp3-bootptab.tar boot
[root@pkvm-sles12sp3 tftpboot]$ scp /tmp/sles12sp3-bootptab.tar root@nim:/tmp

3) Unpack the SLES netboot infrastructure on the AIX NIM server

[root@nim ~]$ cd /tftpboot
[root@nim tftpboot]$ mkdir sles12sp3
[root@nim tftpboot]$ cd sles12sp3
[root@nim sles12sp3]$ tar xvpf /tmp/sles12sp3-bootptab.tar

4) Create the entry in the /etc/bootptab file on the AIX NIM server

[root@nim ~]$ cat etc/bootptab:
# Legend:
# first field -- hostname (may be full domain name and probably should be)
# bf – bootfile
# ip -- host IP address
# ht -- hardware type
# ha -- hardware address
# sa -- server IP address to tftp bootfile from
# sm -- subnet mask
mysles12sp3:bf=/tftpboot/mysles12sp3:ip=192.168.10.75:ht=ethernet:ha=960DE1C75B03:sa=192.168.10.10:sm=255.255.255.0:
[root@nim ~]$ cd /tftpboot
[root@nim tftpboot]$ ln -s sles12sp3/boot/grub2/powerpc-ieee1275/core.elf mysles12sp3
[root@nim tftpboot]$ ls -l mysles12sp3
lrwxrwxrwx  1 root system 46 Nov 20 14:45 mysles12sp3 -> ./sles12sp3/boot/grub2/powerpc-ieee1275/core.elf

6) Activate the bootp changes

As the bootp daemon runs under the control of the inetd daemon we have to notify the inetd to refresh its subsystems.

[root@nim ~]$ refresh -s inetd
  • Unfortunately GRUB2 is not always working relatively to /tftpboot as “root” directory, therefore is it absolutely vital to set the following symbolic link:
[root@nim ~]$ cd /; ln -s /tftpboot/sles12sp3/boot /boot

Note:
The TFTP server on AIX does not chroot incoming clients into a specific directory by default.
Instead, access to the server is controlled by the /etc/tftpaccess.ctl file.

Make sure your /etc/tftpaccess.ctl file looks like this – or at least allows access to the /tftpboot and /boot directories:

[root@nim ~]$ cat /etc/tftpaccess.ctl
# NIM access for network boot 
allow:/tftpboot 
allow:/boot

8) Create a customized GRUB2 grub.cfg file in /tftpboot


The only possible location is: /tftpboot/sles12sp3/boot/grub2/grub.cfg

[root@nim ~]$ cat /tftpboot/sles12sp3/boot/grub2/grub.cfg
set default=0
set timeout=10

echo -e "\nWelcome to the SLES 12 SP3 installer!\n\n"

menuentry 'Install my SLES 12 SP3' {
  linux sles12sp3/linux ro vnc=0 ifcfg=eth0=192.168.10.75/24,192.168.10.1 autoyast=http://192.168.10.120/SLES_AutoYaST/mysles12sp3.xml install=http://192.168.10.120/ppc/SLES12-SP3
  initrd sles12sp3/initrd
}

9) Copy the proper boot images into the right location

  • From the SLES 12 SP3 DVD image – mounted under /mnt in this example – copy these files:
[root@nim ~]$ cp /mnt/ppc/ppc64/linux /tftpboot/sles12sp3/linux
[root@nim ~]$ cp /mnt/ppc/ppc64/initrd /tftpboot/sles12sp3/initrd
[root@nim ~]$ chmod 0644 /tftpboot/sles12sp3/*

10) Start the lpar_netboot command on the HMC

At last, initiate the installation from the central system via password-less SSH access of the HMC.

[root@<central system> ~]$ ssh hscroot@<hmc> lpar_netboot -t ent -m 960DE1C75B03 -S <nim> -C 192.168.10.75 -K 255.255.255.0 -s auto -d auto -f -i -E LPAR_NETBOOT_DEBUG -T off mysles12sp3 <lpar_profile_of_mysles12sp3> <managed-system>

After a while your AutoYaST-automated SLES installation should begin…

Using a Linux DHCP Server instead of the AIX NIM Server

  • The same steps as in the AIX NIM server scenario would be performed but a Linux DHCP server would be used instead of the AIX NIM server.
[root@<linux_dhcp> ~]$ cat /etc/dhcpd.conf
option domain-name "<your_domain_name_here>";
option domain-name-servers 192.168.10.8;   # DNS server IP address
option routers 192.168.10.1;
option ntp-servers 192.168.10.8;   # NTP server IP address
ddns-update-style none;
ignore unknown-clients;
allow bootp;
subnet 192.168.10.0 netmask 255.255.255.0 {
  range 192.168.10.100 192.168.10.250;
  default-lease-time 86400;
  max-lease-time 604800;
}
host mysles12sp3 {
  hardware ethernet 96:0D:E1:C7:5B:03;
  filename "mysles12sp3";
  fixed-address 192.168.10.75;
  next-server 192.168.10.51;       # DHCP server IP address
}

GRUB2 sequence of TFTP requests for SLES 12 SP3

Using tcpdump and wireshark the following sequence of TFTP requests during the initial GRUB2 booting can be observed.


SLES 12 looks for the grub.cfg file only here: /tftpboot/sles12sp3/boot/grub2/grub.cfg

 506  16.527572  192.168.10.75  192.168.10.10  TFTP 85   Read Request, File: /tftpboot/mysles12sp3, Transfer type: octet, blksize=1428
 793  17.410470  192.168.10.75  192.168.10.10  TFTP 111  Read Request, File: /boot/grub2/powerpc-ieee1275/normal.mod, Transfer type: octet, blksize=1024, tsize=0
1104  17.509813  192.168.10.75  192.168.10.10  TFTP 113  Read Request, File: /boot/grub2/powerpc-ieee1275/terminal.mod, Transfer type: octet, blksize=1024, tsize=0
1123  17.595988  192.168.10.75  192.168.10.10  TFTP 111  Read Request, File: /boot/grub2/powerpc-ieee1275/crypto.mod, Transfer type: octet, blksize=1024, tsize=0
1143  17.623303  192.168.10.75  192.168.10.10  TFTP 112  Read Request, File: /boot/grub2/powerpc-ieee1275/gettext.mod, Transfer type: octet, blksize=1024, tsize=0
1164  17.640432  192.168.10.75  192.168.10.10  TFTP 109  Read Request, File: /boot/grub2/powerpc-ieee1275/gzio.mod, Transfer type: octet, blksize=1024, tsize=0
1197  17.754018  192.168.10.75  192.168.10.10  TFTP 112  Read Request, File: /boot/grub2/powerpc-ieee1275/command.lst, Transfer type: octet, blksize=1024, tsize=0
1213  17.893224  192.168.10.75  192.168.10.10  TFTP 112  Read Request, File: /boot/grub2/powerpc-ieee1275/command.lst, Transfer type: octet, blksize=1024, tsize=0
1229  18.041401  192.168.10.75  192.168.10.10  TFTP 107  Read Request, File: /boot/grub2/powerpc-ieee1275/fs.lst, Transfer type: octet, blksize=1024, tsize=0
1244  18.114254  192.168.10.75  192.168.10.10  TFTP 107  Read Request, File: /boot/grub2/powerpc-ieee1275/fs.lst, Transfer type: octet, blksize=1024, tsize=0
1257  18.124603  192.168.10.75  192.168.10.10  TFTP 111  Read Request, File: /boot/grub2/powerpc-ieee1275/crypto.lst, Transfer type: octet, blksize=1024, tsize=0
1273  18.444346  192.168.10.75  192.168.10.10  TFTP 111  Read Request, File: /boot/grub2/powerpc-ieee1275/crypto.lst, Transfer type: octet, blksize=1024, tsize=0
1287  18.570517  192.168.10.75  192.168.10.10  TFTP 113  Read Request, File: /boot/grub2/powerpc-ieee1275/terminal.lst, Transfer type: octet, blksize=1024, tsize=0
1308  19.115787  192.168.10.75  192.168.10.10  TFTP 113  Read Request, File: /boot/grub2/powerpc-ieee1275/terminal.lst, Transfer type: octet, blksize=1024, tsize=0
1324  19.473895  192.168.10.75  192.168.10.10  TFTP 92   Read Request, File: /boot/grub2/grub.cfg, Transfer type: octet, blksize=1024, tsize=0
1345  20.117690  192.168.10.75  192.168.10.10  TFTP 109  Read Request, File: /boot/grub2/powerpc-ieee1275/echo.mod, Transfer type: octet, blksize=1024, tsize=0
1483  29.194426  192.168.10.75  192.168.10.10  TFTP 110  Read Request, File: /boot/grub2/powerpc-ieee1275/linux.mod, Transfer type: octet, blksize=1024, tsize=0
1508  29.272453  192.168.10.75  192.168.10.10  TFTP 108  Read Request, File: /boot/grub2/powerpc-ieee1275/elf.mod, Transfer type: octet, blksize=1024, tsize=0
netbooting_of_a_sles_12_sp3_powervm_lpar_with_an_aix_nim_server.txt · Last modified: 2019/06/24 11:20 by mperzl