Clean Install of 18.04 Boots to Grub Prompt

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
3
down vote

favorite












I'm stuck at a grub prompt since installing Ubuntu 18.04. I have tried all the things I can find online but I'm stumped.



It was a clean install of Ubuntu 18.04 started from a USB stick. I had 17.10 installed but selected to overwrite my old installation during the new install. I also have a Windows 10 partition as I dual boot.



The install happened fine, but now when I boot my machine I end up at the grub> prompt.



If I type exit Ubuntu boots with no problems.



If I manually select the drive with Windows on from my BIOS it loads with no problems.



I tried using the grub-rescue disk tool but it says it can't run because it's not in EFI mode.



An output of the diagnostics from this shows:



=================== Suggested repair
The default repair of the Boot-Repair utility would purge (in order to fix packages) and reinstall the grub-efi-amd64-signed of nvme0n1p7, using the following options: nvme0n1p1/boot/efi,
Additional repair would be performed: unhide-bootmenu-10s fix-windows-boot use-standard-efi-file


I've tried installing grub using this:



sudo grub-install --efi-directory=/dev/nvme0n1p1/


But I get an error:



Installing for i386-pc platform.
grub-install: error: install device is not specified.


It's a nvmie drive. I'm a bit stumped. Any ideas of what else I can try?







share|improve this question






















  • have you tried sudo grub-install --target=x86_64-efi --efi-directory=/dev/nvme0n1p1/
    – j-money
    May 14 at 16:52










  • What is the grub-rescue disk tool? Do you mean boot-repair?
    – mook765
    May 14 at 17:10










  • Did you reboot Ubuntu live installer in UEFI mode & run the suggested fix from Boot-Repair? It looks like that should work.
    – oldfred
    May 14 at 18:02














up vote
3
down vote

favorite












I'm stuck at a grub prompt since installing Ubuntu 18.04. I have tried all the things I can find online but I'm stumped.



It was a clean install of Ubuntu 18.04 started from a USB stick. I had 17.10 installed but selected to overwrite my old installation during the new install. I also have a Windows 10 partition as I dual boot.



The install happened fine, but now when I boot my machine I end up at the grub> prompt.



If I type exit Ubuntu boots with no problems.



If I manually select the drive with Windows on from my BIOS it loads with no problems.



I tried using the grub-rescue disk tool but it says it can't run because it's not in EFI mode.



An output of the diagnostics from this shows:



=================== Suggested repair
The default repair of the Boot-Repair utility would purge (in order to fix packages) and reinstall the grub-efi-amd64-signed of nvme0n1p7, using the following options: nvme0n1p1/boot/efi,
Additional repair would be performed: unhide-bootmenu-10s fix-windows-boot use-standard-efi-file


I've tried installing grub using this:



sudo grub-install --efi-directory=/dev/nvme0n1p1/


But I get an error:



Installing for i386-pc platform.
grub-install: error: install device is not specified.


It's a nvmie drive. I'm a bit stumped. Any ideas of what else I can try?







share|improve this question






















  • have you tried sudo grub-install --target=x86_64-efi --efi-directory=/dev/nvme0n1p1/
    – j-money
    May 14 at 16:52










  • What is the grub-rescue disk tool? Do you mean boot-repair?
    – mook765
    May 14 at 17:10










  • Did you reboot Ubuntu live installer in UEFI mode & run the suggested fix from Boot-Repair? It looks like that should work.
    – oldfred
    May 14 at 18:02












up vote
3
down vote

favorite









up vote
3
down vote

favorite











I'm stuck at a grub prompt since installing Ubuntu 18.04. I have tried all the things I can find online but I'm stumped.



It was a clean install of Ubuntu 18.04 started from a USB stick. I had 17.10 installed but selected to overwrite my old installation during the new install. I also have a Windows 10 partition as I dual boot.



The install happened fine, but now when I boot my machine I end up at the grub> prompt.



If I type exit Ubuntu boots with no problems.



