My goal to archive is the following: I want to install Ubuntu alongside my already existing Windows system on the same hard drive. I checked Windows (msinfo32) and it's running in UEFI-Mode, Secure Boot disabled. I installed Ubuntu in a encrypted Luks/LVM container on sda6 but I also wanted to put the grub-loader on an external USB drive/stick to boot from.
In the end it should boot Windows normally without the usb stick present and it should automatically boot Ubuntu when this usb stick is connected to my laptop. After installing Ubuntu i got a broken grub prompt on startup. (Minimal Bash-like line editing is supported...
)
How to archive this scenario and make it work like describe above?
fdisk -l
Device Start End Sectors Size Type
/dev/sda1 2048 2050047 2048000 1000M Windows recovery environment
/dev/sda2 2050048 2582527 532480 260M EFI System
/dev/sda3 2582528 2844671 262144 128M Microsoft reserved
/dev/sda4 2844672 305432575 302587904 144.3G Microsoft basic data
/dev/sda5 305432576 306358271 925696 452M Windows recovery environment
/dev/sda6 306358272 939612159 633253888 302G Linux filesystem
/dev/sda7 939612160 976773119 37160960 17.7G Windows recovery environment
The external USB Drive for the grub-bootloader looks like this
Device Boot Start End Sectors Size Id Type
/dev/sdc1 * 2048 60061695 60059648 28.7G ef EFI (FAT-12/16/32)
The contents of the sdc1 partition is as follows:
drwxr-xr-x 4 root root 16384 Sep 30 22:04 EFI/
drwxr-xr-x 2 root root 16384 Sep 30 21:19 grub/
drwxr-xr-x 2 root root 16384 Oct 1 08:47 'System Volume Information'/
The grub folder is empty.
EFI contains this:
drwxr-xr-x 2 root root 16384 Sep 30 22:04 BOOT/
drwxr-xr-x 2 root root 16384 Sep 30 22:04 ubuntu/
EFI/BOOT contains:
-rwxr-xr-x 1 root root 1334816 Sep 30 22:04 BOOTX64.EFI*
-rwxr-xr-x 1 root root 1213032 Sep 30 22:04 fbx64.efi*
-rwxr-xr-x 1 root root 1269496 Sep 30 22:04 mmx64.efi*
EFI/ubuntu contains:
-rwxr-xr-x 1 root root 108 Sep 30 22:04 BOOTX64.CSV*
-rwxr-xr-x 1 root root 201 Sep 30 22:04 grub.cfg*
-rwxr-xr-x 1 root root 1681280 Sep 30 22:04 grubx64.efi*
-rwxr-xr-x 1 root root 1269496 Sep 30 22:04 mmx64.efi*
-rwxr-xr-x 1 root root 1334816 Sep 30 22:04 shimx64.efi*
EFI/ubuntu/grub.cfg contains this
search.fs_uuid d95a5ab4-76bd-4ab2-a05d-41c1dba56758 root lvmid/VmoR2t-OB91-x6E3-csJp-r79R-gAsE-CbYau0/S6fvUX-3vKN-yzeO-L7om-s6Ae-vlO9-eKSUvF
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg
ls -al /dev/disk/by-uuid/
lrwxrwxrwx 1 root root 10 Oct 1 09:03 0079-8DF5 -> ../../sdc1
lrwxrwxrwx 1 root root 10 Oct 1 09:03 5266B2F066B2D3C7 -> ../../sda5
lrwxrwxrwx 1 root root 10 Oct 1 09:03 6C98155B981524DC -> ../../sda7
lrwxrwxrwx 1 root root 10 Oct 1 09:03 9E143B29143B0435 -> ../../sda4
lrwxrwxrwx 1 root root 10 Oct 1 09:03 C848147848146808 -> ../../sda1
lrwxrwxrwx 1 root root 10 Oct 1 09:03 EA3B-1E3B -> ../../sda2
lrwxrwxrwx 1 root root 10 Oct 1 09:03 f40a050c-d12c-418c-83cd-8ca5695dee89 -> ../../sda6
sudo update-grub
. This will add Windows to Ubuntu's boot menu. – C.S.Cameron Oct 01 '20 at 11:22sudo update-grub
will add both Windows and internal Ubuntu to the USB's GRUB menu. There is advice for making a Full install USB on this page: https://askubuntu.com/questions/1217832/how-to-create-a-full-install-of-ubuntu-20-04-to-usb-device-step-by-step – C.S.Cameron Oct 01 '20 at 11:47