Skip to content

Commit

Permalink
Adding grubExtraConfig parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
davdiv committed Apr 16, 2024
1 parent ec2cd17 commit 80d314e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/alpine/abpartitions/bootParts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const minEFIPartitionSize = 33 * 1024 * 1024;
export interface ABPartitionsGrubPartitionOptions {
linuxDiskDevice?: string;
grubTimeout?: number;
grubExtraConfig?: string;
grubDiskDevice?: string;
grubSourceImage: string;
grubSourcePath?: string;
Expand All @@ -36,6 +37,7 @@ export interface ABPartitionsGrubPartitionOptions {

export const abpartitionsGrubPartition = async ({
grubTimeout = 3,
grubExtraConfig = "",
linuxDiskDevice = "/dev/sda",
grubDiskDevice = "hd0",
grubSourceImage,
Expand Down Expand Up @@ -74,6 +76,7 @@ if [ $buildahcker_new != n ] ; then
fi
export buildahcker_params
set timeout=${grubTimeout}
${grubExtraConfig}
menuentry A --id=a {
set root=(${grubDiskDevice},gpt${rootPartitionAIndex})
set buildahcker_params="buildahcker_current=a buildahcker_grubenv_device=${linuxDiskDevice}${grubEnvPartitionIndex} buildahcker_grubenv=${grubEnvPath} buildahcker_other_root=${linuxDiskDevice}${rootPartitionBIndex} root=${linuxDiskDevice}${rootPartitionAIndex}"
Expand Down Expand Up @@ -243,6 +246,7 @@ export const abpartitionsBiosPartition = async ({
export interface ABPartitionsDiskOptions {
bootType?: "bios" | "efi" | "both";
grubTimeout?: number;
grubExtraConfig?: string;
linuxDiskDevice?: string;
grubDiskDevice?: string;
efiPartitionSize?: number;
Expand All @@ -265,6 +269,7 @@ export const abpartitionsDisk = async ({
bootType = "both",
grubTimeout,
linuxDiskDevice,
grubExtraConfig,
grubDiskDevice,
efiPartitionSize,
biosBootPartitionSize,
Expand Down Expand Up @@ -356,6 +361,7 @@ export const abpartitionsDisk = async ({
grubTimeout,
grubDiskDevice,
grubSourceImage,
grubExtraConfig,
grubSourcePath,
grubEnvPartitionIndex: grubenvAndEfiPartitionIndex,
rootPartitionAIndex,
Expand Down

0 comments on commit 80d314e

Please sign in to comment.