Koozali.org: home of the SME Server

Booting a Windows ISO via PXE

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: Booting a Windows ISO via PXE
« Reply #15 on: April 04, 2022, 01:35:55 PM »
Quote
So to get it running you can do this:

Hmm - note that to work correctly we would also need to modify references here from tftpd to tftp :

/var/service/tftpd/run

...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: Booting a Windows ISO via PXE
« Reply #16 on: April 04, 2022, 02:03:08 PM »
And in the thinclient contrib as well.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: Booting a Windows ISO via PXE
« Reply #17 on: April 04, 2022, 05:39:06 PM »
Ahhh - and whilst hacking this about I have found a whole pile of other bits that are completely wrong with the tftp contrib itself.

I'll get it fixed ASAP.

Please follow the bugs and test when I get something built.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Jean-Philippe Pialasse

  • *
  • 2,743
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: Booting a Windows ISO via PXE
« Reply #18 on: April 04, 2022, 07:06:41 PM »
could it be only a systemd service rather than a runit supervised one?

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: Booting a Windows ISO via PXE
« Reply #19 on: April 04, 2022, 07:32:36 PM »
could it be only a systemd service rather than a runit supervised one?

There are two unit files - one is tftp.service and one is tftp.socket

I can run the tftp.service via Koozali services happily now and tftp files (when the socket is running), but I can't get the socket to run properly under Koozali services because 'socket' is not recognised as a service despite having a systemd unit file blah blah.

The socket can be used to control access - eg local IP only or wider, Ipv4/IPv6 etc.

Code: [Select]
Information: tftp.socket is not defined in configuration DB.
I have done most of the rest but it will need some of your tricks to get that running.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline gzartman

  • *
  • 305
  • +0/-0
    • LEI Engineering & Surveying
Re: Booting a Windows ISO via PXE
« Reply #20 on: April 05, 2022, 02:25:40 AM »
I have to ask why you are hoping to use PXE to install windows versus using an ISO on a USB stick?  Are you managing machines remotely or something?

I run Windows Server Essentials as my PDC and this version of Windows includes some built-in functionality that is supposed to be turnkey for things like this, but it tends to take more time to configure and manage than you get as a benefit of having the ISO hosted.

I have found it easier and much less time consuming in the long run to create a smb share that I call "ISOS" and then I drop the latest versions of the ISOs there.  I use RUFUS to burn ISOs to usbsticks and then use them to install the various OSs.

YMMV
----
Greg J. Zartman
LEI Engineering & Surveying

SME user and community member since 2000.

Offline TerryF

  • grumpy old man
  • *
  • 1,821
  • +6/-0
Re: Booting a Windows ISO via PXE
« Reply #21 on: April 05, 2022, 03:09:50 AM »
With Greg, KISS..
--
qui scribit bis legit

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: Booting a Windows ISO via PXE
« Reply #22 on: April 05, 2022, 10:16:00 AM »
He does explain it in his opening post.

Restore Windows boxen & Voip phone provision (which I do myself).

I also have some rescue/recovery ISOs on mine too. Saves me forgetting where I left my USB!!

Windows is not great at PXE booting from the looks of it though. Why doesn't that surprise me!!

It has highlighted some serious deficiencies in the tftp contrib which I'm fixing (trying to fix). Pray for me with systemD.

...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline gzartman

  • *
  • 305
  • +0/-0
    • LEI Engineering & Surveying
Re: Booting a Windows ISO via PXE
« Reply #23 on: April 06, 2022, 05:31:27 PM »
Windows is not great at PXE booting from the looks of it though. Why doesn't that surprise me!!

It's really not, especially if you need to inject some drivers during the install such as in the case of the use of motherboard based RAID.  You'll be dead in the water with PXE install because the Windows ISOs don't include these manufacture specific windows only drivers.   There are many other situations like this with the windows install since alot of vendors make hardware that is designed specific to Windows and requires a special driver.   

Having PXE isos handy for things like the offline RAID utility for HP Proliant boxes is certainly handy though, but in this case the OP only mentioned Windows machines.   This is what I was responding to - installing Windows from a ISO via PXE. As I previously stated, even the Windows Server implementation of this is really bad.

