Closed psychomario closed 9 years ago
See my comment from #72 in regards to this; I feel it's a bad idea to even touch Windows and it'd be more beneficial to focus our efforts in other areas.
The relevant bugs are in the bug list, so I'll close this as not worth the effort.
So is windows supported now?
Short answer is "I don't know." It might work, it might not. I don't have any Windows systems to test on. I would happily accept a PR for Windows support, but I have no way to verify any future changes wouldn't break it.
Ah. What I meant by that is I've created windows images and I want to install windows onto systems via pypxe. I've got pypxe to show them in the boot menu but when I select a windows image from a machine from the boot menu it sits at
Loading memdisk... ok
Loading win7pe.iso...
Then the machine eventually boots into the OS that's already on the disk, instead of to the .iso
.
This is what my boot menu looks like.
LABEL Windows7
MENU LABEL Windows7
KERNEL memdisk
APPEND iso initrd=win7pe.iso
LABEL Windows10
MENU LABEL Windows10
KERNEL memdisk
APPEND iso initrd=win10pe.iso
This is what PyPXE shows on terminal.
2019-07-16 01:44:08,180 [WARNING] PyPXE.TFTP.Client.('192.168.1.44', 49168) Request too big, attempting transfer anyway.
Eventually on the client it errors out with a message as such
...
Ramdisk at 0xcc8cb000, length 0x90cb6000
command line: BOOT_IMAGE=memdisk iso ignited=win7pe.iso
MEMDISK: Image seems to have fractional end cylinder
MEMDISK: Image appears to be truncated
Disk is hd96, 40118 K, C/H/S = 65535/255/15 (El Torito/El Torito),
Using safe INT 15h access to high memory
Code 1860, memento 468, codlin 41, stack 512
Total size needed = 2881 bytes, allocating 3K
Old dos memory at 0x83c00 (map says 0x9d8000), loading at 0x83000
1588: 0xffff 15E801: 0x3c00 0x1f00
INT 13 08: Success, count = 1, BPT = 0000:0000
Drive probing gives drive shift limit 0xe1
old: int13 = f000756c int15 = e8000324 int1e = f000efc7
new: int13 = 8300000a int15 = 830003fd int1e = f000efc7
Loading boot sector... booting...
CDBOOT: Cannot boot from CD - Code: 5
The win7pe.iso
is 157MB and the win10pe.iso
is 290MB. I've been told to try KERNEL raw
but PyPXE errors out when I do that.
Thoughts?
The "Request too big, attempting transfer anyway." warning means that the file you're trying to transfer over tftp is larger than 65536 blocks (about 33.5MB with the default 512 byte block size). It tries to transfer it anyway, hoping that the client supports it (this is technically a violation of the spec, there's no provision for block roll-over in any published TFTP spec, but it works with most clients.) I think it probably did transfer ok, but there's another problem later with the Windows image (or compatibility with the computer it's being run on.) I would try booting into iPXE and use wimboot, but I've never installed Windows with PXE, so I don't have any first-hand experience.
Ok so booting into ipxe using wimboot yielded the following on the machine I was trying to boot from
...
Configuring (net0 xx:xx:xx)... ok
net0: 192.168.1.17/255.255.255.0 gw 192.168.1.254
Next server: 192.168.1.106
Filename: http://192.168.1.106/boot.http.ipxe
http://192.168.1.106/boot.http.ipxe... ok
/wimboot... Connection reset (http://ipxe.org/0f0c6039)
Could not boot image: Connection reset (http://ipxe.org/0f0c6039)
No more network devices
Selected bood device failed. Press any key to reboot the system.
On the raspberry pi running pypxe is
$ sudo python -m pypxe.server --dhcp-proxy --dhcp-server-ip 192.168.1.106 --dhcp-fileserver 192.168.1.106 --verbose http --ipxe --http
2019-11-14 00:39:20,057 [INFO] PyPXE Starting TFTP server...
2019-11-14 00:39:20,074 [INFO] PyPXE Starting DHCP server in ProxyDHCP mode...
2019-11-14 00:39:20,082 [INFO] PyPXE Starting HTTP server...
2019-11-14 00:39:20,085 [INFO] PyPXE PyPXE successfully initialized and running!
2019-11-14 00:39:34,050 [WARNING] PyPXE.HTTP Sending 404 Not Found to 192.168.1.17:28440 for /home/pi/PyPXE/netboot/wimboot
/PyPXE/netboot/wimboot $ tree
.
├── LICENSE.txt
├── README.txt
├── src
│ ├── assert.h
│ ├── bootapp.h
│ ├── byteswap.h
│ ├── callback.S
│ ├── cmdline.c
│ ├── cmdline.h
│ ├── compiler.h
│ ├── coverity-model.c
│ ├── cpio.c
│ ├── cpio.h
│ ├── ctype.h
│ ├── die.c
│ ├── efi
│ │ ├── Base.h
│ │ ├── Guid
│ │ │ ├── FileInfo.h
│ │ │ ├── HiiFormMapMethodGuid.h
│ │ │ ├── PcAnsi.h
│ │ │ └── WinCertificate.h
│ │ ├── Ia32
│ │ │ └── ProcessorBind.h
│ │ ├── import.pl
│ │ ├── IndustryStandard
│ │ │ └── PeImage.h
│ │ ├── ProcessorBind.h
│ │ ├── Protocol
│ │ │ ├── BlockIo.h
│ │ │ ├── DevicePath.h
│ │ │ ├── GraphicsOutput.h
│ │ │ ├── LoadedImage.h
│ │ │ ├── SimpleFileSystem.h
│ │ │ ├── SimpleTextInEx.h
│ │ │ ├── SimpleTextIn.h
│ │ │ └── SimpleTextOut.h
│ │ ├── Uefi
│ │ │ ├── UefiBaseType.h
│ │ │ ├── UefiGpt.h
│ │ │ ├── UefiInternalFormRepresentation.h
│ │ │ ├── UefiMultiPhase.h
│ │ │ ├── UefiPxe.h
│ │ │ └── UefiSpec.h
│ │ ├── Uefi.h
│ │ └── X64
│ │ └── ProcessorBind.h
│ ├── efiblock.c
│ ├── efiblock.h
│ ├── efiboot.c
│ ├── efiboot.h
│ ├── efi.c
│ ├── efifile.c
│ ├── efifile.h
│ ├── efiguid.c
│ ├── efi.h
│ ├── efimain.c
│ ├── efipath.c
│ ├── efipath.h
│ ├── efireloc.c
│ ├── errno.h
│ ├── huffman.c
│ ├── huffman.h
│ ├── i386.i
│ ├── int13.c
│ ├── int13.h
│ ├── ipxe
│ │ ├── vsprintf.c
│ │ └── vsprintf.h
│ ├── lznt1.c
│ ├── lznt1.h
│ ├── lzx.c
│ ├── lzx.h
│ ├── main.c
│ ├── Makefile
│ ├── pause.c
│ ├── pause.h
│ ├── peloader.c
│ ├── peloader.h
│ ├── prefix.S
│ ├── rotate.h
│ ├── script.lds
│ ├── sha1.c
│ ├── sha1.h
│ ├── startup.S
│ ├── stdarg.h
│ ├── stddef.h
│ ├── stdint.h
│ ├── stdio.c
│ ├── stdio.h
│ ├── stdlib.h
│ ├── string.c
│ ├── string.h
│ ├── strings.h
│ ├── vdisk.c
│ ├── vdisk.h
│ ├── vsprintf.c
│ ├── wchar.h
│ ├── wctype.h
│ ├── wimboot.h
│ ├── wimboot.i386
│ ├── wimboot.x86_64
│ ├── wim.c
│ ├── wimfile.c
│ ├── wimfile.h
│ ├── wim.h
│ ├── wimpatch.c
│ ├── wimpatch.h
│ ├── x86_64.i
│ ├── xca.c
│ └── xca.h
└── wimboot
9 directories, 103 files
When I pull up error code 0f0c60 for iPXE I get this error no longer exists. What am I doing wrong?
The HTTP 404 is being sent because /home/pi/PyPXE/netboot/wimboot
isn't a file.
2019-11-14 00:39:34,050 [WARNING] PyPXE.HTTP Sending 404 Not Found to 192.168.1.17:28440 for /home/pi/PyPXE/netboot/wimboot
We currently don't support windows, but on the whole there is no reason we can't.
I've got a Windows 8.1 x64 VM running Python 2.7.9 I'm used for testing. I will update this issue with things I come across
Issues:
os.getuid()
not available on Windows.AttributeError
. There does not seem to be the concept of privileged ports in windows so this warning doesn't apply anyway. Given that we want each module to be able to be independant, we should probably remove thegetuid
call, and add atry...except socket.error
on the calls tobind
in each module. This would also let us catch other errors more helpfully, such asAddress already in use
os.chroot
calls fail, as discussed in #72, againAttributeError
. We ought totry...except
on chroot and log it, again, discussed #72./pxelinux.0
). Without chroot this is an error. Same for HTTP.os.path.getsize
reports the correct filesize,.read()
ing the file does not give the correct size. Solution: (Applies elsewhere) All files should be openedb
(binary mode) (xref #59)read
self.ongoing[address]['handle']...
handleRequest
handle = open...
Untested: