this post was submitted on 25 Mar 2024
1215 points (97.4% liked)
linuxmemes
21226 readers
117 users here now
Hint: :q!
Sister communities:
Community rules (click to expand)
1. Follow the site-wide rules
- Instance-wide TOS: https://legal.lemmy.world/tos/
- Lemmy code of conduct: https://join-lemmy.org/docs/code_of_conduct.html
2. Be civil
- Understand the difference between a joke and an insult.
- Do not harrass or attack members of the community for any reason.
- Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
- Bigotry will not be tolerated.
- These rules are somewhat loosened when the subject is a public figure. Still, do not attack their person or incite harrassment.
3. Post Linux-related content
- Including Unix and BSD.
- Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of
sudo
in Windows.
- No porn. Even if you watch it on a Linux machine.
4. No recent reposts
- Everybody uses Arch btw, can't quit Vim, and wants to interject for a moment. You can stop now.
Please report posts and comments that break these rules!
founded 1 year ago
MODERATORS
Yes. When you install Linux it will auto detect the Windows EFI partition and put boot stuff there by default, but then windows comes along and will randomly trash that setup. So during install don't go with the suggested option, instead use the partitioning tool to creat another small EFI boot partition elswhere on disk, leaving Windows EFI and OS paetitions as is. Also create your root and home partition(s). Install to those partitions, then Linux should prompt for Probe Foreign OS and add a chainloader entry to your grub menu. This entry, when selected, points grub to windows EFI partition ID and hands off the boot process to Windows. Windows is unaware it has been chainloaded. As long as you set BIOS to load directly from the LINUX EFI entry then you will boot to Grub with Linux/Windows Dual option...But technically it is not a true Dual Boot, it is a sequential boot I guess. I have had this for 7 years on same install and boot between W10 and Linux daily. Windows has never touched my Linux EFI.
How to add chainloader entry to grub?
I responded how to via another comment, but wanted to mention that you may have a chainload to Windows already with your dual boot, but the main point was using two EFI partitions and chainloading to the other one, so Windows isn't ever in charge of files in your linux boot partition
For something like OpenSUSE you go into YAST2-GUI and click the probe foreign OS and then it asks you if you want Windows or Linux as the default boot. But to do it manually you add a menu entry to /boot/grub2/custom.cfg. or in /etc/grub.d/40_custom. After editing this you will have to run grub2-mkconfig -o /boot/grub2/grub.cfg which will compile all the grub info into /etc/grub2/grub.cfg I believe the custom.cfg entries end up after the 40_custom entries that the OS may have included. There is a persistent method entry if you did want to edit the /etc/grub2/grub.cfg directly, but probably not advised.
Here is my entry for Windows boot partition and location of MS boot. Also below that is a UEFI entry for geting back to the BIOS, not relevent to this topic, but just so you see how the menu entries are defined. In my system these are at the end of all the other Linux entries.