iPXE/iSCSI diskless boot

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

Marsh

Moderator
May 12, 2013
2,645
1,496
113
Starting a new thread to document diskless boot in my home lab.

I was planning to write few posts regarding my cheap lab setup. Thanksgiving holiday got into the way.
My name is Bob, I am 58 and retired in year 2000 from working in IT field for 20years. I am addicted to buying and playing with IT equipment.
I lived near Frys electronic store, that doesn't help with my addiction problem.

I purchased 3 Dell C6100 in May, and few other HP servers as well. Every time someone post in a good deal in section, my money flying out of my wallet.
All I am using for my equipment is to mess around and not for any production use. So max performance is not my highest priorities.

Let me describe my lab iPXE boot setup. I am running Xpenology on 2 HP N40L 5x3TB drives , 3 servers make from AMD FM1 motherboard and A4, or A8 CPU ( Year 2012 black friday specials $25 motherboard and $25 AMD A4 CPU) and 6x3TB drives , 1 Ggiabyte ITX with SSD. BTW, the AMD FM1 systems work great and low power as well.

If you have a real Synology SAN, then you can skip this part. Otherwise take a look at the Xpenology forum.
XPEnology DS3612xs DSM 4.2 build 3211++ (repack v1.2)

I compare the Xpenology vs Miscrosoft iSCSI target vs Starwind free version.
The Xpenology fit into my lab the best.
Pro:
work really well with low end cpu and motherboard (Frys special) that I could pickup for few peanuts.
Web GUI to assign iSCSI LUN to target , faster than using Window copy and paste
Able to assign "friendly name" to iSCSI LUN and Target. i.e. name "WS12R2-Sysprep" to iSCSI LUN1 , or Node1 to a iSCSI target
Clone iSCSI LUN, save disk space and time.
example: 12 Window 2012R2 OS image, do not require 12 x 10gb, only the parent iSCSI LUN is 10gb, the child iSCSI LUN is not a full copy.

That's it for now, more on iPXE tomorrow.
 

Marsh

Moderator
May 12, 2013
2,645
1,496
113
If you have a real Synology SAN, then skip this part.

For Xpenology installation, there is a fantastic installation guide here: XPEnology NAS - View topic - Installing XPEnology in PC

For stable version of Xpenology see: XPEnology NAS - View topic - XPEnology DS3612xs DSM 4.2 build 3211++ (repack v1.2)

HP Miscroserver guide: XPEnology NAS - View topic - HP N54L Microserver - Getting Everything Working


Guide: Edit serial number and MAC address for your XPEnology. If you want to run multiple Xpenology servers, like in my lab, I have 6 Xpenology servers.
XPEnology NAS - View topic - Guide: Edit serial number and MAC address for your XPEnology
 

Marsh

Moderator
May 12, 2013
2,645
1,496
113
Screen shot of the iSCSI target
https://drive.google.com/file/d/0B4KtKtzEl6d7OHhLZmNnZnNJQ01iV25HdncxekVkdUR6cW1z/edit?usp=sharing

Main points to remember when you creating iSCSI LUN is to use "Advanced LUN features". For cloning and snapshot of iSCSI LUN.
I used SSD drive, so I wanted to use "Thin Provisioning" when I created the iSCSI LUN.
During creation of iSCSI target , be sure to select "Multiple Sessions" to "Enable". If you forgot to enable "Multiple Sessions", Microsoft Windows would not boot.
 

Chuntzu

Active Member
Jun 30, 2013
383
98
28
Great information, this is something I have been working on for some time. Stickied on the ipxe forum is a link to a sample menu with some really good examples for boot from iscsi, boot from iscsi and then boot and iso image, and boot live linux disks. I am really excited to see some working examples of set ups people use.
 

Biren78

Active Member
Jan 16, 2013
550
94
28
Great information, this is something I have been working on for some time. Stickied on the ipxe forum is a link to a sample menu with some really good examples for boot from iscsi, boot from iscsi and then boot and iso image, and boot live linux disks. I am really excited to see some working examples of set ups people use.
Do you happen to have a link to that? Seems similar to what I am trying to do: http://forums.servethehome.com/processors-motherboards/2763-gigabyte-ga-c1007un-d.html#post24362

Patrick when this is done can you clean up? Maybe help with images or post order?
 

Chuntzu

Active Member
Jun 30, 2013
383
98
28

Marsh

Moderator
May 12, 2013
2,645
1,496
113
I apologize not to write up entire guide post in one setting.

