Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: install 20.4 alongside win 10 failed with 'grub-install/dev/sda' failed

  1. #1
    Join Date
    Apr 2009
    Beans
    42

    install 20.4 alongside win 10 failed with 'grub-install/dev/sda' failed

    Hi been struggling with this for several hours. I have win 10 on a legacy bios. I had installed ubuntu20.04 successfully and dual booting fine. But silly me then decided to install LXQT 20.04 over that. This resulted in an abort at the grub stage and the grub rescue prompt and therefore no access to windows 10 any more. I then tried to reinstall ubuntu 20.04 thinking if it worked before perhaps it will work again. but this resulted in the fatal error at the end of the restore as in my title.

    I suspect this is all to do with Bios and uefi, but how do i overcome it. I wonder if because I have lost access to windows and have had to make the usb using the linux version of unetbootin this is trying to create a uefi boot on a legacy system?

    If it helps GParted shows:
    sda1 ntfs winre 19G
    sda2 ntfs win 8 144G
    sda4 extended
    sda5 fat32 513M
    sda6 fat32 512M boot,esp
    sda7 ext4 446G
    sda3 ntfs 868M msftres

    Any advice much appreciated as i am stuck

    The good news is that my windows partitions are still visible. So potentially everything is recoverable. I have also tried to repair the boot from the windows side using a repair disc and the command prompt but to no avail. I guess if there is not easy linux fix then it might be best to wipe the pc and do a clean reinstall windows 10 first.

    Thank you
    CIMH
    Last edited by cimh; October 19th, 2020 at 05:25 PM.

  2. #2
    Join Date
    Mar 2011
    Beans
    1,644

    Re: install 20.4 alongside win 10 failed with 'grub-install/dev/sda' failed

    Yes, looks like an attempt at a UEFI install was made, but putting the EFI partition on a logical disk probably wont work. Check your BIOs/UEFI settings for how your install USB boots, that's how the install will be done. Boot legacy, then do a grub-install on sda and you should be all set. Or maybe just putting legacy preferred over UEFI will let your existing system boot.

  3. #3
    Join Date
    May 2013
    Location
    Galiza
    Beans
    2,873
    Distro
    Ubuntu

    Re: install 20.4 alongside win 10 failed with 'grub-install/dev/sda' failed

    Honestly, it's baffling.

    Since 2012 Microsoft requires vendors to install Windows in UEFI mode (where applicable) and UEFI existed in PCs years before that, in Apple machines even older.
    And here we are just months away from 2021 and users still insist in doing Legacy installations (Windows in this case). Legacy/CSM/"BIOS" mode is still an option in the firmware for OSes that don't support UEFI mode and only those, which doesn't make much sense anyway because the last "BIOS only" Windows is XP, unsupported since 2014.

    I would take the opportunity and reinstall both OSes in UEFI mode as it should be and much easier and safer for dual-booting. But if you don't want to reinstall Windows, and assuming it's in Legacy mode, then you must boot and install Ubuntu in Legacy as well.

  4. #4
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: install 20.4 alongside win 10 failed with 'grub-install/dev/sda' failed

    I assume you must have installed Windows 10 yourself as it would appear to be using msdos/BIOS partitioning scheme instead of the expected UEFI/GPT.

    To let us see the full story go to Boot-Repair in my signature below and follow the instructions there to run the Boot-Info-Script. Do not run the default repair just yet but simply copy back here the pastebin link you get which will show us a lot more about your system.

  5. #5
    Join Date
    Apr 2009
    Beans
    42

    Re: install 20.4 alongside win 10 failed with 'grub-install/dev/sda' failed

    Ajgreeny - Brilliant and thank you - However, I read your bit too quickly and ran the repair as everything seemed to be going well AND my pc now boots to the installed Ubuntu. Thats a very impressive script! No grub screen came up so I do not have a means of accessing windows as yet - But this is great - Can you guide me as to how we pick up Win 10? Hopefully this report might help? https://paste.ubuntu.com/p/898yxJV7BN/ I can see it shows win10 on sda2 and it looks like it has boot files?

    CelticWarrior - Thank you too. I think I have learnt my lesson and will not risk doing this again for a while while the PC is in legacy bios mode. It came with win8 but it is fast and meets my needs. Sounds like a fresh install of windows in uefi mode might be wise at some point if I continue to run linux and win10. However I might be able to move to Linux fully soon having discovered darktable which seems to be a v good raw image editor and 90% of all my other stuff is cloud based.

  6. #6
    Join Date
    May 2013
    Location
    Galiza
    Beans
    2,873
    Distro
    Ubuntu

    Re: install 20.4 alongside win 10 failed with 'grub-install/dev/sda' failed

    You can't dual-boot with the Grub menu with the systems installed in different mode.
    To boot Windows you need to change the boot mode in UEFI and then it won't boot Ubuntu.

  7. #7
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: install 20.4 alongside win 10 failed with 'grub-install/dev/sda' failed

    Even though you booted installer & added Boot-Repair in UEFI mode, it looks like Boot-Repair was smart enough to know Windows in BIOS/MBR mode needed a BIOS version of grub and un-installed the UEFI version of grub. It also moved boot flag back to sda1 for Windows.

    UEFI & BIOS are not really compatible.
    Once you start booting in one mode, you cannot switch, so grub can only boot other installs in same mode.
    Windows only installs in UEFI mode to gpt partitioned drives.
    Windows only installs in BIOS mode to MBR partitioned drives.
    Ubuntu lets you install in UEFI mode to MBR drives, but really should not.

    Part of issue is Windows in BIOS mode needs boot flag on the primary NTFS partition with its boot files.
    But UEFI needs the boot,esp flags on the ESP - efi system partition. And only one boot flag per device/drive.

    Dual booting with BIOS on one drive worked reasonably well with Windows 7.
    But with Windows 10, it keeps turning on fast start up with update & then grub cannot boot it.
    With UEFI, you just go to UEFI and boot Windows, fix Windows & boot Ubuntu again. Sometimes you have to change boot order in UEFI as updates do change that also.

    But with BIOS you have to use your Windows repair disk, install Windows boot loader to MBR, fix Windows and then reinstall grub to MBR to dual boot, either manually or with Boot-Repair (actually easier manually, once you know how). Windows updates regularly, so becomes a regular hassle.

    Or you always need good backups, and both a Windows repair flash drive and an Ubuntu live installer.
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  8. #8
    Join Date
    Apr 2009
    Beans
    42

    Re: install 20.4 alongside win 10 failed with 'grub-install/dev/sda' failed

    Thank you Oldfred and CelticWarrior.
    I am wondering whats the best solution if I want to keep dual boot for now?
    1. Get back access to windows in bios and from their reinstall ubuntu in bios? - sounds like this is possible but not a great idea? and it seems ubuntu install defaults to efi?
    2. Reinstall windows in efi mode - is this posible while keeping ubuntu as is?
    3. Wipe the pc and do a clean install of both?

    My windows documents / pictures are backed up on a NAS so I dont mind a clean install if thats best. This PC hasn't been reset for at least 10yrs.

    Thanks again for your support

    Of interest the PC has 2 options for the Bios Boot - UEFI & BIOS and UEFI
    but which ever one I set it always boots into ubuntu but on both times the bios screen flashes up twice during the boot which is not normal. So presumably it tries to boot in bios fails and tries again in uefi?
    Last edited by cimh; October 20th, 2020 at 09:31 AM.

  9. #9
    Join Date
    May 2013
    Location
    Galiza
    Beans
    2,873
    Distro
    Ubuntu

    Re: install 20.4 alongside win 10 failed with 'grub-install/dev/sda' failed

    #2 isn't possible, oldfred already exlained the requirements - GPT for UEFI -.
    I would do #3 after converting the drive to GPT. That can be done with GParted in a Ubuntu live session. That also will delete everything in the drive.
    Then select UEFI only to assure everything else from then on boots and installs in UEFI mode.

    #1 is doable. It requires reinstalling Grub for BIOS mode.
    Last edited by CelticWarrior; October 20th, 2020 at 11:41 AM.

  10. #10
    Join Date
    Apr 2009
    Beans
    42

    Re: install 20.4 alongside win 10 failed with 'grub-install/dev/sda' failed

    CelticWarrior

    Thank you I'll go for #3 and do a clean install of ubuntu on a fresh formatted drive.

    Just a few final checks - before casting off:-

    1. Its ok to install ubuntu 1st then windows later?
    2. Do I switch the bios to uefi prior to doing the ubuntu install?
    3. Will the ubuntu install do all the work for me automatically or do I have to do the conversion from MBR to GPT separately?

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •