Blame internal/osbuild2/grub2_stage.go

Packit Service 15f37d
package osbuild2
Packit Service 15f37d
Packit Service 15f37d
import "github.com/google/uuid"
Packit Service 15f37d
Packit Service 15f37d
// The GRUB2StageOptions describes the bootloader configuration.
Packit Service 15f37d
//
Packit Service 15f37d
// The stage is responsible for installing all bootloader files in
Packit Service 15f37d
// /boot as well as config files in /etc necessary for regenerating
Packit Service 15f37d
// the configuration in /boot.
Packit Service 15f37d
//
Packit Service 15f37d
// Note that it is the role of an assembler to install any necessary
Packit Service 15f37d
// bootloaders that are stored in the image outside of any filesystem.
Packit Service 15f37d
type GRUB2StageOptions struct {
Packit Service 15f37d
	RootFilesystemUUID uuid.UUID  `json:"root_fs_uuid"`
Packit Service 15f37d
	BootFilesystemUUID *uuid.UUID `json:"boot_fs_uuid,omitempty"`
Packit Service 15f37d
	KernelOptions      string     `json:"kernel_opts,omitempty"`
Packit Service 15f37d
	Legacy             string     `json:"legacy,omitempty"`
Packit Service 15f37d
	UEFI               *GRUB2UEFI `json:"uefi,omitempty"`
Packit Service 15f37d
	SavedEntry         string     `json:"saved_entry,omitempty"`
Packit Service 15f37d
}
Packit Service 15f37d
Packit Service 15f37d
type GRUB2UEFI struct {
Packit Service 15f37d
	Vendor string `json:"vendor"`
Packit Service 15f37d
}
Packit Service 15f37d
Packit Service 15f37d
func (GRUB2StageOptions) isStageOptions() {}
Packit Service 15f37d
Packit Service 15f37d
// NewGRUB2Stage creates a new GRUB2 stage object.
Packit Service 15f37d
func NewGRUB2Stage(options *GRUB2StageOptions) *Stage {
Packit Service 15f37d
	return &Stage{
Packit Service 15f37d
		Type:    "org.osbuild.grub2",
Packit Service 15f37d
		Options: options,
Packit Service 15f37d
	}
Packit Service 15f37d
}