cabal95 / pybsdp

BSDP NetBoot server written in Python
MIT License
20 stars 6 forks source link

Limited to six images? #2

Open bluenenschloss opened 7 years ago

bluenenschloss commented 7 years ago

I try to migrate from OS X Server to Linux and tried pybsdp for netbooting. Although everything works fine up to six images, more than six cannot be used. When I add one by one to NetBootImages directory no more than six are displayed on Macs boot screen. I made for sure, that any of them works fine. Each of them shows up and can be booted in a group of max. six images. A tcpdump shows that the image list is max. 6 images long. Is that intentionally or could that be fixed? Kind regards from germany - Bernd.

cabal95 commented 7 years ago

I do not know for sure, but I would suspect you are running into a character limit in DHCP options. A quick look at the BSDP part of the code indicates that the list of NetBootImages is limited to 255 characters. Each image takes up 5 bytes plus the length of the string. So if each image name is around 32 characters long, you would be over that limit on the 7th image.

bluenenschloss commented 7 years ago

Thanks a lot for your kind response!

May I ask if this limitation is pybsdp specific. I cannot see this limit at macOS server. So this might not be a dhcp restriction. Can i increase the character maximum in your code?

Thanks in advance - I would appreciate any help or hint.

Am 15.09.2017 um 17:43 schrieb Daniel Hazelbaker notifications@github.com:

I do not know for sure, but I would suspect you are running into a character limit in DHCP options. A quick look at the BSDP part of the code indicates that the list of NetBootImages is limited to 255 characters. Each image takes up 5 bytes plus the length of the string. So if each image name is around 32 characters long, you would be over that limit on the 7th image.

Mit freundlichen Grüßen aus Solingen!

Bernd Lünenschloß bl@system-fabrik.de 0172 2020774 0212 64568083

cabal95 commented 7 years ago

It's a limitation of DHCP. It's possible the Mac server works around this by sending multiple DHCP responses but I don't know if that actually works. The BSDP code I use is from a third party and the way it handles is is just to ignore the image name if it goes over the 255 character limit.

When I was using this I never ran into the issue all my image names were short. They were just the version and an optional "Base" word to identify if it was a base image or one that had been customized for deployment use. i.e. 10.8.6 Base would have been the longest image name I used, which would have let me do up to 15 images before hitting the character limit.

bluenenschloss commented 7 years ago

Once again, thank you very much.

I’ll try to analyze macOS servers response and see what can be done to improve bsdp code. If this fails, I’ll try to shorten image names to suitable lengths - lets see…

Am 15.09.2017 um 20:40 schrieb Daniel Hazelbaker notifications@github.com:

It's a limitation of DHCP. It's possible the Mac server works around this by sending multiple DHCP responses but I don't know if that actually works. The BSDP code I use is from a third party and the way it handles is is just to ignore the image name if it goes over the 255 character limit.

When I was using this I never ran into the issue all my image names were short. They were just the version and an optional "Base" word to identify if it was a base image or one that had been customized for deployment use. i.e. 10.8.6 Base would have been the longest image name I used, which would have let me do up to 15 images before hitting the character limit.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

-- Mit freundlichen Grüßen aus Solingen!

Bernd Lünenschloß bl@system-fabrik.de 0172 2020774 0212 64568083