Objective: PXE installation for autoyast
In an effort to help automate OS installation, I had set up a Preboot Execution Environment (PXE) server.
"The Preboot eXecution Environment (PXE, also known as Pre-Execution Environment, or 'pixie') is an environment to boot computers using a network interface independently of available data storage devices (like hard disks) or installed operating systems."
Environment: SLES 11
I had already discusses how PXE works in my earlier posts where I had installed PXE environment for kick-starting the Redhat/CentOS flavors. If the reader is interested to know how PXE is configured on Redhat/CentOS - click here
Change Plan:
1. Create an ISO from the DVD installation media.
2. Mount the ISO permanently(/etc/fstab) to a particular mount point directory structure which is accessed through server, instead of extracting images. This could be more efficient in storage utilization.
3. Add a software repository for the web-server/ISO image which you have created.
4. Install packages like TFTP, DHCP, APACHE, SYSLINUX if they were not installed by default.
5. Modify TFTP and DHCP configurations as to lease IP addresses according to your environment you are building your enterprise server.
6. Poweron the destination host, boot from the LAN in which NIC makes a request to the DHCP which in-turns provides with information like(IP, subnet, gateway...etc), additionally provides the TFTP location from where it has to get the booting image.
I assume the reader would be aware of creating an ISO image, mounting it permanently, also would be skipping the package installations.
I would be providing more of the configuration details along with the screen shots, which could be helpful incase if you are configuring from " YAST "
Executions :
I had mounted by ISO image on /srv/www/htdocs/sles/11/x86_64 and has added into my repository as below shown,
Repository Additions :
(Yast -> Software Repositories -> Add -> HTTP -> Server and Directory )
Repository Name
sles11sp3
(x) Edit Parts of the URL
┌Protocol────────────────────────────────────────
│ ( ) FTP (x) HTTP
└─────────────────────────────────────────────
Server Name
192.168.56.116
Directory on Server
/sles/11/x86_64
┌Authentication────────────────────────────────────
│[x] Anonymous
│User Name
│
│Password
│
└─────────────────────────────────────────────
TFTP Enable/Configurations :
Install/enable TFTP and make a boot image directory(/tftpboot), as below :
(Yast -> Network Services -> TFTP Server )
( ) Disable
(x) Enable
Boot Image Directory
/tftpboot [Browse...]
[ ] Open Port in Firewall [Firewall Details...]
Firewall is disabled
[View Log]
DHCP configurations :
Once DHCP is installed on the server, use DHCP server wizard.
Pic 1 :
Domain Name
Primary Name server IP
192.168.56.116
[ Next ]
Pic 2 :
IP Address Range
First IP Address Last IP Address
192.168.56.175 192.168.56.180
[ Next ]
Pic 3 :
Service start
[X] When Booting
[ ] Manually
Pic 4:
Global Options
┌────────────────────────────────────────────────────
│Option │Value
│ddns-update-style │none
│ddns-updates │Off
│authoritative │On
│log-facility │local7
│default-lease-time │14400
│option domain-name │"suselnx.com"
│option domain-name-servers │192.168.56.116
Pic 5 :
Subnet Configuration
Network Address Network Mask
192.168.56.0 255.255.255.0
┌──────────────────────────────────────────────────────────
│Option │Value
│range │192.168.56.175 192.168.56.180
│next-server │192.168.56.116
│filename │"pxelinux.0"
│option routers │192.168.56.1
Click OK and then finish
- Creating a directory structure for TFTP server
# mkdir -p /tftpboot/pxelinux.cfg
# mkdir -p /tftpboot/sles/11/x86_64
- Copy necessary files for boot to the TFTP server directory structure:
# cd /srv/www/htdocs/sles/11/x86_64/boot/x86_64/loader/
# cp linux initrd message biostest memtest /tftboot/sles/11/x86_64/
# cp /usr/share/syslinux/pxelinux.0 /tftpboot/
# cp /usr/share/syslinux/menu.c32 /tftpboot/
- Create a default menu as below :
# cat /tftpboot/pxelinux.cfg/default
default menu.c32
prompt 0
timeout 100
LABEL sles11sp3
MENU LABEL SLES 11 SP3 x86_64
KERNEL sles/11/x86_64/linux
APPEND initrd=sles/11/x86_64/initrd splash=silent showopts install=http://192.168.56.116/sles/11/x86_64 ramdisk_size=65536
- Below would be the skeleton for our configured TFTP server.
# ls -lar /tftpboot/*
-rw-r--r-- 1 root root 16462 Jul 24 18:14 /tftpboot/pxelinux.0
-rw-r--r-- 1 root root 57140 Jul 24 18:14 /tftpboot/menu.c32
/tftpboot/sles:
total 12
drwxr-xr-x 3 root root 4096 Jul 24 18:23 11
drwxr-xr-x 4 root root 4096 Jul 24 18:23 ..
drwxr-xr-x 3 root root 4096 Jul 24 18:23 .
/tftpboot/pxelinux.cfg:
total 12
-rw-r--r-- 1 root root 669 Jul 25 11:07 default
drwxr-xr-x 4 root root 4096 Jul 24 18:23 ..
drwxr-xr-x 2 root root 4096 Jul 25 11:07 .
- On BIOS booting press F12, and select LAN(l) to further boot from the media.
Hence we could conclude that the PXE installation is successful and in my further posts I would configure an autoyast file to PXE which would automate SLES.
Thank you for reading and re-sharing.
No comments:
Post a Comment