TL;DR: bitlocker does not like grub

Full story:

Months ago I installed fedora on my desktop, dual booting Windows 11.

In all this time I never had the need to boot into windows. I remembered that it worked fine after install, good, and then I forgot about that.

Today I needed a specific windows only software, so at grub I chose the microsoft bootloader and… BITLOCKER.

Huh? Bitlocker? Me? What? Searched frantically for that decryption password in my keepass, did not find. What?? How???

After a few minutes staring at that screen I thought, ok let’s just wipe that shit and reclaim the space. I went back to linux, opened the partition manager, then remembered that i had something important in single copy over there. Noooooo

Went back to the boot screen to try again, still failed password.

Then I notice the error:

e_fve_pcr_mismatch

that mismatch lets me think that maybe I had something wrong in my booting.

I try to put windows first in the bios and it works! WHAT THE…???

So, if i put linux first, then launch windows from grub, bitlocker takes the windows partition under ransom, i can only access if windows is first. And of course in windows 11 x64 is no longer possible add linux partitions in their boot manager (previously it was possible)

Incompetence or maliciousness?

  • data1701d (He/Him)@startrek.website
    link
    fedilink
    English
    arrow-up
    13
    ·
    edit-2
    12 hours ago

    It’s not malicious or “ransomware”, and this is perfectly normal, default behavior for most devices - both macOS and Windows implement full disk encryption in a default install these days, and your key is almost always in your Microsoft Account on the Microsoft website. While Microsoft does a lot of crap wrong, in this case, Windows’s failure to decrypt under GRUB is security features actually kind of doing their job. Basically, trying to boot Windows through GRUB confuses the TPM, causing it to not want to give the keys in case the Windows boot partition has been tampered with by bad actors. Thus, you have to boot directly through Windows Boot Manager, not GRUB

    Also, secure boot and TPM aren’t just some conspiracy by Microsoft to block Linux; they are attempts at implementing legitimately necessary security features. Full disk encryption supported by correctly implemented secure boot and an encryption chip are essential to having modern security. Linux is not blocked by TPM and Secure Boot; it is certainly possible for Linux distributions to take advantage of them to enhance their own security. I have implemented automatic LUKS full disk encryption that similarly fails to unlock if the partition has been tampered with on my Debian install. In theory, they can actually be used to help improve your security.

    That is not to say I think TPM and secure boot are good, though. The really obnoxious thing about secure boot is that all the certificates are controlled by Microsoft rather than a standards body or a group of certificate authorities. While so far, Microsoft has kept it relatively open by providing the third party CA and the shim binary in order to avoid having its neck snapped by the FTC, considering the current administration, we don’t know how much longer they’ll keep it up, and they could actualize the much-feared blocking of Linux.

    The other big problem with TPMs and secure boot is that often, there are so many different implementations and frequently major security flaws in their implementations that weaken their protection. A typical petty thief stealing your laptop still probably won’t be able to decrypt your drive, but a nation state can probably find a way. It doesn’t help that Windows doesn’t encrypt communication between the CPU and the TPM (luckily, the Linux kernel does that by default). Despite these issues, I’d say TPM and Secure Boot is better than nothing for most devices; not using them at least in part means your device is more vulnerable to physical access and bootkit attacks than even most Windows laptops, and they are often the only tools at your defense

    • Moonrise2473@lemmy.mlOP
      link
      fedilink
      arrow-up
      6
      ·
      11 hours ago

      a nation state can probably find a way

      There’s no “probably”, they can surely find the way, because the decryption key is saved on Microsoft servers, they just need a subpoena for getting it

    • ZkhqrD5o@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      10 hours ago

      IMO, this does nothing because it only gives Microsoft full access to your device. And if you’re special enough to get the attention of someone capable and willing to physically steal your laptop, install a bootkit on it and give it back to you without you even noticing, then it’s just easier to just download the decryption keys from Microsoft at this point. It could have made all of this local like storing it in the TPM, a secure area of the CPU.

      Full disk encryption is cool, but not when tethered to Microsoft. With that, they brought themselves into a nasty position even if they didn’t want to. Just like when Apple made themselves the sole source of installing programmes on the iPhone devices. China gladly used that and is gladly using that.

  • spaghettiwestern@sh.itjust.works
    link
    fedilink
    arrow-up
    10
    ·
    edit-2
    10 hours ago

    A few years ago I booted up Windows after months of exclusively using Linux. When I ran Windows Update it deleted and overwrote my Linux partition! This wasn’t a grub issue, my files were gone and even file recovery utilities couldn’t find much. Plenty of others have experienced the same thing.

    This is still happening and is unquestionably pure maliciousness on Microsoft part.

  • tea@lemmy.today
    link
    fedilink
    arrow-up
    29
    arrow-down
    1
    ·
    22 hours ago

    I have given up dual-booting and just have a Windows VM for work things that require Windows. Less muss, less fuss and I can move the VM around as needed when moving between primary PCs.

    • Engywook@lemmy.zip
      link
      fedilink
      arrow-up
      9
      arrow-down
      2
      ·
      21 hours ago

      This. And fuck secure boot. Nowadays almost any of can run VMs flawlessly.

      • wildbus8979@sh.itjust.works
        link
        fedilink
        arrow-up
        5
        ·
        19 hours ago

        You can even use SecureBoot and TPM in a VM ;) OVMF EDK2 fully supports both ;)

        SecureBoot is fine, sucks that vendors won’t add distro keys but you can do that yourself, or use the shim.

      • anon5621@lemmy.ml
        link
        fedilink
        arrow-up
        6
        arrow-down
        1
        ·
        edit-2
        5 hours ago

        No why pay money for this to assholes,more over I use windows server edition which not possible to get if u are not business client and it cost 800$

        • SteveTech@aussie.zone
          link
          fedilink
          arrow-up
          1
          ·
          8 hours ago

          windows server edition which not possible to get if u are not business client and it cost 800$

          It probably depends on your uni, but students can get Windows Server licenses for free on Azure Education.

      • 9point6@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        20 hours ago

        You don’t have to

        If you only need it for 90 days before it expires, Microsoft will give you the VM for free (and if you’re particularly industrious, you might write a script that then installs a load of your shit for you to run after you fire up a fresh one)

        If you don’t care about potentially breaking the law you can run it forever with a couple of scripts you can find on GitHub

        If you don’t want to break the law but also don’t want to pay full price you can get a dubious but working key from sites like G2A and cdkeys

        If that’s still too sketchy there’s the OEM licenses (honestly not worth it since they can only activate on a single machine ever)

        Or finally you might feel sorry for Microsoft for some strange reason and want to go full retail price.

        Basically the same experience with all options for a lot of cases, they’re just happy to have users it seems

      • tea@lemmy.today
        link
        fedilink
        arrow-up
        3
        ·
        edit-2
        20 hours ago

        My work has licenses I can apply for VMs when I’m keeping them for longer client work, so yes they are licensed in my case.

        I wouldn’t do that for my own personal use though.

  • Buffalox@lemmy.world
    link
    fedilink
    arrow-up
    18
    arrow-down
    1
    ·
    edit-2
    22 hours ago

    Microsoft secure boot is 100% made to be a pain in the ass for Linux users. It doesn’t add any security, but is instead a huge added unnecessary risk factor for data loss for users.

    • 9point6@lemmy.world
      link
      fedilink
      arrow-up
      13
      arrow-down
      1
      ·
      21 hours ago

      It technically does add security in that it prevents a load of attack vectors that would dodge most anti malware tools (i.e. the ones before the anti malware tool can start)

      But you’re right in that the execution of the idea is unnecessarily painful for Linux

      • Buffalox@lemmy.world
        link
        fedilink
        arrow-up
        4
        arrow-down
        1
        ·
        20 hours ago

        OK so when did you hear of an actual successful attack that could have been avoided if the user had used secure boot?

        • 9point6@lemmy.world
          link
          fedilink
          arrow-up
          10
          arrow-down
          1
          ·
          edit-2
          17 hours ago

          Well boot sector viruses used to be all the rage in the 90s, they’re entirely impossible under secure boot

          Malware rootkits were a pretty big problem about a decade ago, I understand the techniques those mostly used are more or less impossible under secure boot now too

          Then we could go into all the government and adjacent industry use cases where state-sponsored targeted attacks are a real concern. Measures like filling USB ports with super glue and desoldering microphones on company laptops is not unheard of in those circles, so blocking unknown bootloaders from executing is an absolute no brainer.

          Saying it provides no security is just not true. Your front door isn’t only secure if someone has failed to break in

            • erebion@news.erebion.eu
              link
              fedilink
              English
              arrow-up
              1
              ·
              7 hours ago

              That’s just FUD. “Secure Boot keys are considered compromised.”…

              some are… some

              Doesn’t mean it’s better to turn off all security measures and live without them.

              That’s like saying a lightbulb stopped working, so now you live without electricity. :)

              • non_burglar@lemmy.world
                link
                fedilink
                arrow-up
                1
                ·
                12 minutes ago

                The idea itself is fine (not getting into how not cool it is that a vendor holds the key to your bitlocker-encrypted disk once secure boot is turned on).

                But so is WEP for WiFi, but no one uses that anymore because it’s considered compromised.

                some are

                65% of all TPM keys is “some”, I suppose. But that’s not the issue. Keys leak, it happens. The more troubling part is that Microsoft will cheerfully use the leaked key on your affected TPM and you’ll get the “safe” check mark in your next audit.

                And this was warned about in 2011 when it started rolling out.

                As for FUD, I don’t have a “fear” angle here. I can’t tell you how to live your life, use secure boot if you feel safe doing so.

            • 9point6@lemmy.world
              link
              fedilink
              arrow-up
              6
              ·
              19 hours ago

              I’m not recommending it, I’m describing why saying it adds no security is silly.

              The keys being compromised on some motherboards doesn’t mean the whole concept is suddenly inert for every single user

              If everyone has a copy of my passwords and authenticator keys, that wouldn’t suddenly make 2 factor auth a compromised idea.

              Hell, even if you are one of those people running a machine with the compromised keys, it’s still going to block malware that was written before the keys were leaked unless malware authors have also figured out time travel.

              • non_burglar@lemmy.world
                link
                fedilink
                arrow-up
                2
                ·
                16 hours ago

                If everyone has a copy of my passwords and authenticator keys, that wouldn’t suddenly make 2 factor auth a compromised idea.

                Not sure how this relates. If you’re saying it was a good idea at the outset, then sure… If the keys hadn’t almost all been leaked by AMI and Phoenix. MS was supposed to have created a Microsoft Certified hardware vendor program for this, which fell apart pretty quickly.

                Secure Boot is a joke, both practically (there are many, many tools in use to bypass it) and in my professional circles, it is considered obsolete like WEP. My audit controls for Secure Boot demand that an endpoint management solution like InTune is deployed.

                You don’t have to take my word for it, obviously. I’m not trying to tell you how to live your life.

    • wildbus8979@sh.itjust.works
      link
      fedilink
      arrow-up
      7
      ·
      edit-2
      19 hours ago

      I don’t know which distro you’re using, but in Fedora and Debian it’s pretty easy to install the signed version of grub and the signed shime and get full secure boot in Linux. No setup needed.

      • Buffalox@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        8 hours ago

        Only as long as Microsoft allow it, and only because a lot of work was put into that shit. The first couple of years it was very flaky.

        • SteveTech@aussie.zone
          link
          fedilink
          arrow-up
          3
          ·
          7 hours ago

          It’s easy enough to add your own secure boot keys, you can even remove the Microsoft keys so that only your OS will boot.

          • Buffalox@lemmy.world
            link
            fedilink
            arrow-up
            1
            ·
            7 hours ago

            OK that’s new to me, I have to admit I haven’t been looking at it for years, I do not feel comfortable following Microsoft specifications, as Microsoft has a long h9istory of fucking things up for others on purpose, and their safety record is probably among the worst in the industry.

  • just_another_person@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    21 hours ago

    PCR is the name of a registered value in your TPM module.

    Did you disable or otherwise changed your Secure Settings in your BIOS? That would do it.

  • Papamousse@beehaw.org
    link
    fedilink
    arrow-up
    2
    ·
    21 hours ago

    I think the first time I installed linux/grub on a repartionned windows drive, my first boot in windows it asked for the bitlocker key, I have it on a USB drive, it’s like 30 chars/number. Since then dual booting has always worked. Laptop is win10/linux and desktop is win11/linux.

      • Papamousse@beehaw.org
        link
        fedilink
        arrow-up
        1
        ·
        5 hours ago

        MX Linux. Prior to install I disabled bitlocker in windows to be able to resize the part with gparted. Once in windows again I re-enabled it.

        The MX installer is very complete, I was able to directly use LUKS to encrypt my linux partition, and I chose btrfs with multiple volumes. Once grub was installed I needed to change my BIOS to boot from linux partition, this is when my first boot in windows asked for the key.