grubcfg

package
v0.0.0-...-ec69f57 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GrubCfg

type GrubCfg struct {
	// contains filtered or unexported fields
}

func ParseGrubCfgFile

func ParseGrubCfgFile(filename string) (*GrubCfg, error)

func (*GrubCfg) AddRecoveryMenuEntryMips

func (cfg *GrubCfg) AddRecoveryMenuEntryMips(menuText, rootUuid, linux, initrd string)

func (*GrubCfg) AddRecoveryMenuEntrySw

func (cfg *GrubCfg) AddRecoveryMenuEntrySw(menuText, rootUuid, linux, initrd string)

menuentry 'Deepin 15.5 sp2 sw421' --class gnu-linux --class gnu --class os{ echo "装载中,请耐心等待……" set boot=(${root})/boot/ linux.boot ${boot}/initrd.img-4.4.15-aere-deepin echo "装载 boot.img 成功" linux.console ${boot}/bootloader.bin echo "装载 bootloader.bin 成功" linux.vmlinux ${boot}/vmlinuz-4.4.15-aere-deepin root=UUID=91f9e990-4958-4a32-a741-41da2ef4218c net.ifnames=0 loglevel=0 vga=current rd.systemd.show_status=false rd.udev.log-priority=3 quiet video=swichfb:1280x1024-32@60 echo "装载 vmlinux1 成功" echo "开始执行……" boot }

func (*GrubCfg) RemoveRecoveryMenuEntries

func (cfg *GrubCfg) RemoveRecoveryMenuEntries()

func (*GrubCfg) ReplaceRootUuid

func (cfg *GrubCfg) ReplaceRootUuid(uuid string) error

func (*GrubCfg) Save

func (cfg *GrubCfg) Save(filename string) error

type GrubCfgItem

type GrubCfgItem interface {
	String() string
	Length() int
}

type Line

type Line struct {
	// contains filtered or unexported fields
}

func (Line) Length

func (l Line) Length() int

func (Line) String

func (l Line) String() string
type MenuEntry struct {
	// contains filtered or unexported fields
}
func (me *MenuEntry) Length() int
func (me *MenuEntry) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL