-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check for device provision is ready and not restart flashing #48
Comments
Probably defer the netboot to a different TFTP server? I'm now just blocking access to the TFTP server in the firewall (that works too) |
Note that there are other options to reprovision already provisioned devices. |
This option does not really work. As if the device is unreachable it will not work to set options. The devices i want to manage are in different locations and most of them high in the ceiling where someone would need to get a ladder to reach them. Rebooting is possible because i just power cycle the network port on the switch. |
Would be more tempted to ditch the SD card and network boot the whole OS in such cases. (similar to what Piserver does) . If you really want to use cmprovision and sabotage network boot after initial installation you can probably do some hackery with a CmProvisioningComplete event listener hook though. E.g.:
(untested) |
I'll try this! Thanks! |
This works beautifully!! wow! 👯 Now to get rid of the folder when you delete a device.... if one can point me to the files of the web interface i can probably tell what to insert there. rm("/var/lib/cmprovision/scriptexecute/".$mac_with_dashes); |
https://github.com/raspberrypi/cmprovision/blob/main/app/Http/Livewire/Cms.php#L56
(And make sure you do so, before the CM is destroy()'ed.)
|
You are a star! :) replace the delete function in: /var/lib/cmprovision/app/Http/Livewire\Cms.php
|
It works perfectly still. Though there is one weird thing. Once you select "Verify that image was written correctly" in the projects tab. It suddenly set's strange values (like the wrong MAC address, it forgets the pre/post-logs, temperatures etc in the CM's list. It also creates a wrong folder for DNSMasq). If you do not check if the image was written successfully it just works normally. |
Hi,
This might be a feature request. Though i don't know if this works for RPI.
I'm using the CMprovisioner with success and provisioning works (thanks for this).
The default setting (first SD/MMC/USB etc then PXE boot) of the Pi's is kind of strange as you would need to wipe the SD card or remove the /boot/ partition to get it going again. For example the CM/RPI could detect that it can boot from SD but later in the process somehow still fails to boot due to a config error. The provisioning becomes unusable in this case as it detects dat it can boot from the SD card and to overcome this you will have to clear the SD card manually or remotely (if you still can).
You can set the RPI to first try to PXE boot and if this fails then boot from the SD card (and this works on a pi4 for example)
It would be nice if the boot process on the server would be aware if a device is already provisioned and skip PXE/netbooting when the status Provisioning complete is set to a date. This will require adjusting the PXE/netboot routine.
You would also need to be able to set the device to status provisioning complete to "no" manually for it to be provisioned again instead of always blindly copy the SD card whenever a boot request is made. Setting a RPI4 to first PXE/Netboot leaves you in a loop of always booting from the network and recopying the image to the device.
The text was updated successfully, but these errors were encountered: