[Support] Linuxserver.io - netboot.xyz


Recommended Posts

Great job, thank you!

I just successfully booted win10 installation image. Few steps, but took me couple of hours to make it work. Here how i configured it:

 

- installed netbootxyz docker (used default settings + mapped "/asset" to my image folder "/mnt/cache/appdata/ISO")

 

- configured my pfsense FW/router via webinterface. Went to services/dhcp server and specified the following options :

    IP Address of TFTP server (my unraid server IP)
    Enable network booting yes
    Next Server (my unraid server IP)
    Default Bios file name (netboot.xyz.kpxe)

 

- configured NETBOOT.XYZ via webinterface (http://unraid_IP:3000/) - in the file "boot.cfg" located under "Menus" updated variables "live_endpoint" and "win_base_url" as follow:

    set live_endpoint http://unraid_IP:8080
    set win_base_url ${live_endpoint}/WinPE/

 

- downloaded official win10 x64 iso file and extracted it via 7zip to my image folder (/mnt/cache/appdata/ISO/Win10_1903_V2/x64/). Files had to be place to subfolder x64. note: with normal Win10 iso everything went fine except when I got to the actual install phase, I was getting "A required CD/DVD drive device is missing. If you have a driver floppy disk, CD,DVD, or USB flash drive, please insert it now" message. WinPE image had to be used instead and from WinPE then install any win iso you need.

 

- created Win PE with integrated PowerShell (PowerShell needed for mounting iso images) as per instructions:

https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/winpe-adding-powershell-support-to-windows-pe

 

- uploaded the Win PE to my image folder (/mnt/cache/appdata/ISO/WinPE/x64/). Files had to be place to subfolder x64.

 

- powered on client PC and forced it to boot from LAN. It booted up to netboot menu where navigated to windows disro

 

- booted WinPE, mounted required win 10 iso file and started the installation:

    wpeinit   (initialize the network)
    net use z: \\10.0.0.16\appdata\ISO   (map z: drive to my samba image folder with official Win 10 image "Win10_1903_V2.iso")
    PowerShell   (run powershell)
    Mount-DiskImage   (mount the official iso win10 file located at z: drive z:\Win10_1903_V2.iso)
    d:\setup.exe   (run win10 installation from the mounted ISO)

 

useful links:

https://ipxe.org/howto/winpe
https://ipxe.org/wimboot

Edited by zakna
configuration steps updated
  • Like 2
Link to comment

It is really great. I've managed to create custom menu for specific client machine. Also succeeded to run Kodi/LibreELEC from network boot. Bolow my notes, might be handy for someone.

 

Kodi part:
- downloaded official LibreELEC image and extracted it via 7zip to my image folder (/mnt/cache/appdata/iso/LibreELEC-Generic.x86_64-9.2.2 - inside the folder are KERNEL, SYSTEM,.. files).
- enabled NFS on my unraid server and set share (share my appdata folder where my image folder is located)
- created a new folder for Kodi data/savings (folder system location: /mnt/cache/appdata/Kodi; nfs location: 10.0.0.16:/mnt/user/appdata/Kodi). Once you boot the Kodi, subfolder will be created there with config files. The subfolder will be named based on mac address of the client PC (in my case 1c6f65d1b67e).

 

NETBOOT.XYZ part:
- connected via webinterface - under "Menus" created new ipxe file, name of the file has to be in this format "MAC-1c6f65d1b67e.ipxe". This boot file will be then used only for system with the mac address 1c:6f:65:d1:b6:7e.
- the customed menu has 4 options (run Kodi, run Win10 install, switch to standard Netboot.xyz menu and Reboot)

 

Content of the MAC-1c6f65d1b67e.ipxe file:

#!ipxe
:custom
clear custom_choice
menu Menu for 1c:6f:65:d1:b6:7e
item --gap

item option_kodi ${space} KODI
item option_win ${space} Win10 install
item option_netboot ${space} Netboot.xyz menu
item option_reboot ${space} Reboot

choose custom_choice || goto custom_exit
goto ${custom_choice}
goto custom_exit

:option_kodi
set url http://10.0.0.16:8080/LibreELEC-Generic.x86_64-9.2.2/
kernel ${url}KERNEL ip=dhcp boot=NFS=10.0.0.16:/mnt/user/appdata/ISO/LibreELEC-Generic.x86_64-9.2.2 disk=NFS=10.0.0.16:/mnt/user/appdata/Kodi overlay
boot || goto custom_exit

:option_win
set url http://10.0.0.16:8080/Win10_1903_V2/x64
imgfree
kernel http://${boot_domain}/wimboot
initrd -n bootmgr     ${url}/bootmgr       bootmgr ||
initrd -n bootmgr.efi ${url}/bootmgr.efi   bootmgr.efi ||      
initrd -n bcd         ${url}/boot/bcd      bcd ||
initrd -n bcd         ${url}/Boot/BCD      bcd ||
initrd -n boot.sdi    ${url}/boot/boot.sdi boot.sdi ||
initrd -n boot.sdi    ${url}/Boot/boot.sdi boot.sdi ||
initrd -n boot.wim    ${url}/sources/boot.wim boot.wim
boot

:option_reboot
echo Rebooting ...
reboot

:custom_exit
exit

 

Here 2 nice tutorials on this topic:
https://www.notjustcables.co.nz/blog/index.php?/archives/8-XBMC-using-Network-Boot.html
https://blog.linuxserver.io/2019/12/16/netboot-xyz-docker-network-boot-server-pxe/

Edited by zakna
  • Like 1
Link to comment

Hello, 

I have a r6300v2, and trying to use this for PXE server. If I've read everything correctly, I more than likely won't be able to do it, as my Home router doesn't have the options accessible without having to flash it to something like dd-WRT? 

Link to comment
On 3/23/2020 at 4:36 PM, xl3b4n0nx said:

Has anyone gotten this to work with an Asus RT-AC66U or similar router? I can't figure out a way to setup my router to point machines to this docker.

  

The following DHCP configuration steps worked for my Asus-Merlin powered RT-AC86U

 

1. Go to http://192.168.1.1/Advanced_System_Content.asp and 

Enable JFFS custom scripts and configs -> Yes 

Enable SSH -> LAN only 

select SSH port as you wish. 

Apply settings and reboot device. 

 

2. Make ssh connection to your device (i use putty). Connection type SSH, router ip, your custom ssh port, 

username and password same as for GUI. 

 

3. Type: 

df -h  

Make sure that /dev/mtdblockX mounted to /jffs 

 

4. Type: 

vi /jfss/configs/dnsmasq.conf.add  

 

5. Press i to activate interactive mode and type the following (change the IP for your netboot.xyz server): 

dhcp-match=set:bios,60,PXEClient:Arch:00000 

dhcp-boot=tag:bios,netboot.xyz.kpxe,,192.168.1.3 

dhcp-match=set:efi32,60,PXEClient:Arch:00002 

dhcp-boot=tag:efi32,netboot.xyz.efi,,192.168.1.3 

dhcp-match=set:efi32-1,60,PXEClient:Arch:00006 

dhcp-boot=tag:efi32-1,netboot.xyz.efi,,192.168.1.3 

dhcp-match=set:efi64,60,PXEClient:Arch:00007 

dhcp-boot=tag:efi64,netboot.xyz.efi,,192.168.1.3 

dhcp-match=set:efi64-1,60,PXEClient:Arch:00008 

dhcp-boot=tag:efi64-1,netboot.xyz.efi,,192.168.1.3 

dhcp-match=set:efi64-2,60,PXEClient:Arch:00009 

dhcp-boot=tag:efi64-2,netboot.xyz.efi,,192.168.1.3 

 

press ESC then press :qw! and press ENTER

 

6. Type reboot or recycle the services with service restart_dnsmasq and service restart_dhcp 

  • Like 2
Link to comment
  • 4 weeks later...

I was just looking for some documentation about pxe booting as i'm fed up with usb key i always lose.

Thanks for that nice docker, it looks awesome.

For now i know nothing about pxe booting and how to use netboot.xyz.

Docker is pretty easily setup but now i've to learn how to add iso that are not maintained remotely.

 

I see that you can pull images to have it locally accessible but i don't know the difference between the different options.

For example if i want to install a debian stable what version do i have to pull:

squashfs, vmlinuz or initrd ?

 

if i want to install windows using the provided menu, i guess i have to put an win iso somewhere but where ?

Link to comment
1 hour ago, caplam said:

I was just looking for some documentation about pxe booting as i'm fed up with usb key i always lose.

Thanks for that nice docker, it looks awesome.

For now i know nothing about pxe booting and how to use netboot.xyz.

Docker is pretty easily setup but now i've to learn how to add iso that are not maintained remotely.

 

I see that you can pull images to have it locally accessible but i don't know the difference between the different options.

For example if i want to install a debian stable what version do i have to pull:

squashfs, vmlinuz or initrd ?

 

if i want to install windows using the provided menu, i guess i have to put an win iso somewhere but where ?

You need all the files locally, but you also have to modify the settings file for the entry you are booting, or else it will download the files.

 

Windows boot is not so easily done, but there might be some guides online.

 

You can also check our blog, https://blog.linuxserver.io for a quick start for netboot.

Link to comment

thanks for your answer.

Unfortunately i have a very weak connexion so boot from images stored on github is not an option for me. I have to store all images i want locally.

I guess i will start with a vm to try. 

When i modify an entry in boot.cfg or in a submenu do i have to restart docker ?

Link to comment
22 minutes ago, caplam said:

thanks for your answer.

Unfortunately i have a very weak connexion so boot from images stored on github is not an option for me. I have to store all images i want locally.

I guess i will start with a vm to try. 

When i modify an entry in boot.cfg or in a submenu do i have to restart docker ?

No need to restart.

Link to comment

i spend my all day pulling some images to use locally.

I'm quite a bit disappointed as very few are working out of the box.

I modified live_endpoint in boot.cfg and that part is ok. 

I installed a linuxmint vm with an iso as the image pulled (squashfs) couldn't boot with error message rootfs not detected despite the squashfs file was present.

My vm installed with lvm automatic partitioning (which is not convenient as /home is in the root partition). I needed to resize lvroot to make a lvhome.

So i thought with all utilities on the menu i  will find one to resize my lvroot. I was able to boot gparted but it can't resize lv.

Kaperski live booted load files from server but stopped with displaying no network connection which is strange as it downloaded files from the server.

Rescatux boot but stop at some point complaining about the lack of screen.

System rescue cd stopped on error failed to mount /dev/loop0

I can boot debian live but the keyboard is not responsive i have to hit 2 or 3 times the keys, not very convenient when locales are not set correctly. When i try to reconfigure locale the booting process shows up as soon as i try to move cursor.

I continue my tries but the learning curve will probably be too steep for the time i have.

Edited by caplam
Link to comment
  • 3 weeks later...

Hi !

I installed the netboot docker, configured my router, everything work fine.

BUT ! when the PXE boot, it retrieve the menu from boot.netboot.xyz

 

I customised the menu in the web interface, and change the live_point on my boot.cfg but it still go to boot.netboot.xyz to get the menu and the assets.

 

Any idea how to force the PXE to retrieve menu etc... from my docker instead of netboot site ?

 

My goal is to add preseed in debian.ipxe instead of typing the preseed link each time.

 

Thanks

 

Link to comment
On 7/17/2020 at 6:01 PM, nerkdesign said:

Hi !

I installed the netboot docker, configured my router, everything work fine.

BUT ! when the PXE boot, it retrieve the menu from boot.netboot.xyz

 

I customised the menu in the web interface, and change the live_point on my boot.cfg but it still go to boot.netboot.xyz to get the menu and the assets.

 

Any idea how to force the PXE to retrieve menu etc... from my docker instead of netboot site ?

 

My goal is to add preseed in debian.ipxe instead of typing the preseed link each time.

 

Thanks

 

Have you "chained" the boot.cfg to your menu script? Following setup works for me:

 

- in the webinterface under "Local Assets" I downloaded "debian-10-live-kernel" (initrd+vmlinuz) and "debian-10-kde-squash"

- boot.cfg file updated with:

set live_endpoint http://10.0.0.16:8080

- menu.ipxe:

#!ipxe
###
### custom menu
###

:start
chain --autofree boot.cfg ||

:custom
clear custom_choice
menu Menu
item --gap
item option_debian ${space} Debian 10 Kde live
item option_reboot ${space} Reboot

choose custom_choice || goto custom_exit
goto ${custom_choice}
goto custom_exit

:option_debian
set squash_url ${live_endpoint}/debian-squash/releases/download/10.4.0-4403d54d/filesystem.squashfs
set kernel_url ${live_endpoint}/debian-core-10/releases/download/10.4.0-a6a0d71a/
imgfree
kernel ${kernel_url}vmlinuz ip=dhcp boot=live fetch=${squash_url} initrd=initrd
initrd ${kernel_url}initrd
boot

:option_reboot
echo Rebooting ...
reboot

:custom_exit
exit

note:  in addition to predefined netboot config (live-debian.ipxe), i had to add "ip=dhcp" parametr to the kernel command to make it work

note2: the additional param "ip=dhcp" is not needed. The issue I had seems related to my network, sometime dhcp server takes longer than 15s to answer the request, which cause timeout/boot failure. Fixed this problem by param "ethdevice-timeout=40" which extends default 15s timeout to 40s.

Edited by zakna
note2 added
  • Like 1
Link to comment
  • 2 weeks later...

Is anyone able to get a VM running on unraid able to talk to netboot.xyz?

 

I have it all setup as documented in my Unifi configuration, I just get no pxe boot from a VM.

 

edit: pxe boot happened once, and it's gone again.. it's like I am not getting the DHCP request.

 

edit 2: I figured it out, with Unifi USG, I had to add the following dhcp options

NAME: code_93
CODE: 93
TYPE: Unsigned integer 16

 

Edited by spyd4r
Link to comment
  • 3 weeks later...

So I had to bounce around quite a bit here to figure out how to get this to work *EASILY* with a Windows 10 install. I figure I'd post what worked for me. This is largely based off what zakna did with a few additional steps and a little clarification.

 

1. Follow his guide up to here:

Quote

set win_base_url ${live_endpoint}/WinPE/

 

That did not work for me. It gave me a double // in the command to find the WinPE files. I used this and it worked:

set win_base_url ${live_endpoint}/WinPE

 

2. WinPE gave me some headaches until I realized the folder you produce when you create the WinPE files (\media) contained all the actual WinPE files. Duh. So your file structure should be \WinPE\x64\ALL THE FILES FROM \media\ WHEN YOU CREATE WinPE. It should have a bunch of folders (bg-bg, Boot, EFI, etc) and bootmgr and bootmgr.efi. That got me actually booting into WinPE.

 

I did not add Powershell to my WinPE. It was not needed.

 

3. Once you are booting WinPE you can add a few files to your system to automatically start the Windows install. You will need to create two files.

 

First create "winpeshl.ini". In that file we tell WinPE to run the next file we'll create. So add this to winpeshl.ini

 

[LaunchApps]
"install.bat"

Save that file and create a new file called "install.bat". Add this to install.bat:

 

wpeinit
net use \\YOUR_UNRAID_IP\isos
\\YOUR_UNRAID_IP\isos\win10\setup.exe

That is assuming you keep your OS Isos in a similar directory. Make sure the net use command is the directory proceeding your extracted Windows 10 directory. Also for some reason it didn't like spaces in my Windows install directory (it was Windows 10 before I changed it to win10). Just something to be aware of.

 

Now take the two files you created and copy them to your "\appdata\netbootxyz\menus" folder.

 

In that folder is the windows.ipxe file. Edit that file. Scroll down to the end of the file and edit the file to include two lines right after "kernel http://${boot_domain}/wimboot":

initrd install.bat http://${boot_domain}/install.bat
initrd winpeshl.ini http://${boot_domain}/winpeshl.ini

Save that file, boot from your network and start the Windows installer. It should take you right into a standard Windows 10 install.

 

 

 

Edited by total
  • Like 2
Link to comment
  • 2 months later...

I installed and setup the unraid side as well as my Ubiquiti firewall/network. Still no go.

 

Currently getting PXE-E18: server response timeout.

 

The local assets are there.

I temporarily disabled my entire firewall just to make sure.

Any thoughts?

 

Start PXE over IPv4
Station IP address is 172.16.0.163

Server IP address is 192.16.0.2
NBP filename is boot.cfg
NBP filesize is 0 Bytes
PXE-E18: Server response timeout.

 

Link to comment
  • 3 weeks later...
On 5/22/2020 at 2:58 AM, zakna said:

- configured NETBOOT.XYZ via webinterface (http://unraid_IP:3000/) - in the file "boot.cfg" located under "Menus" updated variables "live_endpoint" and "win_base_url" as follow:

    set live_endpoint http://unraid_IP:8080
    set win_base_url ${live_endpoint}/WinPE/

Hi.  Trying to follow the steps you laid out here.  Currently, under my Menu, there's no boot.cfg file.  Did you create a new one called boot.cfg and updated the variables you mentioned above?

Link to comment

boot.cfg should be there by default, didn't create a new one, just edited existing.

 

note: if you are going to update the win_base_url variable, do not put forward slash at the end of the path (see above the post from user total) as some machines might have issue with it

obrazek.thumb.png.afb9d7d80095d8990f5cf406c11175b8.png

Link to comment

Mine doesn't come with one.  I thought I might have deleted it sometime ago.  I reinstalled the docker container from scratch.  Deleting the previous folder as well, to make sure everything new is put in place.  Still, there's no boot.cfg on the newly installed container.

Edited by jang430
Link to comment
On 12/9/2020 at 8:37 PM, Jerrywoo96 said:

anyone knows how to load and chain custom.ipxe from docker -v ?

What do you mean by this or what is your goal ?

 

If you want to boot your own menu, i'm aware about following 3 solutions:

 

1) just customize "menu.ipxe" to your needs. You can always revert back to default setup with a single click.

 

2) create a new ipxe file based on client MAC address (example MAC-1c6f65d1b67e.ipxe) or hostname (HOSTNAME-myhostname.ipxe). Those files/menus will be prioritized during the boot process.

 

3) update "menu.ipxe" by adding a new item entry, which will point to your custom.ipxe file.

 

item custom-user ${space} Custom menu

:custom-user
chain custom/custom.ipxe
goto main_menu

 

Link to comment
  • 1 month later...

I'm struggling to boot live media from the netboot docker and i have no idea what I'm doing wrong.

- I set up the live endpoint correctly (i had to reroute port 8080 to 8069 cause it was already used in another container but it works. i can navigate it fine)

- I downloaded the assets (in my case i tried popos 20.04 and ubuntu mate 20.10 and i can see them in  192.168.8.105:8069/.. etc )

- I set up a vmware vm that boot into pxe and i get this error (see attached image). I get the error whenever i boot popos or ubuntu mate live

 

I tried Ultimate boot cd and works ( i had to download it manually and change the name cause there is a version mismatch in netboot config files)

I tried ubuntu network install 20.10 and works, gparted works, clonezilla ubuntu stable works

 

VM has plenty of ram (8G) and disk (64G) and is in bridge mode so it has its own ip and mac

DHCP is provided by my pfsense and is configured correctly

 

2021-01-23 18_23_15-poptest - VMware Workstation 15 Player (Non-commercial use only).jpg

Link to comment

Based on the output it looks it start to download the image from netboot and then crash at 89%, might be VM related. Do you experience the same problem when you boot it on some different PC?

 

