Add architecture choice for EFI GRUB
This commit is contained in:
parent
266b9c6317
commit
4b8cd95fd5
|
@ -269,6 +269,10 @@ def main():
|
|||
formatEsp = False
|
||||
if gptInfo["espFormatted"] == False:
|
||||
formatEsp = choiceYn("The disk's ESP partition (" +gptInfo["espPart"]+ ") does not seem to be formatted correctly. Format it?")
|
||||
|
||||
defaultChoice = "i386"
|
||||
if callString(["uname","-m"]) == "x86_64": defaultChoice = "x86_64"
|
||||
grubVersion = choice("Which version of EFI GRUB should be installed? Note that 'both' is not always compatible.",["i386","x86_64","both"],defaultChoice)
|
||||
|
||||
print("")
|
||||
print("The rest of this setup will continue without your input ...")
|
||||
|
@ -397,8 +401,10 @@ def main():
|
|||
call(["mount",gptInfo["espPart"],ipth("boot/efi")])
|
||||
|
||||
print("Installing GRUB (EFI) ...")
|
||||
chroot(ipth(),["grub-install","--target=i386-efi","--uefi-secure-boot","--efi-directory=/boot/efi","--boot-directory=/boot",grubDisk])
|
||||
chroot(ipth(),["grub-install","--target=x86_64-efi","--uefi-secure-boot","--efi-directory=/boot/efi","--boot-directory=/boot",grubDisk])
|
||||
if grubVersion in ["i386","both"]:
|
||||
chroot(ipth(),["grub-install","--target=i386-efi","--uefi-secure-boot","--efi-directory=/boot/efi","--boot-directory=/boot",grubDisk])
|
||||
if grubVersion in ["x86_64","both"]:
|
||||
chroot(ipth(),["grub-install","--target=x86_64-efi","--uefi-secure-boot","--efi-directory=/boot/efi","--boot-directory=/boot",grubDisk])
|
||||
|
||||
print("Unmounting ESP ...")
|
||||
call(["umount","-l",ipth("boot/efi")])
|
||||
|
|
Loading…
Reference in New Issue