For this example the following settings are assumed:
hmc
manages managed-system
.myrhel75le
is already defined on managed-system
.192.168.10.75/24
.nim
has the IP address 192.168.10.10/24
.96:0d:e1:c7:5b:03
.hmc
via password-less SSH is possible from a central system.web server
(IP address 192.168.10.120/24
) at this URL:http://<web-server>/RHEL_Kickstart/myrhel75le.ks
How to create a Red Hat Kickstart file is beyond the scope here, please check your RHEL documentation on how to do it!
This picture shows the example setup in detail:
[root@pkvm-le-rhel75 ~]$ 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
[root@pkvm-le-rhel75 ~]$ cd /var/lib/tftpboot [root@pkvm-le-rhel75-nfs tftpboot]$ tar cf /tmp/rhel7u5le-bootptab.tar boot [root@pkvm-le-rhel75-nfs tftpboot]$ scp /tmp/rhel7u5le-bootptab.tar root@nim:/tmp
[root@nim ~]$ cd /tftpboot [root@nim tftpboot]$ mkdir rhel7u5-le [root@nim tftpboot]$ cd rhel7u5-le [root@nim rhel7u5-le]$ tar xvpf /tmp/rhel7u5le-bootptab.tar
[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 myrhel75le:bf=/tftpboot/myrhel75le: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 rhel7u5-le/boot/grub2/powerpc-ieee1275/core.elf myrhel75le [root@nim tftpboot]$ ls -l myrhel75le lrwxrwxrwx 1 root system 41 2017-10-06 14:45 myrhel75le -> ./rhel7u5-le/boot/grub2/powerpc-ieee1275/core.elf
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
/tftpboot
as “root” directory, therefore is it absolutely vital to set the following symbolic link:[root@nim ~]$ cd /; ln -s /tftpboot/rhel7u5-le/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
The naming for this customized grub.cfg
file is grub.cfg-01-<MAC-ADDRESS>
with <MAC-ADDRESS>
coded as xx-yy-zz-aa-bb-cc
.
[root@nim ~]$ cat /tftpboot/grub.cfg-01-96-0d-e1-c7-5b-03 set default=0 set timeout=10 echo -e "\nWelcome to the Red Hat Enterprise Linux 7.5 LE installer!\n\n" menuentry 'Red Hat Enterprise Linux 7.5 LE' { linux rhel7u5-le/vmlinuz ro ip=192.168.10.10::192.168.10.1:255.255.255.0:myrhel75le:eth0:none inst.ks=http://192.168.10.120:/RHEL_Kickstart/myrhel75le.ks initrd rhel7u5-le/initrd.img }
If you don't want to use a customized GRUB2 grub.cfg
file then you have to edit the /tftpboot/rhel75-le/boot/grub2/grub.cfg
file.
[root@nim ~]$ cat /tftpboot/rhel75-le/boot/grub2/grub.cfg set default=0 set timeout=10 echo -e "\nWelcome to the Red Hat Enterprise Linux 7.5 LE installer!\n\n" menuentry 'Red Hat Enterprise Linux 7.5 LE' { linux rhel7u5-le/vmlinuz ro ip=192.168.10.10::192.168.10.1:255.255.255.0:myrhel75le:eth0:none inst.ks=http://192.168.10.120:/RHEL_Kickstart/myrhel75le.ks initrd rhel7u5-le/initrd.img }
In our example here the files /tftpboot/grub.cfg-01-96-0d-e1-c7-5b-03
and /tftpboot/rhel75-le/boot/grub2/grub.cfg
are identical.
/mnt
in this example – copy these files:[root@nim ~]$ cp /mnt/ppc/ppc64/vmlinuz /tftpboot/rhel7u5-le/vmlinuz [root@nim ~]$ cp /mnt/ppc/ppc64/initrd.img /tftpboot/rhel7u5-le/initrd.img [root@nim ~]$ chmod 0644 /tftpboot/rhel7u5-le/*
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 myrhel75le <lpar_profile_of_myrhel75le> <managed-system>
After a while your Kickstart-automated RHEL installation should begin…
[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 myrhel75le { hardware ethernet 96:0D:E1:C7:5B:03; filename "myrhel75le"; fixed-address 192.168.10.75; next-server 192.168.10.51; # DHCP server IP address }
Using tcpdump and wireshark the following sequence of TFTP requests during the initial GRUB2 booting can be observed.
Client IP: | 192.168.10.75 (= 0xC0A80A4B ) |
---|---|
MAC address: | 96:0D:E1:C7:5B:03 |
13 0.023061 192.168.10.75 192.168.10.10 TFTP 73 Read Request, File: /tftpboot/myrhel75le, Transfer type: octet 642 7.548135 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 939 7.594158 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 954 7.797228 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 971 8.000194 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 988 8.203462 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 1011 8.208153 192.168.10.75 192.168.10.10 TFTP 112 Read Request, File: //tftpboot/grub.cfg-01-96-0d-e1-c7-5b-03, Transfer type: octet, blksize=1024, tsize=0 1013 8.408127 192.168.10.75 192.168.10.10 TFTP 100 Read Request, File: //tftpboot/grub.cfg-C0A80A4B, Transfer type: octet, blksize=1024, tsize=0 1015 8.608099 192.168.10.75 192.168.10.10 TFTP 99 Read Request, File: //tftpboot/grub.cfg-C0A80A4, Transfer type: octet, blksize=1024, tsize=0 1017 9.021123 192.168.10.75 192.168.10.10 TFTP 98 Read Request, File: //tftpboot/grub.cfg-C0A80A, Transfer type: octet, blksize=1024, tsize=0 1019 9.221195 192.168.10.75 192.168.10.10 TFTP 97 Read Request, File: //tftpboot/grub.cfg-C0A80, Transfer type: octet, blksize=1024, tsize=0 1021 9.421168 192.168.10.75 192.168.10.10 TFTP 96 Read Request, File: //tftpboot/grub.cfg-C0A8, Transfer type: octet, blksize=1024, tsize=0 1023 9.621142 192.168.10.75 192.168.10.10 TFTP 95 Read Request, File: //tftpboot/grub.cfg-C0A, Transfer type: octet, blksize=1024, tsize=0 1025 9.821217 192.168.10.75 192.168.10.10 TFTP 94 Read Request, File: //tftpboot/grub.cfg-C0, Transfer type: octet, blksize=1024, tsize=0 1027 10.021184 192.168.10.75 192.168.10.10 TFTP 93 Read Request, File: //tftpboot/grub.cfg-C, Transfer type: octet, blksize=1024, tsize=0 1029 10.221159 192.168.10.75 192.168.10.10 TFTP 112 Read Request, File: //tftpboot/grub.cfg-01-96-0d-e1-c7-5b-03, Transfer type: octet, blksize=1024, tsize=0
RHEL will try to find (please note the hex-coded IP-address here: 192.168.10.75
= 0xC0A80A4B
) in the following order:
/tftpboot/grub.cfg-01-96-0d-e1-c7-5b-03 /tftpboot/grub.cfg-C0A80A4B /tftpboot/grub.cfg-C0A80A4 /tftpboot/grub.cfg-C0A80A /tftpboot/grub.cfg-C0A80 /tftpboot/grub.cfg-C0A8 /tftpboot/grub.cfg-C0A /tftpboot/grub.cfg-C0 /tftpboot/grub.cfg-C /tftpboot/grub.cfg-01-96-0d-e1-c7-5b-03