Difference between revisions of "Petitboot"
(updated link) |
JeremyRand (talk | contribs) (→Reset lost Petitboot credentials: Factor out nmap instructions) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 7: | Line 7: | ||
Petitboot is open source. | Petitboot is open source. | ||
+ | |||
+ | ==Reset lost Petitboot credentials== | ||
+ | |||
+ | In the event of a lost or forgotten Petitboot menu passphrase, it should be possible to clear as long as the BMC remains accessible. Credentials for Petitboot reside separate from the BMC. This procedure will completely rewrite the Power NOR (PNOR) flash chip to defaults. | ||
+ | |||
+ | Prepare the following: | ||
+ | |||
+ | * A helper computer. Preferably of reasonable trustworthiness as your BMC credentials will be handed through this device. | ||
+ | * Ethernet cabling and possibly a router (only required if the BMC static IP is also unknown/forgotten) which will never touch the public internet afterward. | ||
+ | * The OpenPOWER firmware for your PNOR flash chip, verified with GPG. The release version should match the same release as your BMC. | ||
+ | |||
+ | Establish that you can first log into the BMC. If you are uncertain which IP address it was set to, [[Checking the BMC IP Address#Via_nmap|use nmap]]. | ||
+ | |||
+ | Acquire the [[Blackbird/Firmware|OpenPOWER firmware]], verify ''and decompress it'', then copy the *.pnor (or *.bin if 1.00 series) to the helper system. | ||
+ | |||
+ | Following the steps outlined in [[Compiling_Firmware#Transfer_image_to_BMC|Compiling Firmware]], transfer the firmware image: | ||
+ | |||
+ | <code>my_helper_pc$ scp <APPROPRIATE_FIRMWARE>.pnor root@$10.0.10.99:/tmp/</code> | ||
+ | |||
+ | With host power off, log into the BMC and apply the new firmware following the [[Updating_Firmware#Updating_the_OpenPOWER_firmware|Updating Firmware]] procedure: | ||
+ | |||
+ | <code>root@blackbird:~# pflash -E -p /tmp/<APPROPRIATE_FIRMWARE>.pnor</code> | ||
+ | |||
+ | <code>root@blackbird:~# pflash -P CVPD -c</code> | ||
+ | |||
+ | The process will take a few minutes to complete. Let the system, a Blackbird in this example, restart. You will find that the Petitboot menu credentials can now be set anew. | ||
+ | |||
+ | Whenever entering new credentials into the Petitboot passphrase prompt, please note that Petitboot menu '''does not''' check against typos by using multiple entries. It also '''does not''' display any characters as you type. This leaves a lot of room for user error and one needs to be absolutely mindful of what is entered into this form. | ||
+ | |||
+ | ==See Also== | ||
+ | |||
+ | * [[u-root]] | ||
+ | * [[Heads]] | ||
==References== | ==References== | ||
* [http://jk.ozlabs.org/projects/petitboot/ Official project website] | * [http://jk.ozlabs.org/projects/petitboot/ Official project website] | ||
* [https://github.com/open-power/petitboot Petitboot source code (upstream)] | * [https://github.com/open-power/petitboot Petitboot source code (upstream)] | ||
+ | * [https://open-power.github.io/petitboot/ Petitboot Sphinx documentation (upstream)] | ||
* [https://git.raptorcs.com/git/talos-petitboot/ Petitboot source code (Talos II variant)] | * [https://git.raptorcs.com/git/talos-petitboot/ Petitboot source code (Talos II variant)] | ||
* [https://git.raptorcs.com/git/talos-op-build/tree/openpower/configs/linux/skiroot_p9_defconfig?h=06-04-2018 List of Linux kernel modules enabled for POWER9 Skiroot] — this determines what devices can be seen and booted. | * [https://git.raptorcs.com/git/talos-op-build/tree/openpower/configs/linux/skiroot_p9_defconfig?h=06-04-2018 List of Linux kernel modules enabled for POWER9 Skiroot] — this determines what devices can be seen and booted. | ||
[[Category:Firmware]] | [[Category:Firmware]] |
Latest revision as of 16:54, 6 June 2023
Petitboot (Petitboot): OS bootloader implemented as a Linux userspace application using kexec. The Petitboot bootloader provides a boot menu and boots the chosen boot option using the Linux kernel's kexec functionality. Generally runs under Skiroot as part of the boot process.
Because Petitboot runs in a Linux environment, it is able to detect any storage devices or network adapters which are detected by the Linux kernel embedded in the firmware. This avoids the need to implement drivers for boot devices twice (once for Linux, once for a bootloader): if Linux can see it, you can boot it.
Petitboot is open source.
Reset lost Petitboot credentials
In the event of a lost or forgotten Petitboot menu passphrase, it should be possible to clear as long as the BMC remains accessible. Credentials for Petitboot reside separate from the BMC. This procedure will completely rewrite the Power NOR (PNOR) flash chip to defaults.
Prepare the following:
- A helper computer. Preferably of reasonable trustworthiness as your BMC credentials will be handed through this device.
- Ethernet cabling and possibly a router (only required if the BMC static IP is also unknown/forgotten) which will never touch the public internet afterward.
- The OpenPOWER firmware for your PNOR flash chip, verified with GPG. The release version should match the same release as your BMC.
Establish that you can first log into the BMC. If you are uncertain which IP address it was set to, use nmap.
Acquire the OpenPOWER firmware, verify and decompress it, then copy the *.pnor (or *.bin if 1.00 series) to the helper system.
Following the steps outlined in Compiling Firmware, transfer the firmware image:
my_helper_pc$ scp <APPROPRIATE_FIRMWARE>.pnor root@$10.0.10.99:/tmp/
With host power off, log into the BMC and apply the new firmware following the Updating Firmware procedure:
root@blackbird:~# pflash -E -p /tmp/<APPROPRIATE_FIRMWARE>.pnor
root@blackbird:~# pflash -P CVPD -c
The process will take a few minutes to complete. Let the system, a Blackbird in this example, restart. You will find that the Petitboot menu credentials can now be set anew.
Whenever entering new credentials into the Petitboot passphrase prompt, please note that Petitboot menu does not check against typos by using multiple entries. It also does not display any characters as you type. This leaves a lot of room for user error and one needs to be absolutely mindful of what is entered into this form.
See Also
References
- Official project website
- Petitboot source code (upstream)
- Petitboot Sphinx documentation (upstream)
- Petitboot source code (Talos II variant)
- List of Linux kernel modules enabled for POWER9 Skiroot — this determines what devices can be seen and booted.