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