Announcement

Collapse
No announcement yet.

Weird dual boot issue

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Weird dual boot issue

    Every now and again when booting up I get the following error

    https://drive.google.com/open?id=11N...dn4lWGuR28UcMR

    I have 2 SSDs in the machine, 240GB with Windows 10, and another 480GB with Linux. Now, if I click F12 and choose to boot from the Linux drive sometimes it works, sometimes I get the same error. However, if I press F12 and choose to boot into Windows and then either restart or shut down and then power the machine back on, grub works absolutely fine and I get to choose if I want to boot Ubuntu or Windows.

    Any ideas!? It isn't that big of an issue since I can always seemingly get into either system, but it is irritating some times having to boot Windows and then reboot to get into Linux. Bizarre how it generally seems to happen if I'm in Linux and shut down, come back to the machine later and then boot. It is also odd how it seems to be fairly inconsistent.

    Many thanks in advance!!

    Ross

    #2
    Well, personally, I hate grub.

    So, what I would do - assuming you use EFI - is:
    Code:
    sudo apt-add-repository ppa:rodsmith/refind
    sudo apt update
    sudo apt install refind
    If you don't like it, you can always go back to grub with efibootmgr or selecting it in the BIOS.
    Chances are you will like, though

    Comment


      #3
      I tried that and it appeared to install successfully. However, upon reboot it says verification failed (0x1A security violation) and it will not boot.

      If I press F12 I can boot into windows. If I press F12 and choose Ubuntu it will load grub and work.

      What now? Cheers.

      Comment


        #4
        Well, do you really need Secure Boot?
        My guess is you don't really... but it's only a guess and I'm not qualified.

        The question probably is: how much do you use Windows, and above all, how much do you use it to access dodgy sites or clicking on dubious email links.
        If the answer is "not much", maybe try disabling it for a while, see how you like it, and then decide what's best for you.

        If you think this is not good advice in your case, it probably isn't, disregard.

        Comment


          #5
          Originally posted by Don B. Cilly View Post
          Well, do you really need Secure Boot?
          My guess is you don't really... but it's only a guess and I'm not qualified.

          The question probably is: how much do you use Windows, and above all, how much do you use it to access dodgy sites or clicking on dubious email links.
          If the answer is "not much", maybe try disabling it for a while, see how you like it, and then decide what's best for you.

          If you think this is not good advice in your case, it probably isn't, disregard.
          Unfortunately there's a specific piece of software which I NEED on Windows that isn't available on Linux and thus I do need Windows. To remove rEFInd is it just a case of going into "discover" and uninstalling it? Or would that mess with Grub some how, and leave me with a system that can't be booted?

          Thanks again

          Comment


            #6
            Not a big fan of throwing a software solution into the middle of a problem. I'm not saying that refind is bad stuff, but in this case it should probably have been reserved for a last resort solution.

            If you can get into your Kubuntu, open a konsole and enter each of these commands and post each result in separate CODE boxes.

            Code:
            lsblk -f
            Code:
            sudo fdisk -l
            Code:
            efibootmgr
            The next brick house on the left
            Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.24.7 | Kubuntu 22.04.4 | 6.5.0-18-generic

            Comment


              #7
              Originally posted by jglen490 View Post
              Not a big fan of throwing a software solution into the middle of a problem. I'm not saying that refind is bad stuff, but in this case it should probably have been reserved for a last resort solution.

              If you can get into your Kubuntu, open a konsole and enter each of these commands and post each result in separate CODE boxes.

              Code:
              lsblk -f
              Code:
              sudo fdisk -l
              Code:
              efibootmgr
              Code:
              [FONT=monospace][COLOR=#54FF54][B]ross@ross-Alienware-15-R2[/B][/COLOR]:[COLOR=#5454FF][B]~[/B][/COLOR]$ lsblk -f
              NAME FSTYPE LABEL         UUID                                 FSAVAIL FSUSE% MOUNTPOINT
              loop0
              │                                                                              
              └─veracrypt1
                 vfat                 817D-55F7                              24.6M     0% /media/ver
              sda                                                                            
              ├─sda1
              │    ntfs   System Reserved
              │                         A698075B9807297F                                     
              ├─sda2
              │    ntfs   Secondary     52DE02A1DE027E0B                      182.4G    27% /media/ros
              ├─sda3
              │    ntfs   Linux         01D559EC1FD67540                        111G     0% /media/ros
              ├─sda4
              │    ntfs                 74E011C2E0118C0C                      114.6M    75% /media/ros
              ├─sda5
              │    vfat                 9BC3-DC1C                                            
              └─sda6
                 ext4                 832a3d37-5175-477e-bd2d-326fe1ca899e   86.2G    10% /
              sdb  iso966 Kubuntu 18.04.3 LTS amd64
              │                         2019-08-05-19-21-11-00                               
              ├─sdb1
              │    iso966 Kubuntu 18.04.3 LTS amd64
              │                         2019-08-05-19-21-11-00                     0   100% /media/ros
              └─sdb2
                 vfat   Kubuntu 18.04.3 LTS amd64
                                      833C-CDB0                                            
              nvme0n1
              │                                                                              
              ├─nvme0n1p1
              │    vfat   ESP           B6B3-B45B                             459.6M     7% /boot/efi
              ├─nvme0n1p2
              │                                                                              
              ├─nvme0n1p3
              │    ntfs   OS            FE6417A9641763A5                      144.5G    36% /media/ros
              ├─nvme0n1p4
              │    ntfs                 9CA870D7A870B0FE                                     
              └─nvme0n1p5
                 ntfs   Image         9AC49247C4922613    [/FONT]


              Code:
              [FONT=monospace][COLOR=#54FF54][B]ross@ross-Alienware-15-R2[/B][/COLOR]:[COLOR=#5454FF][B]~[/B][/COLOR]$ sudo fdisk -l
              [sudo] password for ross:  
              [B]Disk /dev/loop0: 25 MiB, 26214400 bytes, 51200 sectors[/B]
              Units: sectors of 1 * 512 = 512 bytes
              Sector size (logical/physical): 512 bytes / 512 bytes
              I/O size (minimum/optimal): 512 bytes / 512 bytes
              
              [B]Disk /dev/nvme0n1: 238.5 GiB, 256060514304 bytes, 500118192 sectors[/B]
              Disk model: PM951 NVMe SAMSUNG 256GB                 
              Units: sectors of 1 * 512 = 512 bytes
              Sector size (logical/physical): 512 bytes / 512 bytes
              I/O size (minimum/optimal): 512 bytes / 512 bytes
              Disklabel type: gpt
              Disk identifier: E1759D5F-E66F-4164-AD8D-1C0606EC9EE8
              
              [B]Device[/B]         [B]    Start[/B] [B]      End[/B] [B]  Sectors[/B] [B]  Size[/B] [B]Type[/B]
              /dev/nvme0n1p1      2048   1026047   1024000   500M EFI System
              /dev/nvme0n1p2   1026048   1288191    262144   128M Microsoft reserved
              /dev/nvme0n1p3   1288192 472838758 471550567 224.9G Microsoft basic data
              /dev/nvme0n1p4 472840192 474882047   2041856   997M Windows recovery environment
              /dev/nvme0n1p5 474882048 500117503  25235456    12G Windows recovery environment
              
              [B]Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors[/B]
              Disk model: Samsung SSD 840  
              Units: sectors of 1 * 512 = 512 bytes
              Sector size (logical/physical): 512 bytes / 512 bytes
              I/O size (minimum/optimal): 512 bytes / 512 bytes
              Disklabel type: gpt
              Disk identifier: 065C7579-2817-12D8-AF68-409E07B2B396
              
              [B]Device[/B]     [B]    Start[/B] [B]      End[/B] [B]  Sectors[/B] [B]  Size[/B] [B]Type[/B]
              /dev/sda1       2048    206847    204800   100M Microsoft basic data
              /dev/sda2     206848 523655167 523448320 249.6G Microsoft basic data
              /dev/sda3  523655168 756570111 232914944 111.1G Microsoft basic data
              /dev/sda4  975849472 976771071    921600   450M Microsoft basic data
              /dev/sda5  756570112 757620735   1050624   513M EFI System
              /dev/sda6  757620736 975849471 218228736 104.1G Linux filesystem
              
              Partition table entries are not in disk order.
              
              [B]Disk /dev/mapper/veracrypt1: 24.8 MiB, 25952256 bytes, 50688 sectors[/B]
              Units: sectors of 1 * 512 = 512 bytes
              Sector size (logical/physical): 512 bytes / 512 bytes
              I/O size (minimum/optimal): 512 bytes / 512 bytes
              Disklabel type: dos
              Disk identifier: 0x00000000
              
              [B]Disk /dev/sdb: 29.1 GiB, 31221153792 bytes, 60978816 sectors[/B]
              Disk model: DataTraveler 2.0
              Units: sectors of 1 * 512 = 512 bytes
              Sector size (logical/physical): 512 bytes / 512 bytes
              I/O size (minimum/optimal): 512 bytes / 512 bytes
              Disklabel type: dos
              Disk identifier: 0x680ca237
              
              [B]Device[/B]     [B]Boot[/B] [B]  Start[/B] [B]    End[/B] [B]Sectors[/B] [B] Size[/B] [B]Id[/B] [B]Type[/B]
              /dev/sdb1  *          0 3803903 3803904  1.8G  0 Empty
              /dev/sdb2       3722708 3727635    4928  2.4M ef EFI (FAT-12/16/32)
              [/FONT]


              Code:
              [FONT=monospace][COLOR=#54FF54][B]ross@ross-Alienware-15-R2[/B][/COLOR]:[COLOR=#5454FF][B]~[/B][/COLOR]$ efibootmgr
              BootCurrent: 0003
              Timeout: 1 seconds
              BootOrder: 0004,0003,0000,0001,0002
              Boot0000* Windows Boot Manager
              Boot0001* Onboard NIC (IPV4)
              Boot0002* Onboard NIC (IPV6)
              Boot0003* ubuntu
              Boot0004* rEFInd Boot Manager
              [/FONT]

              Comment


                #8
                You can remove it or just ignore it. Tell your BIOS to use "Windows Boot Manager" or "ubuntu" as default.
                Either in the BIOS itself or with
                sudo efibootmgr -o 0,3,1,2,4
                (Windows, ubuntu, etc., rEFInd last.

                Even though the question wasn't whether you need Windows or not, it was "how much do you use Windows, and above all, how much do you use it to access dodgy sites or clicking on dubious email links."
                Hence, if you really need Secure Boot.

                You may want to look at this page to see if you can have both (rEFInd ans SB)
                According to that page "[Secure Boot] is intended to make it difficult for malware to insert itself early into the computer's boot process."
                And "Note: You don't have to use Secure Boot. If you don't want it, you can disable it".

                Unless, of course, you use Windows in such a way as to make it likely to have malware get into the BIOS.
                IMHO, it does take a little effort for that to happen
                But you know best.

                Comment


                  #9
                  Originally posted by Don B. Cilly View Post
                  You can remove it or just ignore it. Tell your BIOS to use "Windows Boot Manager" or "ubuntu" as default.
                  Either in the BIOS itself or with
                  sudo efibootmgr -o 0,3,1,2,4
                  (Windows, ubuntu, etc., rEFInd last.

                  Even though the question wasn't whether you need Windows or not, it was "how much do you use Windows, and above all, how much do you use it to access dodgy sites or clicking on dubious email links."
                  Hence, if you really need Secure Boot.

                  You may want to look at this page to see if you can have both (rEFInd ans SB)
                  According to that page "[Secure Boot] is intended to make it difficult for malware to insert itself early into the computer's boot process."
                  And "Note: You don't have to use Secure Boot. If you don't want it, you can disable it".

                  Unless, of course, you use Windows in such a way as to make it likely to have malware get into the BIOS.
                  IMHO, it does take a little effort for that to happen
                  But you know best.
                  Ah, in that case, the answer is never. However, when I disabled secure boot my Windows wouldn't boot...hence I have been weary to disable it again...Not sure how to get it to boot with secure boot turned off?

                  Comment


                    #10
                    It won't boot from the Windows Boot Manager or also from grub or rEFInd?
                    Because if it boots from either (or both) of those...

                    Comment


                      #11
                      Originally posted by Don B. Cilly View Post
                      It won't boot from the Windows Boot Manager or also from grub or rEFInd?
                      Because if it boots from either (or both) of those...
                      Before I installed Linux I disabled secure boot to see if it would install. When I disabled secure boot Windows wouldn't boot. I had to enable secure boot, reboot it... Then Windows said there was an error, o rebooted and then Windows worked.

                      I have yet to try disabling secure boot since installing Linux because I figure Windows wouldn't load...?

                      Thanks again

                      edit - I tried following these instructions:

                      https://www.howtogeek.com/114884/how...ntu-wont-boot/

                      But the first thing it said was to disable secure boot...but as above, I'm not sure whether that would break Windows? It seems odd that the Grub error only seems to occur after turning the machine back on having used Ubuntu (and it doesn't seem to happen every time), yet booting into Windows and then restarting cures the problem.
                      Last edited by CanyonRoss; Aug 25, 2019, 08:04 AM.

                      Comment


                        #12
                        Bit of an update

                        I disabled secure boot, and windows would boot providing I pressed F12 and selected windows. Was still having the intermittent issue with grub not working.

                        With secure boot disabled I ram the grub fixer as linked to above. I rebooted and my grub came up with LOTS of various options. I installed "grub customiser" and had a look at the various options and deleted what I didn't want.

                        I rebooted, grub appeared to work with just the options I'd chosen to have (Ubuntu, Ubuntu advanced settings, Windows and system settings). However, with secure boot disabled it wouldn't seem to boot unless I pressed F12 and chose Ubuntu. I think it was because Legacy was enabled and it was falling back to that. I enabled secure boot again to see if by running the above fix seemed to have worked.

                        I rebooted and without pressing F12 I was greeted by a working grub menu. Windows booted fine. I rebooted, grub working again and Linux also boots. I rebooted again and still grub appears to be working... Fingers firmly crossed it has been fixed and will continue to work!

                        Comment


                          #13
                          (I don't really understand how the various measures that's been taken have worked. But no-one has pointed out what the original error means.)
                          The screen you got is called the "grub rescue prompt". This term is useful if googling. The grub executable has loaded but grub can't find the rest of itself, normally all the stuff in /boot/grub. This often happens when a device is removed or moved around and grub gets lost.
                          Now, as to why your system got the rescue prompt intermittently, well, I can think of a couple of things:
                          • An intermittent hardware problem at boot.
                          • Something makes the machine boot from the wrong device, which has the remnants of a grub install.


                          It sounds to me like you've got the approach that you choose the OS by choosing what drive to boot from, keeping the OS's separate. UEFI, and grub in its default set up, don't think like that. UEFI wants to have one ESP, and boot from that ESP always. Grub wants to be always in control of the boot, and for you to run Windows from the Grub menu. Trying to keep the OS's separate (IMO entirely reasonable, to preclude one OS from screwing up the other) means you can end up fighting UEFI and grub, with various problems like getting the rescue prompt or Windows not booting, and leading to "I hate grub" sentiments.

                          BTW, /dev/sda2 looks odd, being NTFS and having the label "Linux". I suppose it may be ok, as storage accessible from both OS's, but confusing.
                          Regards, John Little

                          Comment


                            #14
                            First, you have a lot of EFI partitions!

                            But, the real question is: why is Legacy enabled? You should be able to boot to Windows 10 or Kubuntu in straight UEFI. Now from what I've read, some recovery tools require Legacy boot, but the actual OS should just boot straight up. As for Secure Boot, that feature is supposed to exist for the UEFI/BIOS to ensure that the installed Windows OS is valid, but even Microsoft has stated that the UEFI implementation does not need to check that. Kubuntu includes a binary that incorporates a security key code that is based on the Windows key stored in the UEFI firmware, but Kubuntu boots just fine with Secure Boot disabled.

                            Unless the manufacturer of that laptop has a strange implementation of UEFI, it should boot into either Windows or Kubuntu with straight UEFI (not Legacy) and with Secure Boot disabled - unless something screams - and with the drive controller set to AHCI. Again Windows shouldn't care about AHCI unless you're using some sort of a hardware RAID setup (including RST). Yes, you are more at the mercy of the manufacturer than you are at Microsoft's mercy.
                            The next brick house on the left
                            Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.24.7 | Kubuntu 22.04.4 | 6.5.0-18-generic

                            Comment


                              #15
                              Originally posted by jlittle View Post
                              (I don't really understand how the various measures that's been taken have worked. But no-one has pointed out what the original error means.)
                              The screen you got is called the "grub rescue prompt". This term is useful if googling. The grub executable has loaded but grub can't find the rest of itself, normally all the stuff in /boot/grub. This often happens when a device is removed or moved around and grub gets lost.
                              Now, as to why your system got the rescue prompt intermittently, well, I can think of a couple of things:
                              • An intermittent hardware problem at boot.
                              • Something makes the machine boot from the wrong device, which has the remnants of a grub install.


                              It sounds to me like you've got the approach that you choose the OS by choosing what drive to boot from, keeping the OS's separate. UEFI, and grub in its default set up, don't think like that. UEFI wants to have one ESP, and boot from that ESP always. Grub wants to be always in control of the boot, and for you to run Windows from the Grub menu. Trying to keep the OS's separate (IMO entirely reasonable, to preclude one OS from screwing up the other) means you can end up fighting UEFI and grub, with various problems like getting the rescue prompt or Windows not booting, and leading to "I hate grub" sentiments.

                              BTW, /dev/sda2 looks odd, being NTFS and having the label "Linux". I suppose it may be ok, as storage accessible from both OS's, but confusing.
                              The fix I did yesterday appears to have worked, still working fine so I assume it's not a hardware issue and must have been software related. I have called that drive "Linux" as that is the SDD that Linux is installed on, but yes, it has an NTFS partition as well.

                              Comment

                              Working...
                              X