I just tested popos 20.04 (downloaded "pop-20.04-default-squash" (initrd+vmlinuz+filesystem.squashfs) files), works for me (apart that it boots with 2 screens enabled and installation wizard).

 

I used same boot script as in predefined "live-popos.ipxe" menu:

set squash_url ${live_endpoint}/ubuntu-squash/releases/download/5-42ebbb8e/filesystem.squashfs
set kernel_url ${live_endpoint}/ubuntu-squash/releases/download/5-42ebbb8e/
imgfree
kernel ${kernel_url}vmlinuz ip=dhcp boot=casper netboot=url url=${squash_url} initrd=initrd ${cmdline}
initrd ${kernel_url}initrd
boot

 

  • Thanks 1
Link to comment

hello i also installed netboo.xyz last week via docker-compose.


I can also boot wonderfully from it, select any live linux and it works.

but i would like to use local assets and add an extra menu item, e.g. local 


but it doesn't use a single change i set at boot.cfg menu.ipxe or live-ubuntu.ipxe. but nothing changes

does anyone have a tip?
version: 2.0.31

folders are mounted, per hostname:8080 i also see all assets

only the file changes are not noticed

 

Edited by badsmoke
typo
Link to comment

You are right, it's the stupid vmware player vm that is broken.

I tried with a vm in Unraid and it loads fine, i did not try with a physical machine yet because i use my desktop as work pc and my notebook has no ethernet.

I wonder why vmware player doesnt work

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.