Skip to content
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

Need a protocol to specify boot partition UUID from BMC #45

Closed
AlexanderAmelkin opened this issue Sep 26, 2018 · 13 comments
Closed

Need a protocol to specify boot partition UUID from BMC #45

AlexanderAmelkin opened this issue Sep 26, 2018 · 13 comments
Assignees

Comments

@AlexanderAmelkin
Copy link

IPMI Specification defines a number of "boot parameters" that can be set via Set System Boot Options command. Among those parameters are:

  • 5: Boot flags
  • 7: Boot initiator mailbox

The former is fully supported by Petitboot, while the latter isn't. The data contained in the "mailbox" is not specified except for the size and the first four data bytes. It is proposed to develop a specification for this mailbox to be used to communicate additional boot parameters from BMC to Petitboot beyond those settable via "Boot flags". Specifically, a UUID of the desired boot partition needs to be settable.

Support for that will then be added into OpenBMC.

@sammj
Copy link
Contributor

sammj commented Sep 27, 2018

Reading from the spec:

IPMI allows software to use the boot initiator mailbox as a way for a remote application to pass OEM parameters for
additional selection of the boot process and direction of the startup of post-boot software. If additional parameters are not
included, the system boots the primary/first-scanned device of the type specified.

So that could be a nice way of doing a Petitboot/OpenPOWER specific way of specifying individual boot options. Better than just a UUID, we could format the info such that it matches what Petitboot stores in NVRAM.

@jk-ozlabs
Copy link
Member

@sammj: good idea - in that case, we'd have free-form flexibility to define any boot option - not just partitions, but also network interfaces, etc.

@causten
Copy link
Member

causten commented Sep 27, 2018

Any chance the free-form could be something that could be executed at the Petitboot prompt? My org wants to run a script from the command line which launches a Redhat Kickstart file. If my suggestion is not compatible with this issue I can open a different one. It just sounds like you are forming some boot features

@AlexanderAmelkin
Copy link
Author

@causten, there are just 80 bytes of data in the mailbox. No space for scripts. Besides, it sounds to me like a security hole. What your organization wants sounds a lot like initrd loaded via BOOTP. And, yes, it doesn't look compatible with this issue.

@ghost
Copy link

ghost commented Sep 30, 2018 via email

@causten
Copy link
Member

causten commented Oct 1, 2018

I've opened a new issue for my request. Sorry for the interruption of your current request.

@sammj
Copy link
Contributor

sammj commented Nov 29, 2018

I've put together a WIP of the Petitboot support here: https://github.com/sammj/petitboot/tree/ipmi-mailbox
Assuming I'm reading the spec right that could work as is, but I need to confirm a few details. I wonder if any of the BMCs around here support the mailbox feature.. 🤔

@sammj sammj self-assigned this Nov 29, 2018
@sammj
Copy link
Contributor

sammj commented Nov 29, 2018

Turns out AMI BMCs support this, eg:

➜  ~ ipmi-fstn3 raw 0x00 0x08 0x07 0x00 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11
➜  ~ ipmi-fstn3 raw 0x00 0x09 0x07 0x00 0x00
 01 07 11 11 11 11 11 11 11 11 11 11 11 11 11 11
 11 11

Which supports the minimum of 5 blocks. I've updated https://github.com/sammj/petitboot/tree/ipmi-mailbox to match, and I'll post it after some testing.
That's probably enough for OpenBMC to go on, as long as they provide a way for the user to set that buffer, or even set it themselves, everything should hook up fine.

@sammj
Copy link
Contributor

sammj commented Dec 3, 2018

@AlexanderAmelkin
Copy link
Author

AlexanderAmelkin commented Dec 5, 2018

@sammj, the series clearly lack documentation for BMC developers.

Also, is there a way to review/comment the patches there?
I wonder why don't you use GitHub PRs...

@sammj
Copy link
Contributor

sammj commented Dec 5, 2018

Fair point, I'll add some description; it's largely described by the IPMI spec but there's one or two things to consider when setting it for Petitboot.

Petitboot uses the mailing list (https://lists.ozlabs.org/listinfo/petitboot) for development & discussion much like other projects like Skiboot and the kernel. Github tends to be a useful place to track issues and the like :)

@sammj
Copy link
Contributor

sammj commented Dec 6, 2018

I added a bit of description of the mailbox implementation here: https://lists.ozlabs.org/pipermail/petitboot/2018-December/001240.html

@sammj
Copy link
Contributor

sammj commented Dec 19, 2018

Petitboot now supports this via 78c3a04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants