Ubuntu's grub2 supports EFI's Secure Boot function, Grub2Win's does not. Installing Ubuntu's grub2 looks easy enough to do according to this link: https://www.pendrivelinux.com/install-grub2-on-usb-from-ubuntu-linux/ . So if Grub2Win could interface with it it would be a win-win senario for users.
Having the Ubuntu grub2 replace the grub2 in Grub2Win would be even better.
While disabling Secure Boot is feasible on personal computers and those of friends it is not an option on proprietary computers.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The signed Ubuntu EFI boot module doesn't have support for NTFS so it will not find the Grub config file or libraries on a Windows disk partition.
Generating an EFI module with the required support (ntfs, normal, search etc) will invalidate the special Microsoft signature that Ubuntu uses to bypass the secure boot check. The EFI firmware will deny the boot.
This makes sense, because otherwise a hacker could embed and generate malicious code in the specially signed Ubuntu EFI boot module and secure boot would be useless.
Also, Ubuntu grub expects a Linux extx library structure in the Linux /boot partition at boot time. It would never find the C:\grub2 directory. or grub.cfg file.
These are my initial thoughts. I will have a closer look when I return from vacation October 1.
Thanks,
Dave
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, so replacing the grub2 in Grub2Win doesn't sound possible but adding support to Grub2Win for accessing the Ubuntu grub.cfg file on a USB drive should be.
Ed
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Grub2Win is a Windows application. It cannot access the Ubuntu grub.cfg file because it is on a Linux extx partition. Not accessable from Windows apps.
Dave
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes Ubuntu can possibly run on FAT partitions, however the Ubuntu install program default is ext4, not FAT.
This means that 95% plus of Ubuntu root partitions in the wild are ext4, not accessable from Windows apps. People rarely change from the default to FAT at install time, they nearly always take the default ext4 format.
I know this from the many disk maps included in the diagnostic files I have received from users.
Dave
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You are missing the point here. I'm not talking about Ubuntu, I'm talking about Ubuntu's grub2, and how it, the grub2 sw, can be installed to a USB drive, without installing Ubuntu. Using Grub2Win's menu editing capablities to maintain that grub2's menu would be super helpful.
Ed
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The grub.cfg I ended up manually creating for booting the grub2 system on my USB drive actually doesn't need a lot of editing.
ifloadfont/boot/grub/font.pf2;then# set gfxmode=autosetgfxmode=800x600,autoinsmodefi_gopinsmodefi_ugainsmodgfxtermterminal_outputgfxtermfisetmenu_color_normal=white/blacksetmenu_color_highlight=black/light-graysettimeout=60setgfxpayload=1024x768menuentry" 1. UEFI Porteus 4.0 system - for Secure Boot enabled"{setefibootmgr=/EFI/boot/grubx64.efisetporteus_parms="volume=33 reboot=cold extramod=/Modules;/Modsavedat noload=save.dat;cinnamon"# Change parms to fit your needs.setbootdrv=$rootsearch-f$efibootmgrif[$?==0];thenlinux/boot/syslinux/vmlinuz$porteus_parmsinitrd/boot/syslinux/initrd.xzecho" "echo" -> "echo" -> If /boot/grub/x86-64-efi errors appear, disregard."echo" -> It means Secure Boot has not been enabled."echo" -> "sleep-i4elseecho"----------------------------------------"echo$efibootmgrwasNOTfound.echosleep-i10fisetroot=$bootdrv}menuentry" 2. UEFI Porteus 4.0 boot menu - aborts if Secure Boot is enabled"{setefibootmgr=/EFI/Porteusboot/bootx64.efisetbootdrv=$rootsearch-f$efibootmgrif[$?==0];thenchainloader$efibootmgrecho" "echo" -> "echo" -> If /boot/grub/x86-64-efi errors appear, disregard."echo" -> "sleep-i4elseecho"----------------------------------------"echo$efibootmgrwasNOTfound.echosleep-i10fisetroot=$bootdrv}menuentry" "{echo}menuentry" 3. Reboot"{reboot}menuentry" 4. Shutdown"{halt}menuentry" "{echo}menuentry" Notes"{echoecho"To switch the USB drive's boot mode to BIOS mode "echo"run the BIOSboot.sh script in the /EFI directory."echoecho"To switch the USB drive boot mode back to EFI mode"echo"run the Secureboot.sh script in the /EFI directory."echosleep-i10}
I suspect a similar setup would work with other USB systems.
Ed
-update-
This grub.cfg works also but not as planned.
ifloadfont/boot/grub/font.pf2;then# set gfxmode=autosetgfxmode=800x600,autoinsmodefi_gopinsmodefi_ugainsmodgfxtermterminal_outputgfxtermfisetmenu_color_normal=white/blacksetmenu_color_highlight=black/light-graysettimeout=60setgfxpayload=1024x768setefibootmgr=/EFI/Porteusboot/bootx64.efisetporteus_parms="volume=33 reboot=cold extramod=/Modules;/Modsavedat noload=save.dat;cinnamon"# Change parms to fit your needs. insmod/boot/grub/x86_64-efi/catifrmmodcat;thenlinux/boot/syslinux/vmlinuz$porteus_parmsinitrd/boot/syslinux/initrd.xzbootexitelsechainloader$efibootmgrbootexitfi
The goal was to have the grub.cfg automatically boot the Secure Boot enabled option or the Secure Boot disabled option but that is not how it is working. Regardless of the Secure Boot setting the top option is executed. Not a bad situation, just not the desired situation.
Ed
Last edit: Ed P 2018-12-01
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ubuntu's grub2 supports EFI's Secure Boot function, Grub2Win's does not. Installing Ubuntu's grub2 looks easy enough to do according to this link: https://www.pendrivelinux.com/install-grub2-on-usb-from-ubuntu-linux/ . So if Grub2Win could interface with it it would be a win-win senario for users.
Having the Ubuntu grub2 replace the grub2 in Grub2Win would be even better.
While disabling Secure Boot is feasible on personal computers and those of friends it is not an option on proprietary computers.
Hey Ed,
I'm not sure this will work. Here's why:
The signed Ubuntu EFI boot module doesn't have support for NTFS so it will not find the Grub config file or libraries on a Windows disk partition.
Generating an EFI module with the required support (ntfs, normal, search etc) will invalidate the special Microsoft signature that Ubuntu uses to bypass the secure boot check. The EFI firmware will deny the boot.
This makes sense, because otherwise a hacker could embed and generate malicious code in the specially signed Ubuntu EFI boot module and secure boot would be useless.
Also, Ubuntu grub expects a Linux extx library structure in the Linux /boot partition at boot time. It would never find the C:\grub2 directory. or grub.cfg file.
These are my initial thoughts. I will have a closer look when I return from vacation October 1.
Thanks,
Dave
Dave,
Ok, so replacing the grub2 in Grub2Win doesn't sound possible but adding support to Grub2Win for accessing the Ubuntu grub.cfg file on a USB drive should be.
Ed
A couple of links that may interest you Dave.
https://github.com/schierlm/usb-modboot/blob/master/grub-ubuldr.cfg
http://reboot.pro/topic/21845-uefi-bootloader-boot-manager-signed-with-microsofts-secure-boot-key/
Hey Ed,
Grub2Win is a Windows application. It cannot access the Ubuntu grub.cfg file because it is on a Linux extx partition. Not accessable from Windows apps.
Dave
Dave,
Ubuntu's grub runs just fine on FAT partitions, just like EFI. Pretty sure Grub2Win can access them.
Ed
Last edit: Ed P 2018-09-23
Hey Ed,
Yes Ubuntu can possibly run on FAT partitions, however the Ubuntu install program default is ext4, not FAT.
This means that 95% plus of Ubuntu root partitions in the wild are ext4, not accessable from Windows apps. People rarely change from the default to FAT at install time, they nearly always take the default ext4 format.
I know this from the many disk maps included in the diagnostic files I have received from users.
Dave
Dave,
You are missing the point here. I'm not talking about Ubuntu, I'm talking about Ubuntu's grub2, and how it, the grub2 sw, can be installed to a USB drive, without installing Ubuntu. Using Grub2Win's menu editing capablities to maintain that grub2's menu would be super helpful.
Ed
Hey Dave,
I'll try your suggestion, it's an easy fix. I just put this script in the c:\grub2 folder.
SBgrub2.cmd
-update-
The grub.cfg I ended up manually creating for booting the grub2 system on my USB drive actually doesn't need a lot of editing.
I suspect a similar setup would work with other USB systems.
Ed
-update-
This grub.cfg works also but not as planned.
The goal was to have the grub.cfg automatically boot the Secure Boot enabled option or the Secure Boot disabled option but that is not how it is working. Regardless of the Secure Boot setting the top option is executed. Not a bad situation, just not the desired situation.
Ed
Last edit: Ed P 2018-12-01