The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 807 - File: showthread.php PHP 7.3.15 (Linux)
File Line Function
/showthread.php 807 errorHandler->error





Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Boot based on MAC
2014-04-21, 12:11
Post: #1
Boot based on MAC
I would like to have clients boot from a specific server based on their MAC address. I have tried using this script:

Code:
#!ipxe

ifopen

:mac-check
iseq ${netx/mac} EC:A8:6B:F5:44:9F && goto server2 ||

:server1
imgfree
echo Attempting to boot from Server 1
kernel tftp://192.168.1.11/ltsp/i386/vmlinuz root=/dev/nbd0 init=/sbin/init-ltsp vt.handoff=7 nbdroot=192.168.1.11:ltsp_i386 || goto second
initrd tftp://192.168.1.11/ltsp/i386/initrd.img || goto second
boot ||

:server2
imgfree
echo Attempting to boot from Server 2
kernel tftp://192.168.1.12/ltsp/i386/vmlinuz root=/dev/nbd0 init=/sbin/init-ltsp vt.handoff=7 nbdroot=192.168.1.12:ltsp_i386 || goto first
initrd tftp://192.168.1.12/ltsp/i386/initrd.img || goto first
boot || goto first

But the client with MAC address EC:A8:6B:F5:44:9F still boots from server1, not server2 as it should. Where am I going wrong?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Boot based on MAC - gdi2k - 2014-04-21 12:11
RE: Boot based on MAC - robinsmidsrod - 2014-05-19, 09:13
RE: Boot based on MAC - gdi2k - 2014-05-19, 11:28



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