2
0
mirror of https://github.com/linka-cloud/d2vm.git synced 2025-07-04 02:22:27 +00:00

add grub support

Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
2023-09-11 15:42:06 +02:00
parent a003e176f5
commit 4e533b8044
17 changed files with 157 additions and 17 deletions

View File

@ -110,6 +110,7 @@ var (
d2vm.WithOutput(output),
d2vm.WithCmdLineExtra(cmdLineExtra),
d2vm.WithNetworkManager(d2vm.NetworkManager(networkManager)),
d2vm.WithBootLoader(bootloader),
d2vm.WithRaw(raw),
d2vm.WithSplitBoot(splitBoot),
d2vm.WithBootSize(bootSize),

View File

@ -98,6 +98,7 @@ var (
d2vm.WithOutput(output),
d2vm.WithCmdLineExtra(cmdLineExtra),
d2vm.WithNetworkManager(d2vm.NetworkManager(networkManager)),
d2vm.WithBootLoader(bootloader),
d2vm.WithRaw(raw),
d2vm.WithSplitBoot(splitBoot),
d2vm.WithBootSize(bootSize),

View File

@ -33,6 +33,7 @@ var (
containerDiskTag = ""
push bool
networkManager string
bootloader string
splitBoot bool
bootSize uint64
luksPassword string
@ -53,6 +54,7 @@ func buildFlags() *pflag.FlagSet {
flags.BoolVar(&push, "push", false, "Push the container disk image to the registry")
flags.BoolVar(&splitBoot, "split-boot", false, "Split the boot partition from the root partition")
flags.Uint64Var(&bootSize, "boot-size", 100, "Size of the boot partition in MB")
flags.StringVar(&bootloader, "bootloader", "syslinux", "Bootloader to use: syslinux, grub")
flags.StringVar(&luksPassword, "luks-password", "", "Password to use for the LUKS encrypted root partition. If not set, the root partition will not be encrypted")
flags.BoolVar(&keepCache, "keep-cache", false, "Keep the images after the build")
return flags