Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Set fixed ip address to different servers
2017-05-09, 01:15 (This post was last modified: 2017-05-09 01:26 by MultimediaMan.)
Post: #2
RE: Set fixed ip address to different servers
I feel your pain.

I use a generic menu script for the Menu UI, then I wrote a script to write an ${uuid)-network.ipxe script on the server from a MasterUUID.csv file.

The Output is something like this (this is for booting into the installer with the intention of installing in an NFS Roots environment via Serial TUI):

Code:
#ipxe
echo ${cls}

#GENERATED BY Build_UUID_network_iPXE.sh or Build_UUID_network_iPXE.cmd

#Filename output is ${uuid}-network.ipxe
#87891122-abab-cdcd-efef-1234abcd5678-network.ipxe

set hostname yourserver
set nfs_nic_one 1
set nfs_nic_two 6
set nfs_nic_order 1-2
set nfs_ip 10.100.1.100
set nfs_netmask 255.255.255.128
set nfs_server 10.100.1.10
set def_gateway 10.100.1.1
set def_menu_opt 2_OpenSuSE-nfs-bond
set dist_opt "OpenSuSE"

chain ${17}/NetBoot/iPXE/ipxelinux.cfg/OEM/SuSE/OpenSuSE_menu.ipxe || echo

chain ${17}/NetBoot/iPXE/ipxelinux.cfg/default/default-efi.ipxe || echo

#END

This could also be put into a PHP script which parses a read-only CSV file or queries a MySQL Database.

The OpenSuSE_menu.ipxe puts the variables set in the above script into parameters for booting the installer... e.g.:

Code:
#!ipxe
echo Booting OpenSuse Installer (AutoYast,ttyS0)...

initrd ${17}/Media-Depot/linux/OpenSuSE/x86_64/loader/initrd || echo
chain ${17}/Media-Depot/linux/OpenSuSE/x86_64/loader/linux initrd=initrd splash=verbose vga=0x314 showopts  install=${17}/Media-Depot/linux/OpenSuSE/x86_64/ autoyast=${17}/NetBoot/iPXE/ipxelinux.cfg/OEM/OpenSuSE/AutoYAST/${uuid}.xml insecure=1 console=ttyS0,115200 static_ips=${nfs_ip}:${nfs_server}:${def_gateway}:${nfs_netmask}:${hostname}:${n​et{nfs_nic_one}}:none:9000 earlycon=uart8250,io,0x3f8,115200n8 || echo

exit

"Thus far, you have been adrift within the sheltered harbor of my patience..."
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Set fixed ip address to different servers - MultimediaMan - 2017-05-09 01:15



User(s) browsing this thread: 1 Guest(s)