0

I installed Fedora(32-bit) for 1st time. I tried to set my dual-booted(Windows 7 & Ubuntu 14.04) BIOS-PC to triple-boot with Fedora 26 without fruit.

I started as below...

  1. Created 3 standard partitions instead of LVM partition:

    • / - encrypted,ext4, 10 GB.
    • /boot - unencrypted,ext4.
    • swap - unencrypted.
  2. I unchecked 'bootloader install' from Anaconda since there was already ubuntu-grub on MBR. At the end Installer says it successfully installed fedora. but after reboot, Fedora 26 was not listed on GRUB 2 boot menu. I ran sudo update-grub from Ubuntu terminal but result was unchanged. I can see those newly created partitions using sudo blkid.

    Here is the output of sudo blkid:

    /dev/sda1: LABEL="System Reserved" UUID="F2622FA6622F6F13" TYPE="ntfs"
    /dev/sda2: LABEL="Windows" UUID="FE703488703449A3" TYPE="ntfs"
    /dev/sda5: UUID="03f69c95-69fd-4302-adf3-96a495584a4c" TYPE="ext4"
    /dev/sda6: UUID="9087cac3-ee43-4c6b-9cf3-bf818697e239" TYPE="swap"
    /dev/sda7: LABEL="Common Drive" UUID="EA203DE0203DB483" TYPE="ntfs"
    /dev/sda8: UUID="1b498ed0-dd4c-4021-942f-4c20ba4bb79c" TYPE="crypto_LUKS" 
    /dev/sda9: LABEL="Fd-bt" UUID="720dc2b9-e1fe-4adc-a2de-10c26567729a" TYPE="ext4"
    /dev/sda10: LABEL="Fd-swp" UUID="d8b3cdd6-908f-4a5d-8ac5-9ec1dfb62fa6" TYPE="swap"
    

Here, sda8 is the Fedora root partition.

My question is how to fix or overcome this problem? Do I have to install some additional package for encrypted sda8 or something else?

  • Your initrd in /dev/sda9 should have what's necessary to unlock the LUKS container and proceed booting from there. The problem is GRUB doesn't know about your Fedora installation. Do you have a grub2 configuration in /dev/sda9? This would be a separate config from the grub installed from Ubuntu. – Emmanuel Rosa Apr 27 '18 at 14:13
  • This happened because you chose not to install the bootloader. Try booting Ubuntu and running grub-install again. – Michael Hampton Apr 27 '18 at 14:49
  • @EmmanuelRosa No, grub2 not configured on /dev/sda9. can you tell me the steps to do that? – bijay Apr 27 '18 at 15:08
  • @MichaelHampton ok, but there was already grub2 of ubuntu – bijay Apr 27 '18 at 15:15
  • so, I am asking you both, what is the solution of it? – bijay Apr 27 '18 at 15:16
0

Fedora 26 uses Anaconda as the installer. Anaconda doesn't make a distinction between the two GRUB2 stages when installing the boot loader; You either install GRUB2 completely, or not at all:

If you choose not to install a boot loader for any reason, you will not be able to boot the system directly, and you must use another boot method, such as a stand-alone commercial boot loader application. Use this option only if you are sure you have another way to boot your system. - Source https://docs.fedoraproject.org/f26/install-guide/install/Installing_Using_Anaconda.html#sect-installation-gui-storage-partitioning-bootloader

In short, not installing GRUB2 from Fedora/Anaconda means a world of hurt. Here's your best bet:

  1. Reinstall Fedora 26 with the boot loader. This is going to sacrifice the GRUB2 stage1 installed by Ubuntu, but Fedora will then boot; Ubuntu will not. Make sure you use a separate boot partition for Fedora, like you've already done.
  2. Use GRUB2's ability to load another configuration to create a menu entry which loads Ubuntu's GRUB2 configuration.

In other words, you'd be delegating ownership of the boot process to Fedora.

Loading the Ubuntu GRUB2 menu from Fedora

Here's approximately how to complete step two:

  1. Boot Fedora
  2. Mount your /boot partition if it's not already mounted: mount /boot
  3. Update /etc/fstab to automatically mount Ubuntu's boot partition:

mkdir /mnt/ubuntu echo "/dev/sda5 /mnt/ubuntu ext4 defaults,ro 0 0" >> /etc/fstab

  1. Mount the Ubuntu boot partition: mount -t ext4 /dev/sda5 /mnt/ubuntu
  2. Create a custom menu entry which simply loads Ubuntu's GRUB2 config. Append the following to /etc/grub.d/40_custom:

menuentry 'Ubuntu' --class gnu-linux --class gnu --class os $menuentry_id_option 'ubuntu-xyz' { set root='hd0,msdos5' configfile /mnt/ubuntu/grub2/grub.cfg }

  1. Update Fedora's GRUB2 config so that it adds your new menu: grub2-mkconfig -o /boot/grub2/grub.cfg
  2. Reboot and cross your finders.

Warning

This process is a delicate procedure. It's provided as a best-effort solution considering I do not have your computer in front of me. Don't be surprised if it doesn't work. Take any necessary backups and proceed with the full acknowledgement that it may go from bad to worse; You may have to wipe the disk and start over.

  • thanx. i will try & tell you the results. – bijay Apr 27 '18 at 20:37
  • thank God! it worked! @Emmanuel before trying your suggested method, I reinstalled fedora once again as a last resort.but this time, the /dev/sda8 i.e fedora-root partition without any encryption and mounted from Ubuntu.then 'sudo update-grub' recognized the root. last time /dev/sda8 could not be mounted, I dont know why. Default 'seahorse' was unable to mount it. may be I should have installed some crypto-package. may be, there is a bug on fedora side. power users can explain the cause better. however, thanks to all members & moderators especially Emmanuel & Michael for their inputs. Bye! – bijay Apr 28 '18 at 6:33
  • 1 question remains, how to install is case of LUKS-encrypted root partition? – bijay Apr 28 '18 at 6:35
  • Anaconda knows how to handle an encrypted root partition; It ensures there's a separate /boot partition which is not encrypted. The Linux kernel and the initrd ramdisk are stored in the unencrypted /boot partition so the boot loader can access it. It's the initrd that's responsible for (among other things) prompting for the LUKS password and unlocking the root partition. – Emmanuel Rosa Apr 28 '18 at 16:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.