Let me describe my iPXE environment .
I like to keep using DD-WRT router as my lab internet router and DHCP server.
I am a lazy person, I spent years in IT and believed in KISS, also due to my "old" age and fading memory.
I doubt anyone would hire me today, my LAB is for fun and a bit of learning,

My main workstation is Window 8 hosting Hyper-V ,Remote Desktop Client, SSH and Telnet Client. I like to keep using it as well.

To setup DHCP , iPXE server, tftpboot server, HTTP server for iPXE booting:
I found a gentleman put together the entire package in a very tiny package, call tinypxeserver
the server binary is only 968KB. I love internet, the tiny pxe server is free and just download the zip file, unzip the file, and double click the binary.
You are 90% ready for diskless boot.

Tiny PXE server Tiny PXE Server - Boot from USB / Boot anywhere - reboot.pro
First post contains the download link of tinypxeserver.

The default behavior is using a "menu" system like Biren78 prefer, the menu allow you to customize booting different flavor of Linux live CD.
You will need to populate the boot files in the sub-directory.

I keep all my noisy computer in the other side of the house, I don't like to use keyboard and monitor. I want the host boot to OS without my intervention, and I could still control which OS to boot using Xpenolgy SAN server web GUI.
 

Marsh

Moderator
May 12, 2013
2,645
1,496
113
I modify the TinyPXE server to host different ipxe config file to send back based on requester network MAC address.

I think showing you my config.ini would be more helpful

[dhcp]
;needed to tell TFTPd where is the root folder
root=files
;boot file - can be empty if you boot directly with ipxe/gpxe rather than intel pxe agent
filename=ipxe-undionly.kpxe
;filename=ipxe.pxe
;alternative boot file is request comes from ipxe or gpxe
;altfilename=menu.ipxe
;altfilename=http://${dhcp-server}/menu.ipxe

; Bob changed to send back different ipxe config based on requester mac address
altfilename=http://${next-server}/nodes/@mac.ipxe

;my gpxe / ipxe dhcp options
optextra=175.6.1.1.1.8.1.1
;start HTTPd
httpd=1
binl=0
; Bob changed to start=1
start=1
tftpd=1
; Bob changed to use proxy dhcp instead build in dhcpd
proxydhcp=1
;opt1=
;opt3=
;opt6=
;opt28=
;opt15=
;opt17=
;opt67=;
;opt66=
;opt43=
;poolstart=
;poolsize=
[frmDHCPServer]
top=22
left=493
[frmAbout]
top=486
left=509

I created a sub-directory "nodes" in PXESRV\files directory to host my machine ipxe config files.
; Bob changed to send back different ipxe config based on requester mac address
altfilename=http://${next-server}/nodes/@mac.ipxe

For example, my node 4 have mac address 00-1B-78-56-41-04 then I created "00-1B-78-56-41-04.ipxe" file in PXESRV\files\nodes
Example of PXESRV\files\nodes\00-1B-78-56-41-04.ipxe
#!ipxe
### Node 4 00-1B-78-56-41-04
dhcp net0
# Workaround microsoft iscsi bug creating false gateway
set gateway 0.0.0.0
set initiator-iqn testlab
### xpen6 SSD iSCSI boot server iSCSI target 4
set root-path iscsi:192.168.1.63:tcp:3260:0:iqn.2000-01.com.synology:XPEN6.name3
set keep-san 1
sanboot ${root-path}

Instead of remembering each node's mac address, I created a sym-link from 00-1B-78-56-41-04.ipxe to Node4.ipxe , next time, I just edit node4.ipxe file.
 

Marsh

Moderator
May 12, 2013
2,645
1,496
113
I want to keep my DD-WRT dhcp server, so I used the proxydhcp function within TinyPXE server.
; Bob changed to use proxy dhcp instead build in dhcpd
proxydhcp=1

If you decided to use the buildin DHCPD, then you need to use ${dhcp-server} instead of ${next-server}
altfilename=http://${dhcp-server}/nodes/@mac.ipxe

Please see ipxe.org for their excellent documentations

Go into host BIOS setup menu to enable PXE boot , I usually setup my boot order "USB Key" then "Network Boot".
Reboot the host, watch the PXE boot progress on the monitor. Also watch the tinypxeserver log window, it will show you requester MAC address and response from tinypxeserver. I usually catch my typo by watching the log window.

The ipxe chain load process takes approx 10-20 second for me and you can see success or fail on your computer's monitor.

If one is prefer Linux hosting ipxe boot, there are many blog sites that documented all the necessary steps. I really appreciated the simplicity of tinypxeserver package, the author did a fantastic job. Just download, unzip, modify config.ini, run the program, all could be done in less than 5 min.
 
Last edited: