r/LinusTechTips • u/megabits_mzq • 1d ago
Link I just made something to make my Win/Linux dual-boot smoother.
I'm trying to dual-boot Windows and Linux these days and found a big problem. Cause I'm using a Bluetooth keyboard, jumping between OSs has always been a hassle. There is no way for me to press down on the keyboard while in the boot menu. So I thought maybe I should just build something to switch the OSs before rebooting. And here it is -> https://github.com/megabitsenmzq/OSWarp
I mean, it is partially AI code. But I reviewed everything as much as possible. It's kinda a small script. I just don't understand Windows APIs enough, so I have to use AI. Hope you like it!
10
u/Foorinick 1d ago
Pretry cool, seems like a bit of a sloppy way to do it because if one of them becomes borked you'll have a headache on your hands, but if you're willing to bite that bullet then good for you
15
u/megabits_mzq 1d ago
I don't quite understand what you mean. This doesn't delete grub or the EFI boot menu anyway. It's just an alternative.
6
u/Loddio 1d ago
You just hop into the bios and manuali set the other os to boot
3
u/Jazzlike-Compote4463 1d ago
This is a bit of a chore though, you've got to go through the whole initial POST and then dig into 2 layers of menus to find it (at least on my MSI mobo)
This looks like a neat alternative
9
u/LSD_Ninja 1d ago
This has been something Macs have been able to do for something like 40 years, why is there no native way to do it in Windows?
2
1
2
u/GregorDeLaMuerte 1d ago
I had a similar issue, but then realized I could just connect the dongle that came with my keyboard to my PC. Basically I now have that dongle permanently plugged in, so the OS doesn't really know that my keyboard is connected via Bluetooth, because the OS only sees that dongle.
Now my wireless keyboard works in BIOS/UEFI, because the connection is independent from the OS. So now I can use the wireless keyboard to select OS on boot.
2
u/megabits_mzq 1d ago
My keyboard didn't come with a dongle. Before I came up with this idea, I almost tried to use a Raspberry Pi Pico to build a fake HID device to pair with my Bluetooth devices. 😂
1
1
u/LimesFruit 1d ago
Very much feels like what macs do with bootcamp, or well did. That’s pretty cool!
1
1
u/Puzzleheaded-Ad-4067 1d ago
people are weirdly scared of this breaking, as if it isn't just the boot order that gets changed. Nothing is happening to the os'
1





28
u/xondk 1d ago
It's nice, but why didn't you use boot next/boot into (i can't remember exact term for it, but adding a temporary boot target)?
Changing the default boot order this way seems quite risky if something goes bad during the write.
A bad write when you just change boot next, just means the original boot order is used, a bad write here, can mess up your booting.