linuxubuntuunixgrub

Grub can't find grub.cfg file -- Stuck at GRUB Command Line


I am using a GPT/UEFI system. I installed KDE neon and I was using it without any problem since the summer. Then today, I deleted /EFI/ubuntu/ and after I reboot the system, it stuck at the GRUB command line, "grub> ".

  1. I can boot the system by writing following command to the GRUB command line

    configfile (hd0,gpt1)/EFI/neon/grub.cfg

  2. Also, the following command works

    configfile (hd0,gpt2)/boot/grub/grub.cfg

  3. Also, the following command works

    set prefix=(hd0,gpt2)/boot/grub set root=(hd0,gpt2)/boot normal

  4. I tried the following to fix by booting the system, but none of them worked

    • boot-repair program
    • update-grub
    • apt install --reinstall grub-efi && update-grub

So this is the situation. How can I fix the problem?


Solution

  • I have just fixed the problem!

    1. I boot the system manually by entering command to grub> command line. (one of the command that I mentioned in the question)
    2. I opened a terminal.
    3. cd /boot/efi/EFI
    4. cp -r ./neon ./ubuntu
    5. Reboot and it works fine.

    I think the problem is specific for KDE Neon because it gave me exactly same problem when I installed it to a new computer. Grub is not looking inside the "/EFI/neon" directory. Instead, it is looking inside "/EFI/ubuntu" but cannot find it so it causes problem.

    BTW, the reason I named new folder as "ubuntu" is that KDE Neon is Ubuntu based.