this post was submitted on 05 Apr 2024
41 points (97.7% liked)

techsupport

2468 readers
33 users here now

The Lemmy community will help you with your tech problems and questions about anything here. Do not be shy, we will try to help you.

If something works or if you find a solution to your problem let us know it will be greatly apreciated.

Rules: instance rules + stay on topic

Partnered communities:

You Should Know

Reddit

Software gore

Recommendations

founded 1 year ago
MODERATORS
 

Title. I dual-boot Windows and Linux. I always saw people making "WINDOWS DELETED MY LINUX BOOTLOADER OMGOMG" posts and it had never happened to me. Now, the opposite has happened. I switched from EndeavourOS to OpenSUSE and now my windows install is no longer selectable on boot.

I keep Windows in a separate drive entirely, so instead of using grub, I use the EFI's boot-select menu thingamafuck (look I don't know jargon okay?) to choose Windows when I need it.

Well today it's not there. Only the Linux entries show up. The Windows partition itself seems to be in good order, like, I can access it from within Linux no problem.

But yeah it doesn't show up on my EFI selector thingie. I imagine I could get the EFI Shell going, but I have no idea how to use THAT either.

top 32 comments
sorted by: hot top controversial new old
[–] [email protected] 12 points 7 months ago (1 children)

Dual-booting is fine, but this kind of thing does happen.

Either "os-prober" isn't installed or /etc/default/grub has GRUB_DISABLE_OS_PROBER=false.

Fix those, then reinstall the bootloader.

[–] [email protected] 2 points 7 months ago (3 children)

os-prober was installed, but it was indeed disabled.

I went through the process of activating it and remaking the grub configuration. But it seems to not care about Windows, likely because, as stated in my post, it is on a separate physical drive. Probably some way to tell it to look there as well, but I don't know it. I might do some searching of my own later, right now I got shit to do. Booted into my laptop (which I keep with just windows because its ssd is too small for me to have any fun)

[–] [email protected] 1 points 7 months ago

When I dual-boot it is always with a separate drive, less often does MS hose the bootloader in that situation. Normally it is findable. I dont recall havong to point it to anything.

I keep a usb boot drive with a number of images (ventoy), including "super grub boot disk" to get me out of these situations.

[–] [email protected] 1 points 7 months ago

When I dual-boot it is always with a separate drive, less often does MS hose the bootloader in that situation. Normally it is findable. I dont recall havong to point it to anything.

I keep a usb boot drive with a number of images (ventoy), including "super grub boot disk" to get me out of these situations.

[–] [email protected] 1 points 7 months ago (1 children)

I dual booted for about two years before switching entirely over to Linux, and I found that using reFind as a bootloader instead of Grub was significantly less hassle. I'd suggest you check it out.

[–] [email protected] 1 points 7 months ago (1 children)

I have HEARD of reFind, but could not figure out how to use it. You got a good tutorial to link me up with?

[–] [email protected] 1 points 7 months ago* (last edited 7 months ago)

I recall following the Arch wiki entry, but the official documentation is very useful too.

The easiest way I found to install it was to 1) Install refind through my distro's package manager and then 2) simply run the refind-install command in a terminal, which completely automates the process and sets reFind as the default bootloader for your machine.

If you want to tweak the appearance, icons, or the available boot entries on the reFind boot screen then just follow the official documentatuon.

[–] [email protected] 8 points 7 months ago* (last edited 7 months ago) (1 children)

If you have a windows install USB lying around you could try to boot into that and run some commands to restore the EFI entry.

Source 1 Source 2 Source 3

These sources more or less describe the same steps to attempt recovery. The

[–] [email protected] 7 points 7 months ago (1 children)

The

Did you get killed mid writing the comment? That's ominous.

Anyway, I thank you for actual helpful comment instead of the others just calling me dumb for dual booting at all. :P

I'll see what I can do.

[–] [email protected] 8 points 7 months ago (1 children)

calling me dumb for dual booting at all

I keep saying this, but Linux users are probably the biggest obstacle standing in the way of Linux adoption.

[–] [email protected] 6 points 7 months ago (1 children)

One day those Linux people will learn that you’ll catch more flies with honey than you will with vinegar

🤷🏻‍♂️

[–] [email protected] 3 points 7 months ago* (last edited 7 months ago) (2 children)

Based on my nearly 30 years experience of using Linux (started with veeery early versions of Slackware) and interacting with Linux users on USENET, forums etc., I doubt it.

[–] [email protected] 4 points 7 months ago (1 children)

“I was harassed and bullied for being an outsider, unique, etc so now I will reflect that same sentiment and choose further fragmentation and gatekeeping because it makes me feel better”

One day we’ll recognize how valuable cooperation and staying in your own lane actually is. It can be tough

[–] [email protected] 5 points 7 months ago (1 children)

Some people in the community do get it. It's just that the "I got bullied in high school so now I like to yell at people in webforums" people are so very loud.

[–] [email protected] 2 points 7 months ago

Oh for sure, didn’t mean to come off like I was generalizing the whole community (of which I’m a part of)

It’s just that, even if it’s a small minority of the community, they’re still yelling and screaming in the yard where people sitting on fences are getting scared off, from my perspective that is.

Nobody wants to be around assholes