If I manually select the drive with Windows on from my BIOS it loads with no problems.



I tried using the grub-rescue disk tool but it says it can't run because it's not in EFI mode.



An output of the diagnostics from this shows:



=================== Suggested repair
The default repair of the Boot-Repair utility would purge (in order to fix packages) and reinstall the grub-efi-amd64-signed of nvme0n1p7, using the following options: nvme0n1p1/boot/efi,
Additional repair would be performed: unhide-bootmenu-10s fix-windows-boot use-standard-efi-file


I've tried installing grub using this:



sudo grub-install --efi-directory=/dev/nvme0n1p1/


But I get an error:



Installing for i386-pc platform.
grub-install: error: install device is not specified.


It's a nvmie drive. I'm a bit stumped. Any ideas of what else I can try?







share|improve this question














I'm stuck at a grub prompt since installing Ubuntu 18.04. I have tried all the things I can find online but I'm stumped.



It was a clean install of Ubuntu 18.04 started from a USB stick. I had 17.10 installed but selected to overwrite my old installation during the new install. I also have a Windows 10 partition as I dual boot.



The install happened fine, but now when I boot my machine I end up at the grub> prompt.



If I type exit Ubuntu boots with no problems.



If I manually select the drive with Windows on from my BIOS it loads with no problems.



I tried using the grub-rescue disk tool but it says it can't run because it's not in EFI mode.



An output of the diagnostics from this shows:



=================== Suggested repair
The default repair of the Boot-Repair utility would purge (in order to fix packages) and reinstall the grub-efi-amd64-signed of nvme0n1p7, using the following options: nvme0n1p1/boot/efi,
Additional repair would be performed: unhide-bootmenu-10s fix-windows-boot use-standard-efi-file


I've tried installing grub using this:



sudo grub-install --efi-directory=/dev/nvme0n1p1/


But I get an error:



Installing for i386-pc platform.
grub-install: error: install device is not specified.


It's a nvmie drive. I'm a bit stumped. Any ideas of what else I can try?









share|improve this question













share|improve this question




share|improve this question








edited May 18 at 16:29









Yufenyuy Veyeh Dider

649722




649722










asked May 9 at 10:43









Ludo

11128




11128











  • have you tried sudo grub-install --target=x86_64-efi --efi-directory=/dev/nvme0n1p1/
    – j-money
    May 14 at 16:52










  • What is the grub-rescue disk tool? Do you mean boot-repair?
    – mook765
    May 14 at 17:10










  • Did you reboot Ubuntu live installer in UEFI mode & run the suggested fix from Boot-Repair? It looks like that should work.
    – oldfred
    May 14 at 18:02
















  • have you tried sudo grub-install --target=x86_64-efi --efi-directory=/dev/nvme0n1p1/
    – j-money
    May 14 at 16:52










  • What is the grub-rescue disk tool? Do you mean boot-repair?
    – mook765
    May 14 at 17:10










  • Did you reboot Ubuntu live installer in UEFI mode & run the suggested fix from Boot-Repair? It looks like that should work.
    – oldfred
    May 14 at 18:02















have you tried sudo grub-install --target=x86_64-efi --efi-directory=/dev/nvme0n1p1/
– j-money
May 14 at 16:52




have you tried sudo grub-install --target=x86_64-efi --efi-directory=/dev/nvme0n1p1/
– j-money
May 14 at 16:52












What is the grub-rescue disk tool? Do you mean boot-repair?
– mook765
May 14 at 17:10




What is the grub-rescue disk tool? Do you mean boot-repair?
– mook765
May 14 at 17:10












Did you reboot Ubuntu live installer in UEFI mode & run the suggested fix from Boot-Repair? It looks like that should work.
– oldfred
May 14 at 18:02




Did you reboot Ubuntu live installer in UEFI mode & run the suggested fix from Boot-Repair? It looks like that should work.
– oldfred
May 14 at 18:02










4 Answers
4






active

oldest

votes

















up vote
0
down vote













