[HOWTO] PXE-Boot various systems

    • [HOWTO] PXE-Boot various systems

      PXE-Boot various systems

      PXE-Boot
      If you're looking to perform a lot of system recovery, or system installation, then network booting with PXE is ideal. PXE allows you to boot up a system and have it automatically get an IP address via DHCP and start booting a kernel over the network.

      PXE itself stands for "Pre-boot eXecution Environment", which describes how it works in the sense that the clients using it haven't booted in a traditional manner.
      source: debian-administration.org/arti…r_for_PXE_network_booting

      I have this systems setup for PXE-Boot, which are working flawless:
      • Ubuntu Live-CDs 32 and 64bit
      • Kubuntu Live-CDs 32 and 64bit
      • Linux Mint XY Cinnamon and KDE
      • OpenELEC with /home on NFS
      • ReDo 1.04
      • Clonezilla with NFS-Share automounted (for Data-Recovery)
      • PartedMagic ISO (is $4.99 lately)
      • Desinfec't - AntivirusDVD from c't (german computer magazine)
      • WinPE 3.0 ISO


      1. Configure your DHCP-Server for PXE-Booting
      debian-administration.org/articles/478 (eng)
      wiki.ubuntuusers.de/PXE-Boot (ger)

      2. Create a Share in OMV for TFTP and setup TFTP with it:


      3. Create a Share in OMV for NFS

      I have different NFS-Shares for this
      a) for Images from Clonezilla (for Backup)
      b) for OpenELEC-home. My OpenElec-Machine doesn't need a USB- or Harddrive with this. Thx to marcelbeck for the hint
      c) a readonly NFS-Share for the PXE-Files extracted from the ISOs

      4. Create a graphical Menu for PXE-Boot
      gtkdb.de/index_7_1342.html
      I've setup my pxelinux to show a Main-menu and some submenus. So it's easier to read and to edit. Partedmagic is booted from ISO, because i can switch to a new iso very fast. DL, copy, rename, done ;)

      Here are some of my menus:
      /pxelinux.cfg/default

      Source Code

      1. default vesamenu.c32
      2. # Timout is 1/10 sec
      3. timeout 1000
      4. # ^^^ = 100 sec
      5. menu title PXE Boot Options
      6. menu background menu.png
      7. LABEL OpenElec.tv
      8. menu label ^OpenELEC XBMC-Player
      9. KERNEL /bootfiles/OpenELEC/KERNEL
      10. APPEND ip=dhcp boot=NFS=192.168.178.21:/export/NFS_PXE/OpenELEC disk=NFS=192.168.178.21:/export/Openelec_home overlay
      11. MENU SEPARATOR
      12. # x86
      13. LABEL x86
      14. MENU LABEL -> ^32Bit - OS (x86) - (K)Ubuntu
      15. KERNEL vesamenu.c32
      16. APPEND pxelinux.cfg/menu-i386
      17. # x64
      18. LABEL x64
      19. MENU LABEL -> ^64Bit - OS (x64) - (K)Ubuntu - Mint
      20. KERNEL vesamenu.c32
      21. APPEND pxelinux.cfg/menu-amd64
      22. MENU SEPARATOR
      23. # SystemRescue Backup-OS
      24. LABEL BackupRescueOS
      25. MENU LABEL -> ^SystemBackup and Rescue OS
      26. KERNEL vesamenu.c32
      27. APPEND pxelinux.cfg/menu-systemrescue
      28. MENU SEPARATOR
      29. # Windows 7 PE
      30. LABEL WIN7PE
      31. MENU LABEL -> ^Win 7 PE
      32. KERNEL vesamenu.c32
      33. APPEND pxelinux.cfg/menu-win
      34. MENU SEPARATOR
      35. # Boot from Local Media
      36. LABEL BootLocalMedia
      37. MENU LABEL Boot from local Media (HDD, etc.)
      38. LOCALBOOT 0
      Display All

      submenus:
      /pxelinux.cfg/menu-amd64

      Source Code

      1. default vesamenu.c32
      2. timeout 1000
      3. prompt 0
      4. noescape 1
      5. menu title PXE Boot Options
      6. menu background menu.png
      7. LABEL main
      8. MENU LABEL ..
      9. KERNEL vesamenu.c32
      10. APPEND pxelinux.cfg/default
      11. label ubuntu12.04_live_amd64
      12. menu label Ubuntu 12.04 Live amd64
      13. kernel /bootfiles/ubuntu-12.04-desktop-amd64/casper/vmlinuz
      14. append nfsroot=192.168.178.21:/export/NFS_PXE/ubuntu-12.04-desktop-amd64/ netboot=nfs ro file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/bootfiles/ubuntu-12.04-desktop-amd64/casper/initrd.lz locale=de_DE bootkbd=de console-setup/layoutcode=de --
      15. label kubuntu12.04_live_amd64
      16. menu label Kubuntu 12.04 Live amd64
      17. kernel /bootfiles/kubuntu-12.04-desktop-amd64/casper//vmlinuz
      18. append nfsroot=192.168.178.21:/export/NFS_PXE/kubuntu-12.04-desktop-amd64/ netboot=nfs ro file=/cdrom/preseed/kubuntu.seed boot=casper initrd=/bootfiles/kubuntu-12.04-desktop-amd64/casper//initrd.lz locale=de_DE bootkbd=de console-setup/layoutcode=de --
      19. LABEL linuxmint14.1-cinnamon_amd64
      20. menu label Mint 14.1 Cinnamon amd64
      21. kernel /bootfiles/mint14-cinnamon/casper/vmlinuz
      22. append nfsroot=192.168.178.21:/export/NFS_PXE/mint14-cinnamon/ netboot=nfs ro file=/cdrom/preseed/mint.seed boot=casper initrd=/bootfiles/mint14-cinnamon/casper/initrd.lz locale=de_DE bootkbd=de console-setup/layoutcode=de --
      23. LABEL linuxmint14-kde_amd64
      24. menu label Mint 14 KDE amd64
      25. kernel /bootfiles/mint14-kde/casper/vmlinuz
      26. append nfsroot=192.168.178.21:/export/NFS_PXE/mint14-kde/ netboot=nfs ro file=/cdrom/preseed/mint.seed boot=casper initrd=/bootfiles/mint14-kde/casper/initrd.lz locale=de_DE bootkbd=de console-setup/layoutcode=de --
      Display All


      /pxelinux.cfg/menu-partedmagic

      Source Code

      1. default vesamenu.c32
      2. timeout 1000
      3. prompt 0
      4. noescape 1
      5. menu title PXE Boot Options
      6. menu background menu.png
      7. label back
      8. MENU LABEL ..
      9. KERNEL vesamenu.c32
      10. APPEND menu-systemrescue
      11. LABEL pmagic-2012_1010_i686
      12. menu label Parted Magic 2012-10-10 i686
      13. LINUX /memdisk
      14. INITRD /bootfiles/iso/pmagic.iso
      15. APPEND iso vmalloc=256M
      16. TEXT HELP
      17. The Parted Magic OS employs GParted and Parted to
      18. partition, while featuring other useful software.
      19. Parted Magic requires at least a i686 processor and
      20. 312MB of RAM to operate or 175MB in “Live” mode.
      21. ENDTEXT
      22. LABEL pmagic-2012_1010_x64
      23. menu label Parted Magic 2012-10-10 x86_64
      24. LINUX /memdisk
      25. INITRD /bootfiles/iso/pmagic_x86_64.iso
      26. APPEND iso vmalloc=256M
      27. TEXT HELP
      28. The Parted Magic OS employs core programs of GParted and Parted to
      29. handle partitioning tasks with ease, while featuring other useful
      30. software. Parted Magic requires at least a i686 processor and
      31. 312MB of RAM to operate or 175MB in “Live” mode.
      32. ENDTEXT
      Display All


      /pxelinux.cfg/menu-dban (abstract) with a "fake-menu"

      Source Code

      1. LABEL Disclaimer1
      2. MENU LABEL You know what you're doing?
      3. MENU DISABLE
      4. LABEL dban-2.2.7.i586
      5. menu label Darik's Boot And Nuke DBAN 2.2.7
      6. LINUX /memdisk
      7. INITRD /bootfiles/iso/dban-2.2.7_i586.iso
      8. APPEND iso vmalloc=256M
      9. TEXT HELP
      10. Limitations include:
      11. We don't guarantee secure data erasure
      12. Limited hardware support (eg. no RAID dismantling)
      13. No customer support
      14. DBAN is a self-contained boot disk that can automatically and completely deletes the
      15. contents of any hard disk that it can detect. DBAN prevents or thoroughly hinders
      16. all known techniques of hard disk forensic analysis.
      17. ENDTEXT
      Display All


      5. Setup all OSes you want for PXE-Booting
      you find many here and search for "PXE"
      Look here for OpenELEC with home on NFS
      Files
      "Glowing days. Don't cry because they are over. Smile because they happened." - Confucius

      Server: 1x 32GB SSD (system) - 5x 2TB Data - 1x 2TB Snapraid-Parity - latest OMV 1.x
      No Support through PM
      Tutorials --- Howto install OMV-Extras --- Upgrade/Update-Problems --- If autoshutdown doesn' -work

      The post was edited 1 time, last by Solo0815: Added Tags ().

    • Re: [HOWTO] PXE-Boot various systems

      That is something I would love to have setup. Thanks for the info :)
      omv 4.1.13 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • Re: [HOWTO] PXE-Boot various systems

      "crimsonblaed" wrote:

      "Solo0815" wrote:

      b) for OpenELEC-home. My OpenElec-Machine doesn't need a USB- or Harddrive with this. Thx to marcelbeck for the hint


      Gday Solo0815 (not surer why it quoted as Spy Alelo? ),

      Could you explain this further, do you mean that you do not have Openelec physically installed on a client machine?

      Thats right, i can boot it from every machine without installing it on it. XBMC (OpenELEC) creates a userdata-folder for every MAC-adress. If i want to have the same settings, i can just copy the settings from one folder to another. With a MySQL-Server running in OMV, XBMC has even the same Database.
      "Glowing days. Don't cry because they are over. Smile because they happened." - Confucius

      Server: 1x 32GB SSD (system) - 5x 2TB Data - 1x 2TB Snapraid-Parity - latest OMV 1.x
      No Support through PM
      Tutorials --- Howto install OMV-Extras --- Upgrade/Update-Problems --- If autoshutdown doesn' -work
    • Re: [HOWTO] PXE-Boot various systems

      Thanks for posting this as I have been wanting to set something like this up

      I have been trying to set it up but getting nowhere fast lol

      As my router supports dnsmasq I decided to keep my router doing DHCP stuff and just add this line to /etc/dnsmasq.conf (on the router)

      Source Code

      1. dhcp-boot=pxelinux.0,HOMESERVER,192.168.123.31


      I have got a lot further since I started this post and I can boot a remote machine and it sees the routers DHCP and then loads the TFTP file but fails finding the kernel for openelec :(

      Source Code

      1. DEFAULT OpenElec.tv
      2. PROMPT 0
      3. LABEL OpenElec.tv
      4. KERNEL openelec/KERNEL
      5. APPEND ip=dhcp boot=NFS=192.168.123.31:/export/NFS/openelec disk=NFS=192.168.123.31:/export/NFS/openelec/storage overlay


      I believe the problem is with the above file but as I have never used NFS before I am not sure on the correct mount points, also what do I need to add to the NFS section to allow all lan clients to be able to access PXE images?

      Thanks for looking

      Miller
      [IMG:http://widgets.trakt.tv/users/1f5d0f5ed67f98ed9d06d9849b42dd0e/watched/banner@1x.jpg]
      What I am watching/watched on my Popcorn Hour media player
      omv 2.1.1 stoneburner | 64 bit | omvextrasorg 1.29
      MySQL (Percona) | Newznab | Sonarr | CP | HP | NZBget | YAMJ | CUPS
    • Re: [HOWTO] PXE-Boot various systems

      Got a little further, I had to put the KERNEL in the TFTP folder, this allowed openelec to boot but it stopped on mkdir for the mac folder in storage. I created this folder myself and now it boots fine and files are stored in the mac folder.

      I want to look at getting other images to boot but don't want to run into the same permissions problem again so if you can offer some advice please do ;)
      [IMG:http://widgets.trakt.tv/users/1f5d0f5ed67f98ed9d06d9849b42dd0e/watched/banner@1x.jpg]
      What I am watching/watched on my Popcorn Hour media player
      omv 2.1.1 stoneburner | 64 bit | omvextrasorg 1.29
      MySQL (Percona) | Newznab | Sonarr | CP | HP | NZBget | YAMJ | CUPS
    • Re: [HOWTO] PXE-Boot various systems

      Another update

      I have managed to setup clonezilla, gparted and openelec. Unlike the OP I have 1 share for TFTP and 1 share for all PXE images but these are set into sub folders inside the NFS share.
      I fixed the permissions issue I had by doing chown nobody:nogroup on all subfolders.

      Now when I lan boot I get a menu of available systems I can boot into, I just have to type the name and off it boots :)

      Thanks to Solo0815 for the guide and also if you think of any issues with my current setup please let me know.

      Thanks
      Miller
      [IMG:http://widgets.trakt.tv/users/1f5d0f5ed67f98ed9d06d9849b42dd0e/watched/banner@1x.jpg]
      What I am watching/watched on my Popcorn Hour media player
      omv 2.1.1 stoneburner | 64 bit | omvextrasorg 1.29
      MySQL (Percona) | Newznab | Sonarr | CP | HP | NZBget | YAMJ | CUPS
    • Re: [HOWTO] PXE-Boot various systems

      I've updated the first post with my menus. Maybe someone finds it useful.
      "Glowing days. Don't cry because they are over. Smile because they happened." - Confucius

      Server: 1x 32GB SSD (system) - 5x 2TB Data - 1x 2TB Snapraid-Parity - latest OMV 1.x
      No Support through PM
      Tutorials --- Howto install OMV-Extras --- Upgrade/Update-Problems --- If autoshutdown doesn' -work
    • Re: [HOWTO] PXE-Boot various systems

      Do you know if you can use dnsmasq on a router running Tomato? I would love to keep dhcp running on Tomato and have it tell the client to look at my omv box for the pxe images.
      omv 4.1.13 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • Re: [HOWTO] PXE-Boot various systems

      I don't know, if it's working on tomato, but I'm using a setup with dnsmasq on my FritzBox with freetz:


      The router (FritzBox) is running dnsmasq. The Client gets the IP via dhcp and tells the client, where to get the boot-images -> 192.168.178.21 here, my OMV-Box.
      Files
      "Glowing days. Don't cry because they are over. Smile because they happened." - Confucius

      Server: 1x 32GB SSD (system) - 5x 2TB Data - 1x 2TB Snapraid-Parity - latest OMV 1.x
      No Support through PM
      Tutorials --- Howto install OMV-Extras --- Upgrade/Update-Problems --- If autoshutdown doesn' -work
    • Re: [HOWTO] PXE-Boot various systems

      Thanks! That helped me find this article about tomato. Basically, I just add the following line to the dhcp/dns custom configuration:

      dhcp-boot=pxelinux.0,,192.168.1.12

      Then, I just followed the rest of your guide :)
      omv 4.1.13 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • Re: [HOWTO] PXE-Boot various systems

      Hello!

      I try to PXE boot openmediavault and have problems with the boot menu. It finds the boot files but the installation files are missing. I can choose instalation language but have problems with cd rom. My menu file looks as below.

      Source Code

      1. MENU LABEL Openmediavault 0.5.0.24 (32-bit)
      2. KERNEL Openmediavault/0.5.0.24/i386/vmlinuz
      3. APPEND initrd=Openmediavault/0.5.0.24/i386/initrd.gz vga=normal netboot=nfs nfsroot=10.0.15.54:/export/os/Openmediavault/0.5.0.24/i386/install/preseed.cfg


      Anyone know what proplemet is?

      /Rob
    • Re: [HOWTO] PXE-Boot various systems

      You can also try to boot the OMV-iso over pxe. Just have a look at the first post under 'parted magic'
      "Glowing days. Don't cry because they are over. Smile because they happened." - Confucius

      Server: 1x 32GB SSD (system) - 5x 2TB Data - 1x 2TB Snapraid-Parity - latest OMV 1.x
      No Support through PM
      Tutorials --- Howto install OMV-Extras --- Upgrade/Update-Problems --- If autoshutdown doesn' -work
    • Re: [HOWTO] PXE-Boot various systems

      Hey guys,

      So I've messed around with this TFTP server, and tho I've done it many times on windows machines - this is making me wanna pull out whats left of my grey hair.

      I've tried following the OP examples, but I think I'm missing some shares etc.

      This is what I've accomplished already:

      - Router forwarding command: dhcp-boot=pxelinux.0,NAS.local,192.168.1.10
      - Made a TFTP share in OMV
      - Made the pxelinux.cfg folder in the TFTP share root
      - In that folder, I've got the default file - with the example from OP
      - Copied OpenElec latest, and adapted the default file.

      Now when I try to boot a new machine on VMWare enviroment, it can find the server, but crashes instantly.. (maybe a kernel error)

      Could someone help me by remotedesktop session, or point me to a complete tut for this??
      I use Teamviewer for remotedesktop btw :)

      Hope there's a kind soul out there :)
    • Re: [HOWTO] PXE-Boot various systems

      Did you setup nfs? Post your pxelinux.cfg/default file?

      Kids won't leave me alone long enough to do teamviewer right now.
      omv 4.1.13 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • Re: [HOWTO] PXE-Boot various systems

      Do you have the right OpenElec for your machine?
      The "Generic" builds should be the right ones to start., maybe you can try the "Generic OSS" with more drivers
      "Glowing days. Don't cry because they are over. Smile because they happened." - Confucius

      Server: 1x 32GB SSD (system) - 5x 2TB Data - 1x 2TB Snapraid-Parity - latest OMV 1.x
      No Support through PM
      Tutorials --- Howto install OMV-Extras --- Upgrade/Update-Problems --- If autoshutdown doesn' -work