[–] [email protected] 2 points 7 months ago

Yeah, I've been at this since my dad first showed my 10 year old self Linux in the early aughts, and I don't think it's ever going to change.

[–] [email protected] 4 points 7 months ago* (last edited 7 months ago) (1 children)

I FIXED IT

Fucking hell that was a pain. And as most of the painful things in life, it was mostly self-inflicted.

I consider it the polite thing to make a report on what I did to fix things when I solve my problem in a tech support thread (in case someone is ever searching this, to avoid the xkcd scenario ) so I will do that now:

  • First off, going into a Windows install media and running some commands, as described by @[email protected] and @[email protected] did do the trick for reviving Windows.
  • BUT, I am an idiot and I pointed Windows to the wrong thing, so it wiped out my Linux boot partition. O o p s i e . . .
  • I was a bit stumped on what to do, and had actually flashed the USB drive (this idiot here only owns ONE USB drive) with the SUSE install media, fully intending to do a complete reinstall, but THEN,
  • I realised that in the install media's menu, there is a "boot Linux system" menu, and entered it on a whim
  • Sure enough, that found my existing OpenSUSE install and let me get into it.
  • From there I just used YaST to re-install and re-configure grub
  • Both Windows and Linux seem to be functioning now, yay

So, 85% "me being an idiot", but, the problem is solved. I thank everyone who made a comment.

[–] [email protected] 2 points 7 months ago (2 children)

Glad it's working! For the future, you might want to put ventoy on your singular USB. You can then put different ISOs on it, so you can have windows and Linux recovery on one keychain. Has saved my ass a number of times!

[–] [email protected] 2 points 7 months ago

I will probably do that, yes.

[–] [email protected] 2 points 7 months ago

Oh that's cool

[–] PainInTheAES 3 points 7 months ago (1 children)

Is the windows efi file still in your boot partition or did you format it on install or did you make a new second EFI partition? If you go into your BIOS can it find the EFI file to boot into Windows?

[–] [email protected] 3 points 7 months ago

I did not touch the windows partitions, and that includes the microsoft reserved partition where the windows bootloader (supposedly, linux doesn't let me mount the MSR partition) is.

I only messed with the drive where Linux was installed and there, I made its own, separate /boot/efi partition.

[–] [email protected] 2 points 7 months ago (1 children)

Can you still boot into Windows without GRUB? Like through your bios menu. I've had it where a Linux installer will eat the EFI files for Windows.

If you need to fix your Windows EFI partition, and have a Windows install disk, boot it up and press Shift + F10 to open a command prompt (you may need Fn as well if youre on a laptop)

Run diskpart and list volume

You should have your Windows drive (should be labeled C, but can be mounted elsewhere in recovery. Keep in mind the letter it's mounted on) You're also going to want to look for a fat32 partition. Since windows is on a different drive, there should be two, one for Linux and one for Windows.

Pick one with select volume x where x is the volume number, and ensure you've selected the right one with list disk. There should be an asterisk next to the disk containing the selected volume.

Still in diskpart, you're going to want to mount that to a letter, I always choose N with assign letter n

Type exit to get out of diskpart

Next you're going to want to remove existing EFI files. Type N: to change to the N disk, and rmdir EFI\ /s (I'm doing this from memory, I believe this is the correct command to do so)

To regenerate the files, you're going to want to run bcdboot C:\Windows /s N: /f ALL where C:\Windows is your Windows folder, N: is your efi partition, and ALL is the boot type (this installs both legacy and EFI files, you can set this to just EFI and be fine)

Windows should be good to boot, I'd boot it once to test. Then go into Linux & grub-install and update-grub. It should be able to find it on any installed drive, even unmounted. Check the output and you should see if it found it.

[–] [email protected] 2 points 7 months ago* (last edited 7 months ago) (1 children)

I cannot get into Windows in any way. I CAN get into Linux with no problem though. Anyway.

(as I said in my post--) My intention is to not use grub at all and to choose windows through my bios menu when I do need it. Which is what I had been doing for the past year.

It's just that its entry in the bios menu has disappeared.

[–] [email protected] 1 points 7 months ago (1 children)

In that case, these steps should work, but you can safely ignore the grub steps at the end. (I totally misread the NOT wanting to use grub part lol)

[–] [email protected] 2 points 7 months ago (1 children)

I managed to revive windows but now Linux doesn't show up, lmao

But I think I know what to do about that. Give me like 10 and I'll report back.

[–] [email protected] 2 points 7 months ago

Your Linux install may be using the same EFI partition as your Windows disk, even though the filesystem is on another drive. Most installers prefer existing EFI partitions. You may have to modify your fstab file to use an EFI partition on your Linux drive instead, in which case they should remain separate and not mess with each other again.

[–] [email protected] -3 points 7 months ago* (last edited 7 months ago) (1 children)

Windows and linux are known to cause issues for each other. At minimum keep them seperaited on there on encrypted drives (I've found that drive encryption seems to conflict less for some odd reason).

But generaly do not dual boot unless you have to.

Edit, you can use chroot for this but if that doesn't work for you I hope you have backups.

[–] [email protected] 6 points 7 months ago

But generaly do not dual boot unless you have to.

Thanks that doesn't help in the slightest :3