Try booting with legacy boot mode. That was what I did to get my laptop to boot when my computer was unable to find a boot device.
Go into your boot menu (either delete, enter or F12 key)
and select Legacy instead of EFI, secure boot on or EFI, secure boot off.



Note: Because I don't know what computer you have, the instructions to enter boot menu may not work. If none of the key presses works, search “how to enter boot menu ” on Google.






share|improve this answer






















  • Hiya. Thanks, but my BIOS is already set to boot in legacy mode for both my OSs.
    – Ludo
    May 15 at 17:12

















up vote
0
down vote













If your system boots in Legacy Mode and GRUB was installed for an EFI target, it won't work.



I'd suggest the following:



If your device for the /boot folder is already correctly mounted (or the same with the /), try the command:



grub-install --boot-directory=/boot --target=i386-pc /dev/nvme0n1


This assuming /dev/nvme0n1 is the NVIDIA SSD disk (ALL, not a partition). Make sure to have a backup of your data.






share|improve this answer
















  • 1




    See askubuntu.com/help/merging-accounts for how to link your unregistered account
    – Martin Thornton
    May 18 at 18:46

















up vote
0
down vote













To install grub you need to specify the correct parameters for the grub-install command.



This is what i used about an hour ago to reinstall grub after booting to the prompt too:



sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader=ubuntu --boot-directory=/boot/efi/EFI/ubuntu --recheck


Assuming you have mounted the boot partition to /boot, and the EFI partition to /boot/efi, the above command should work given that there is enough space to fit grub on the EFI partition.



If you are installing to a USB drive and don't want to install grub to your PC's EFI partition, make sure that there is an EFI partition on the USB drive and that that partition is mounted to /boot/efi instead of your PC's.






share|improve this answer



























    up vote
    0
    down vote













    Reinstall Ubuntu in CSM / Legacy mode



    There was confusion about whether your installation was UEFI or CSM (Legacy BIOS mode). Recent comments show it's the latter. Using this reference:



    Converting Ubuntu into Legacy mode



    Note: Use this procedure only to convert an UEFI-mode Linux installation to boot in BIOS/CSM/legacy mode. Such a conversion may be necessary if some hardware doesn't work correctly under UEFI mode. (Video cards are a common source of problems.) Converting to boot in BIOS/CSM/legacy mode while Windows boots in UEFI mode can make the boot process more awkward -- you'll need to use the computer's built-in boot manager to switch between OSes, and some computer's have such poor boot managers that this may be impossible.



    1. If Ubuntu is installed on a GPT disk (you can check it via the 'sudo parted -l' command), use Gparted to create a BIOS-Boot partition (1MB, unformatted filesystem, bios_grub flag) at the start of its disk.


    2. Start Boot-Repair, click on "Advanced options", go to the "GRUB location" tab.


    3. Untick the "Separate /boot/efi partition" option

    4. Click the "Apply" button.


    5. Set up your BIOS so that it boots the HDD in Legacy mode (see the ""Set up the BIOS in UEFI or Legacy mode" paragraph above).



    Original answer below



    You are trying to install grub to your root partition but it needs to go into the EFI partition which is about 500 MB usually. Full instructions are available here



    Basically the correct syntax is:



    sudo grub-install --target=x86_64-efi --efi-directory=esp --bootloader-id=GRUB





    share|improve this answer






















    • Thanks! I followed the info there and ended up with these commands: $ sudo mkdir /mnt/efi $ sudo mount /dev/nvme0n1p1 /mnt/efi $ sudo grub-install --target=x86_64-efi --efi-directory=/mnt/efi -- bootloader-id=GRUB Installing for x86_64-efi platform. EFI variables are not supported on this system. EFI variables are not supported on this system. grub-install: error: efibootmgr failed to register the boot entry: No such file or directory.
      – Ludo
      May 15 at 17:21











    • That does seem to have put something there despite the error: ` $ ls -l /mnt/efi total 8 drwxr-xr-x 3 root root 4096 May 8 17:41 boot drwxr-xr-x 6 root root 4096 May 15 18:18 EFI `
      – Ludo
      May 15 at 17:21











    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "89"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );








     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1033978%2fclean-install-of-18-04-boots-to-grub-prompt%23new-answer', 'question_page');

    );

    Post as a guest






























    4 Answers
    4






    active

    oldest

    votes








    4 Answers
    4






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    Try booting with legacy boot mode. That was what I did to get my laptop to boot when my computer was unable to find a boot device.
    Go into your boot menu (either delete, enter or F12 key)
    and select Legacy instead of EFI, secure boot on or EFI, secure boot off.



    Note: Because I don't know what computer you have, the instructions to enter boot menu may not work. If none of the key presses works, search “how to enter boot menu ” on Google.






    share|improve this answer






















    • Hiya. Thanks, but my BIOS is already set to boot in legacy mode for both my OSs.
      – Ludo
      May 15 at 17:12














    up vote
    0
    down vote













    Try booting with legacy boot mode. That was what I did to get my laptop to boot when my computer was unable to find a boot device.
    Go into your boot menu (either delete, enter or F12 key)
    and select Legacy instead of EFI, secure boot on or EFI, secure boot off.



    Note: Because I don't know what computer you have, the instructions to enter boot menu may not work. If none of the key presses works, search “how to enter boot menu ” on Google.






    share|improve this answer






















    • Hiya. Thanks, but my BIOS is already set to boot in legacy mode for both my OSs.
      – Ludo
      May 15 at 17:12












    up vote
    0
    down vote










    up vote
    0
    down vote









    Try booting with legacy boot mode. That was what I did to get my laptop to boot when my computer was unable to find a boot device.
    Go into your boot menu (either delete, enter or F12 key)
    and select Legacy instead of EFI, secure boot on or EFI, secure boot off.



    Note: Because I don't know what computer you have, the instructions to enter boot menu may not work. If none of the key presses works, search “how to enter boot menu ” on Google.






    share|improve this answer














    Try booting with legacy boot mode. That was what I did to get my laptop to boot when my computer was unable to find a boot device.
    Go into your boot menu (either delete, enter or F12 key)
    and select Legacy instead of EFI, secure boot on or EFI, secure boot off.



    Note: Because I don't know what computer you have, the instructions to enter boot menu may not work. If none of the key presses works, search “how to enter boot menu ” on Google.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited May 18 at 14:32









    David Foerster

    26k1361106




    26k1361106










    answered May 15 at 11:28









    Bitblocks

    263




    263











    • Hiya. Thanks, but my BIOS is already set to boot in legacy mode for both my OSs.
      – Ludo
      May 15 at 17:12
















    • Hiya. Thanks, but my BIOS is already set to boot in legacy mode for both my OSs.
      – Ludo
      May 15 at 17:12















    Hiya. Thanks, but my BIOS is already set to boot in legacy mode for both my OSs.
    – Ludo
    May 15 at 17:12




    Hiya. Thanks, but my BIOS is already set to boot in legacy mode for both my OSs.
    – Ludo
    May 15 at 17:12












    up vote
    0
    down vote













    If your system boots in Legacy Mode and GRUB was installed for an EFI target, it won't work.



    I'd suggest the following:



    If your device for the /boot folder is already correctly mounted (or the same with the /), try the command:



    grub-install --boot-directory=/boot --target=i386-pc /dev/nvme0n1


    This assuming /dev/nvme0n1 is the NVIDIA SSD disk (ALL, not a partition). Make sure to have a backup of your data.






    share|improve this answer
















    • 1




      See askubuntu.com/help/merging-accounts for how to link your unregistered account
      – Martin Thornton
      May 18 at 18:46














    up vote
    0
    down vote













    If your system boots in Legacy Mode and GRUB was installed for an EFI target, it won't work.



    I'd suggest the following:



    If your device for the /boot folder is already correctly mounted (or the same with the /), try the command:



    grub-install --boot-directory=/boot --target=i386-pc /dev/nvme0n1


    This assuming /dev/nvme0n1 is the NVIDIA SSD disk (ALL, not a partition). Make sure to have a backup of your data.






    share|improve this answer
















    • 1




      See askubuntu.com/help/merging-accounts for how to link your unregistered account
      – Martin Thornton
      May 18 at 18:46












    up vote
    0
    down vote










    up vote
    0
    down vote









    If your system boots in Legacy Mode and GRUB was installed for an EFI target, it won't work.



    I'd suggest the following:



    If your device for the /boot folder is already correctly mounted (or the same with the /), try the command:



    grub-install --boot-directory=/boot --target=i386-pc /dev/nvme0n1


    This assuming /dev/nvme0n1 is the NVIDIA SSD disk (ALL, not a partition). Make sure to have a backup of your data.






    share|improve this answer












    If your system boots in Legacy Mode and GRUB was installed for an EFI target, it won't work.



    I'd suggest the following:



    If your device for the /boot folder is already correctly mounted (or the same with the /), try the command:



    grub-install --boot-directory=/boot --target=i386-pc /dev/nvme0n1


    This assuming /dev/nvme0n1 is the NVIDIA SSD disk (ALL, not a partition). Make sure to have a backup of your data.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered May 18 at 18:27









    Vlad

    11




    11







    • 1




      See askubuntu.com/help/merging-accounts for how to link your unregistered account
      – Martin Thornton
      May 18 at 18:46












    • 1




      See askubuntu.com/help/merging-accounts for how to link your unregistered account
      – Martin Thornton
      May 18 at 18:46







    1




    1




    See askubuntu.com/help/merging-accounts for how to link your unregistered account
    – Martin Thornton
    May 18 at 18:46




    See askubuntu.com/help/merging-accounts for how to link your unregistered account
    – Martin Thornton
    May 18 at 18:46










    up vote
    0
    down vote













    To install grub you need to specify the correct parameters for the grub-install command.



    This is what i used about an hour ago to reinstall grub after booting to the prompt too:



    sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader=ubuntu --boot-directory=/boot/efi/EFI/ubuntu --recheck


    Assuming you have mounted the boot partition to /boot, and the EFI partition to /boot/efi, the above command should work given that there is enough space to fit grub on the EFI partition.



    If you are installing to a USB drive and don't want to install grub to your PC's EFI partition, make sure that there is an EFI partition on the USB drive and that that partition is mounted to /boot/efi instead of your PC's.






    share|improve this answer
























      up vote
      0
      down vote













      To install grub you need to specify the correct parameters for the grub-install command.



      This is what i used about an hour ago to reinstall grub after booting to the prompt too:



      sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader=ubuntu --boot-directory=/boot/efi/EFI/ubuntu --recheck


      Assuming you have mounted the boot partition to /boot, and the EFI partition to /boot/efi, the above command should work given that there is enough space to fit grub on the EFI partition.



      If you are installing to a USB drive and don't want to install grub to your PC's EFI partition, make sure that there is an EFI partition on the USB drive and that that partition is mounted to /boot/efi instead of your PC's.






      share|improve this answer






















        up vote
        0
        down vote










        up vote
        0
        down vote









        To install grub you need to specify the correct parameters for the grub-install command.



        This is what i used about an hour ago to reinstall grub after booting to the prompt too:



        sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader=ubuntu --boot-directory=/boot/efi/EFI/ubuntu --recheck


        Assuming you have mounted the boot partition to /boot, and the EFI partition to /boot/efi, the above command should work given that there is enough space to fit grub on the EFI partition.



        If you are installing to a USB drive and don't want to install grub to your PC's EFI partition, make sure that there is an EFI partition on the USB drive and that that partition is mounted to /boot/efi instead of your PC's.






        share|improve this answer












        To install grub you need to specify the correct parameters for the grub-install command.



        This is what i used about an hour ago to reinstall grub after booting to the prompt too:



        sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader=ubuntu --boot-directory=/boot/efi/EFI/ubuntu --recheck


        Assuming you have mounted the boot partition to /boot, and the EFI partition to /boot/efi, the above command should work given that there is enough space to fit grub on the EFI partition.



        If you are installing to a USB drive and don't want to install grub to your PC's EFI partition, make sure that there is an EFI partition on the USB drive and that that partition is mounted to /boot/efi instead of your PC's.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered May 20 at 6:37









        x13

        1567




        1567




















            up vote
            0
            down vote













            Reinstall Ubuntu in CSM / Legacy mode



            There was confusion about whether your installation was UEFI or CSM (Legacy BIOS mode). Recent comments show it's the latter. Using this reference:



            Converting Ubuntu into Legacy mode



            Note: Use this procedure only to convert an UEFI-mode Linux installation to boot in BIOS/CSM/legacy mode. Such a conversion may be necessary if some hardware doesn't work correctly under UEFI mode. (Video cards are a common source of problems.) Converting to boot in BIOS/CSM/legacy mode while Windows boots in UEFI mode can make the boot process more awkward -- you'll need to use the computer's built-in boot manager to switch between OSes, and some computer's have such poor boot managers that this may be impossible.



            1. If Ubuntu is installed on a GPT disk (you can check it via the 'sudo parted -l' command), use Gparted to create a BIOS-Boot partition (1MB, unformatted filesystem, bios_grub flag) at the start of its disk.


            2. Start Boot-Repair, click on "Advanced options", go to the "GRUB location" tab.


            3. Untick the "Separate /boot/efi partition" option

            4. Click the "Apply" button.


            5. Set up your BIOS so that it boots the HDD in Legacy mode (see the ""Set up the BIOS in UEFI or Legacy mode" paragraph above).



            Original answer below



            You are trying to install grub to your root partition but it needs to go into the EFI partition which is about 500 MB usually. Full instructions are available here



            Basically the correct syntax is:



            sudo grub-install --target=x86_64-efi --efi-directory=esp --bootloader-id=GRUB





            share|improve this answer






















            • Thanks! I followed the info there and ended up with these commands: $ sudo mkdir /mnt/efi $ sudo mount /dev/nvme0n1p1 /mnt/efi $ sudo grub-install --target=x86_64-efi --efi-directory=/mnt/efi -- bootloader-id=GRUB Installing for x86_64-efi platform. EFI variables are not supported on this system. EFI variables are not supported on this system. grub-install: error: efibootmgr failed to register the boot entry: No such file or directory.
              – Ludo
              May 15 at 17:21











            • That does seem to have put something there despite the error: ` $ ls -l /mnt/efi total 8 drwxr-xr-x 3 root root 4096 May 8 17:41 boot drwxr-xr-x 6 root root 4096 May 15 18:18 EFI `
              – Ludo
              May 15 at 17:21















            up vote
            0
            down vote













            Reinstall Ubuntu in CSM / Legacy mode



            There was confusion about whether your installation was UEFI or CSM (Legacy BIOS mode). Recent comments show it's the latter. Using this reference:



            Converting Ubuntu into Legacy mode



            Note: Use this procedure only to convert an UEFI-mode Linux installation to boot in BIOS/CSM/legacy mode. Such a conversion may be necessary if some hardware doesn't work correctly under UEFI mode. (Video cards are a common source of problems.) Converting to boot in BIOS/CSM/legacy mode while Windows boots in UEFI mode can make the boot process more awkward -- you'll need to use the computer's built-in boot manager to switch between OSes, and some computer's have such poor boot managers that this may be impossible.



            1. If Ubuntu is installed on a GPT disk (you can check it via the 'sudo parted -l' command), use Gparted to create a BIOS-Boot partition (1MB, unformatted filesystem, bios_grub flag) at the start of its disk.


            2. Start Boot-Repair, click on "Advanced options", go to the "GRUB location" tab.


            3. Untick the "Separate /boot/efi partition" option

            4. Click the "Apply" button.


            5. Set up your BIOS so that it boots the HDD in Legacy mode (see the ""Set up the BIOS in UEFI or Legacy mode" paragraph above).



            Original answer below



            You are trying to install grub to your root partition but it needs to go into the EFI partition which is about 500 MB usually. Full instructions are available here



            Basically the correct syntax is:



            sudo grub-install --target=x86_64-efi --efi-directory=esp --bootloader-id=GRUB





            share|improve this answer






















            • Thanks! I followed the info there and ended up with these commands: $ sudo mkdir /mnt/efi $ sudo mount /dev/nvme0n1p1 /mnt/efi $ sudo grub-install --target=x86_64-efi --efi-directory=/mnt/efi -- bootloader-id=GRUB Installing for x86_64-efi platform. EFI variables are not supported on this system. EFI variables are not supported on this system. grub-install: error: efibootmgr failed to register the boot entry: No such file or directory.
              – Ludo
              May 15 at 17:21











            • That does seem to have put something there despite the error: ` $ ls -l /mnt/efi total 8 drwxr-xr-x 3 root root 4096 May 8 17:41 boot drwxr-xr-x 6 root root 4096 May 15 18:18 EFI `
              – Ludo
              May 15 at 17:21













            up vote
            0
            down vote










            up vote
            0
            down vote









            Reinstall Ubuntu in CSM / Legacy mode



            There was confusion about whether your installation was UEFI or CSM (Legacy BIOS mode). Recent comments show it's the latter. Using this reference:



            Converting Ubuntu into Legacy mode



            Note: Use this procedure only to convert an UEFI-mode Linux installation to boot in BIOS/CSM/legacy mode. Such a conversion may be necessary if some hardware doesn't work correctly under UEFI mode. (Video cards are a common source of problems.) Converting to boot in BIOS/CSM/legacy mode while Windows boots in UEFI mode can make the boot process more awkward -- you'll need to use the computer's built-in boot manager to switch between OSes, and some computer's have such poor boot managers that this may be impossible.



            1. If Ubuntu is installed on a GPT disk (you can check it via the 'sudo parted -l' command), use Gparted to create a BIOS-Boot partition (1MB, unformatted filesystem, bios_grub flag) at the start of its disk.


            2. Start Boot-Repair, click on "Advanced options", go to the "GRUB location" tab.


            3. Untick the "Separate /boot/efi partition" option

            4. Click the "Apply" button.


            5. Set up your BIOS so that it boots the HDD in Legacy mode (see the ""Set up the BIOS in UEFI or Legacy mode" paragraph above).



            Original answer below



            You are trying to install grub to your root partition but it needs to go into the EFI partition which is about 500 MB usually. Full instructions are available here



            Basically the correct syntax is:



            sudo grub-install --target=x86_64-efi --efi-directory=esp --bootloader-id=GRUB





            share|improve this answer














            Reinstall Ubuntu in CSM / Legacy mode



            There was confusion about whether your installation was UEFI or CSM (Legacy BIOS mode). Recent comments show it's the latter. Using this reference:



            Converting Ubuntu into Legacy mode



            Note: Use this procedure only to convert an UEFI-mode Linux installation to boot in BIOS/CSM/legacy mode. Such a conversion may be necessary if some hardware doesn't work correctly under UEFI mode. (Video cards are a common source of problems.) Converting to boot in BIOS/CSM/legacy mode while Windows boots in UEFI mode can make the boot process more awkward -- you'll need to use the computer's built-in boot manager to switch between OSes, and some computer's have such poor boot managers that this may be impossible.



            1. If Ubuntu is installed on a GPT disk (you can check it via the 'sudo parted -l' command), use Gparted to create a BIOS-Boot partition (1MB, unformatted filesystem, bios_grub flag) at the start of its disk.


            2. Start Boot-Repair, click on "Advanced options", go to the "GRUB location" tab.


            3. Untick the "Separate /boot/efi partition" option

            4. Click the "Apply" button.


            5. Set up your BIOS so that it boots the HDD in Legacy mode (see the ""Set up the BIOS in UEFI or Legacy mode" paragraph above).



            Original answer below



            You are trying to install grub to your root partition but it needs to go into the EFI partition which is about 500 MB usually. Full instructions are available here



            Basically the correct syntax is:



            sudo grub-install --target=x86_64-efi --efi-directory=esp --bootloader-id=GRUB






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited May 20 at 17:47

























            answered May 15 at 15:17









            WinEunuuchs2Unix

            35.3k758132




            35.3k758132











            • Thanks! I followed the info there and ended up with these commands: $ sudo mkdir /mnt/efi $ sudo mount /dev/nvme0n1p1 /mnt/efi $ sudo grub-install --target=x86_64-efi --efi-directory=/mnt/efi -- bootloader-id=GRUB Installing for x86_64-efi platform. EFI variables are not supported on this system. EFI variables are not supported on this system. grub-install: error: efibootmgr failed to register the boot entry: No such file or directory.
              – Ludo
              May 15 at 17:21











            • That does seem to have put something there despite the error: ` $ ls -l /mnt/efi total 8 drwxr-xr-x 3 root root 4096 May 8 17:41 boot drwxr-xr-x 6 root root 4096 May 15 18:18 EFI `
              – Ludo
              May 15 at 17:21

















            • Thanks! I followed the info there and ended up with these commands: $ sudo mkdir /mnt/efi $ sudo mount /dev/nvme0n1p1 /mnt/efi $ sudo grub-install --target=x86_64-efi --efi-directory=/mnt/efi -- bootloader-id=GRUB Installing for x86_64-efi platform. EFI variables are not supported on this system. EFI variables are not supported on this system. grub-install: error: efibootmgr failed to register the boot entry: No such file or directory.
              – Ludo
              May 15 at 17:21











            • That does seem to have put something there despite the error: ` $ ls -l /mnt/efi total 8 drwxr-xr-x 3 root root 4096 May 8 17:41 boot drwxr-xr-x 6 root root 4096 May 15 18:18 EFI `
              – Ludo
              May 15 at 17:21
















            Thanks! I followed the info there and ended up with these commands: $ sudo mkdir /mnt/efi $ sudo mount /dev/nvme0n1p1 /mnt/efi $ sudo grub-install --target=x86_64-efi --efi-directory=/mnt/efi -- bootloader-id=GRUB Installing for x86_64-efi platform. EFI variables are not supported on this system. EFI variables are not supported on this system. grub-install: error: efibootmgr failed to register the boot entry: No such file or directory.
            – Ludo
            May 15 at 17:21





            Thanks! I followed the info there and ended up with these commands: $ sudo mkdir /mnt/efi $ sudo mount /dev/nvme0n1p1 /mnt/efi $ sudo grub-install --target=x86_64-efi --efi-directory=/mnt/efi -- bootloader-id=GRUB Installing for x86_64-efi platform. EFI variables are not supported on this system. EFI variables are not supported on this system. grub-install: error: efibootmgr failed to register the boot entry: No such file or directory.
            – Ludo
            May 15 at 17:21













            That does seem to have put something there despite the error: ` $ ls -l /mnt/efi total 8 drwxr-xr-x 3 root root 4096 May 8 17:41 boot drwxr-xr-x 6 root root 4096 May 15 18:18 EFI `
            – Ludo
            May 15 at 17:21





            That does seem to have put something there despite the error: ` $ ls -l /mnt/efi total 8 drwxr-xr-x 3 root root 4096 May 8 17:41 boot drwxr-xr-x 6 root root 4096 May 15 18:18 EFI `
            – Ludo
            May 15 at 17:21













             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1033978%2fclean-install-of-18-04-boots-to-grub-prompt%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            How do so many people here on Academia.SE, and in general, afford lavish higher education programs?

            Trouble downloading packages list due to a “Hash sum mismatch” error

            How do I move numbers in filenames, in a batch renaming operation?