2

I currently have 3 different boot partitions:

  1. Windows 11 on nvme0n1
  2. Fedora 35 on nvme1n1
  3. Ubuntu 22.04 on sdc with an encrypted root partition on sdc4

When I initially configure the system the Windows partition and the Ubuntu partition dual boot on the the same /boot (nvme0n1p1). Due to a system error I had to reinstall Windows which made my Ubuntu partition unbootable, using the Boot Repair I was able recreate the menu entry on the grub entry in the Fedora partition.

I'm able to boot into Ubuntu from the Fedora boot partition (same from on Ubuntu boot partition) but I'm always prompt with initramfs where I have to type:

(initramfs) > cryptoSetup luksOpen /dev/sdc4 myVolume
(initramfs) > exit

Then the Ubuntu splashscreen appears asking again to unlock my partition.

Any ideas how to avoid the initramfs from appearing?

My grub2 entry for Ubuntu looks like this:

insmod part_gpt
insmod ext2
set root='hd2,gpt3'
if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd2,gpt3 --hint-efi=hd2,gpt3 --hint-baremetal=ahci2,gpt3  07baf26d-6f32-4a0d-b264-336d15177aba
else
    search --no-floppy --fs-uuid --set=root 07baf26d-6f32-4a0d-b264-336d15177aba
fi
linux /vmlinuz-5.15.0-56-generic root=/dev/mapper/vg0-root ro quiet splash $vt_handoff
initrd /initrd.img-5.15.0-56-generic

My boot partition looks like this:

Disk /dev/nvme0n1: (Windows)

Device Start End Sectors Size Type /dev/nvme0n1p1 2048 206847 204800 100M EFI System /dev/nvme0n1p2 206848 239615 32768 16M Microsoft reserved /dev/nvme0n1p3 239616 975491071 975251456 465G Microsoft basic data /dev/nvme0n1p4 975491072 976771071 1280000 625M Windows recovery environment

Disk /dev/nvme1n1: (Fedora)

Device Start End Sectors Size Type /dev/nvme1n1p1 2048 1230847 1228800 600M EFI System -> /efi /dev/nvme1n1p2 1230848 3327999 2097152 1G Linux filesystem -> /boot /dev/nvme1n1p3 3328000 976773119 973445120 464.2G Linux filesystem -> /

Disk /dev/sdc: (Ubuntu)

Device Start End Sectors Size Type /dev/sdc1 2048 4095 2048 1M BIOS boot /dev/sdc2 4096 503807 499712 244M EFI System -> /efi /dev/sdc3 503808 8503295 7999488 3.8G Linux filesystem -> /boot /dev/sdc4 8503296 976771071 968267776 461.7G Linux filesystem -> /

Any ideas are appreciated.

Thanks

HFR1994
  • 121
  • Do not use LVM nor encryption. But does not Ubuntu's grub have insmod luks and cryptomount (hdX,Y) and then would not Fedora's version need that? May be easier to use a configfile entry in Fedora to load Ubuntu either to Ubuntu's UEFI boot file (which is a configfile to grub.cfg in /) or directly to grub in /boot. https://askubuntu.com/questions/1205982/how-make-external-usb-disk-bootable-for-bios-and-uefi Not need to post link to Boot-Repair, better to post link to the summary report so can give better details, if you need those. – oldfred Jan 09 '23 at 19:35
  • Currently the menu entry in grub2 is pointing to the /boot (/dev/sdc3) in the Ubuntu disk, so if I understand correctly I need to change the entry to point to /dev/sdc2 which is the EFI portion? @oldfred – HFR1994 Jan 09 '23 at 20:09
  • Yes, but I find when booting different drives, the boot drive is hd0 and then drives seem to normally be in SATA port order. So I have boot stanzas that do not always work, particularly when plugging in flash drives or my external SSD as then drive order changes again. I often have boot entry that says hd1, but because of added drive, have to go into grub and change to hd2 to find correct drive. Or some experiment often required. – oldfred Jan 09 '23 at 21:08

0 Answers0