Update from this post from the other day: What to know before Dual Booting Windows + Linux?

TLDR: I got it working, started learning, tried to fix a grub issue and borked the whole system.


So after considering all the advice, I went and disabled/prepped/backed up, and started the process. I managed to get Fedora KDE installed on another partition and everything was looking ok. I installed some programs, started learning for a few hours, but there was one small issue. The grub configuration from the video didn’t really work. Windows wasn’t booting by default, and when I tried to do the GRUB_SAVEDEFAULT=true to have it boot the last OS, it also didn’t work. When booting windows, a message would flash by saying '/EFI/fedora/grubenv' not found.

Looking more into it, the video says to use sudo grub2-mkconfig -o boot/efi/EFI/fedora/grub.cfg but I think the correct one now is grub2-mkconfig -o /boot/grub2/grub.cfg? I found this thread, but I couldn’t run the first command because it gave a conflict error, and I think there were two versions of grub2 installed?

So anyways, I tried running the setup again, thought it was ok and did a reboot to test… and got hit with a black screen with minimal BASH like line editing is supported.

At this point I’m a little worried and lost, thinking maybe I wasn’t ready to try this, and trying to get it back the way it was. I found this guide, but I get stuck trying to mount the EFI partition.

Any tips on where to go from here? Right now I plugged in the USB I used earlier, booted Fedora from it, and opened the terminal. Past that I’m a bit lost on how to fix grub.

  • ebits21
    link
    fedilink
    English
    arrow-up
    32
    ·
    edit-2
    1 year ago

    Lesson I also learned when I started out with Linux… don’t fuck with grub unless you really understand what you’re doing! Borking grub is a right of passage imo.

    I’m not sure how to fix your issue (I gave up on dual booting and just have windows in a virtual machine, so Windows doesn’t mess up grub).

    I always keep backups of the working grub config in case I need to restore. Just boot into a version of Linux on a usb key and copy the working config.

    • Papamousse@beehaw.org
      link
      fedilink
      arrow-up
      4
      ·
      1 year ago

      oh yes, did it multiple times… Now I’m using MX Linux, if I break something, I boot on the USB disk and click on the “repair boot”, and tada! it works again. But yeah I always keep a backup of my EFI in case of too.

      Grub is still better than LILO :)

    • OtterOPA
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 year ago

      I’ll have to give this another try tomorrow when I’m more awake. I probably should have just asked here when I had grub issues in the first place.

      Just boot into a version of Linux on a usb key and copy the working config.

      So I guess this is what the guides are saying, but I seem to get stuck on the installation step with this error grub2-install: error: this utility cannot be used for EFI platforms because it does not support UEFI Secure Boot. Hopefully I understand it better once i’m more awake. Thank you though!

  • ChojinDSL@discuss.tchncs.de
    link
    fedilink
    arrow-up
    12
    arrow-down
    1
    ·
    1 year ago

    You could take a look at refind, if you’re on a efi system. Refind is a boot manager that can either chainload other Bootmanagers, kernels as well as eny efi bootloader entries. Even if grub is borked. You can probably set it up on a usb stick or even find a rescue distro that uses refind. It’s good as a failsafe if you can’t get grub to work.

    • Unimps@iusearchlinux.fyi
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 year ago

      Agreed, I’ve been using refind for about a year now and it hasn’t failed me.

      I installed Windows on an isolated drive, connected another drive, installed Linux and refind.

      running a quick refind-install in the terminal picked up the windows bootloader and all of the Linux kernels that I have installed.

  • vlad@lemmy.sdf.org
    link
    fedilink
    arrow-up
    10
    arrow-down
    1
    ·
    1 year ago

    I wish you all the best. The way I avoid dealing with this on my own PC is I use separate physical drives. I unplug one, install OS, swap, install the other OS, and just use BIOS to choose which drive to boot from. I find that to be a lot less of a headache.

  • Crozekiel@lemmy.zip
    link
    fedilink
    arrow-up
    9
    ·
    1 year ago

    This is the reason I really like the distros that everyone shits all over for being “just pre-installed software, custom configs, and themes” like mint or Garuda or zorin… Almost all of them come out of the box with a graphical interface for managing grub settings (and most other parts of the OS) so you don’t have to faff with getting command line just right, you just select the thing you want from a drop down box and it works.

    I’ll probably get shit all over myself for saying this though, lol.

    • incogtino@lemmy.zip
      link
      fedilink
      English
      arrow-up
      4
      ·
      1 year ago

      Every time someone says experienced users should use a more difficult to use distribution I die a little inside - I happily use Mint, have done for years, why make my life more difficult?

  • OtterOPA
    link
    fedilink
    English
    arrow-up
    6
    arrow-down
    1
    ·
    edit-2
    1 year ago

    More specific questions might be better than my mess above:

    The guide I mentioned above seems to be the guide a few other forums reference. Is there a boot repair tool for Fedora KDE Plasma?

    Alternatively, I am able to make it to the last step of the regular guide, where I need to run

    sudo grub-install --boot-directory=/mnt/boot --bootloader-id=ubuntu --target=x86_64-efi --efi-directory=/mnt/boot/efi

    I get a sudo: grub-install: command not found message. Since I’m on Fedora and not Ubuntu, what would be the correct command for me, assuming that’s the reason. I didn’t think it would work, but I tried just swapping ‘fedora’ for ‘ubuntu’ and got the same error



    edit: Got a little further by using grub2 instead: sudo grub2-install --boot-directory=/mnt/boot --bootloader-id=ubuntu --target=x86_64-efi --efi-directory=/mnt/boot/efi, but got a new error:

    grub2-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn’t exist



    edit: Got a little further by running sudo dnf install grub2-efi-x64-modules. Now when I run that command, error is

    grub2-install: error: this utility cannot be used for EFI platforms because it does not support UEFI Secure Boot.

    secure boot is definitely off, so I’m stuck again

  • lily33@lemm.ee
    link
    fedilink
    arrow-up
    7
    arrow-down
    3
    ·
    edit-2
    1 year ago

    Honestly, if you’re new to linux, the best way to recover from borked GRUB is to reinstall linux. You can boot from a live CD, mount positions, chroot, and fix it, but I found that more difficult than reinstall until I had a bunch of experience.

    • freddy@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      Right, and while in the install process, and the installer detects there is another os in your drive, “tell” the installer (there will be the option to do this) that you want both systems and choose the order of prefered booting. It is the simpler way for a new user.

      I have been using linux since 2000 year and at firts had to learn how to configure lilo to get my cdrom working. When distros changed to grub i quit learning that stuff. Used my time learning other things, like R or chempaint.

      No one should begin tinkering with grub and other sensitive parts of your system, begin with the command line and system tools first.

  • lazyslacker@sh.itjust.works
    link
    fedilink
    arrow-up
    3
    arrow-down
    1
    ·
    1 year ago

    It’s been years since I dual booted. If you want Windows to be default I’m struggling to think of what could be gained by dual booting over just running your Linux system in a vm in Windows.

    • PrivacyBean@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      If you’re like me you’ll want to dual boot because two games you play often enough are Windows only (easy anti cheat). That and of course I use one or two software as daily driver that are Windows only

  • danielfgom@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    1
    ·
    1 year ago

    I would not recommend dual booting Fedora, it doesn’t like it. You’re better off with Mint or any Ubuntu flavour where the installer will setup dual boot easily.

  • Rogueren@discuss.tchncs.de
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    Welcome to dual booting with Windows! Best advice I can give is try to keep Windows away from your Linux drive as it doesn’t like to share. A 2nd drive for your Linux install can save a ton of headache (I went so far as to put Windows on my old PC when I upgraded).