In my case, as I would imagine in most small LANS (businesses), I only need to install Windows from the ISO a hand full times a year \.  Burning a new USB stick with the latest ISO and any needed drives is usually the fastest solution that takes 10min unless I need to go look for some drivers to include in with the USB Stick.    There isn't any "losing" the USB stick since it's made fresh before each install.  The OP has already spent more time talking about this topic than it would take for him to us the USB stick method for Windows client installs on multiple machines.

KISS
« Last Edit: April 07, 2022, 07:56:08 AM by gzartman »
----
Greg J. Zartman
LEI Engineering & Surveying

SME user and community member since 2000.

Offline Drifting

  • ****
  • 431
  • +0/-0
Re: Booting a Windows ISO via PXE
« Reply #24 on: April 11, 2022, 02:42:58 PM »
Thanks for the info on the bug, that explained a lot!
So used to blaming me missreading something.

Anyway, progress, followed your instructions from about, about copying pxelinux.0 etc into root, and others into the com32. Can TFTP in now, and get a file, which is progress. But when I try and boot PXE, zilch, nada, had a look at the log in messages, nothing I could see in there, in fact nothing at all tftpd pxe booting, only the request for a file?
Sorry did not understand what you meant in the other part of your message "/var/log/tftpd/current (or journactl)" Could not see that in the list of logs avialable. (Sorry If I am being dumb here)

Paul.
Infamy, Infamy, they all have it in for me!

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: Booting a Windows ISO via PXE
« Reply #25 on: April 11, 2022, 04:29:49 PM »
Paul - there is an updated version in testing.

See Bugs 11927 and 11928 - don't use earlier versions. add yourself to the bugs so you can follow them.

* Mon Apr 11 2022 John Crisp <jcrisp@safeandsoundit.co.uk> 1.2-10.sme
- Update systemd unit files [SME: 11927]
- Migrate db from tftpd to tftp [SME: 11928]

Code: [Select]
yum --enablerepo=smetest install smeserver-tftp-server
(I'd remove any earlier versions)

Check it runs with

Code: [Select]
systemctl status tftp
It depends on this running:

Code: [Select]
systemctl status tftp.socket
Check the detials:

systemctl cat tftp.service

Logging:

Code: [Select]
journalctl -u tftp.service -b
Or

Code: [Select]
journalctl -u tftp.service
You might want to set:

Code: [Select]
tftp log verbose
and

Code: [Select]
signal-event smeserver-tftp-update
(that should work!! Check for -vv in the unit file)

Logging is limited and a lot of guesswork is required :-)

You have to understand what PXE does, and does not do! Plenty of reading online about it.

This is quite concise.

https://www.system-rescue.org/manual/PXE_network_booting/

Not that it boots the basic kernel image and initramfs via PXE and then the rest via http.

You can use a plain http ibay for that as a test. A lot of systems would require NFS (Or only allow NFS)

If you want a real bootable Linux try a small version like Slitaz. This is a config entry for I used to use for Slitaz v4 but should work for v5.

Here is your /tftpboot/pxelinux.cfg/default

Code: [Select]
DEFAULT Slitaz-5-Std
label Slitaz-5-Std
 menu label SlitaZ ^5
 kernel images/slitaz_5_0/bzImage
 append initrd=images/slitaz_5_0/rootfs4.gz,images/slitaz_5_0/rootfs3.gz,images/slitaz_5_0/rootfs2.gz,images/slitaz_5_0/rootfs1.gz rw root=/dev/null vga=normal autologin

Get the iso:

http://distro.ibiblio.org/slitaz/iso/latest/slitaz-rolling.iso

Extract the relevant files from it and put them in the right directory:

tftpboot/images/slitaz_5_0/bzImage
tftpboot/images/slitaz_5_0/rootfs4.gz
tftpboot/images/slitaz_5_0/rootfs3.gz
tftpboot/images/slitaz_5_0/rootfs2.gz
tftpboot/images/slitaz_5_0/rootfs1.gz

Just try and get ONE running - the rest will be easier.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation