this post was submitted on 25 Mar 2024
1220 points (97.4% liked)

linuxmemes

24407 readers
475 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack users for any reason. This includes using blanket terms, like "every user of thing".
  • Don't get baited into back-and-forth insults. We are not animals.
  • 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.
  • 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, no politics, no trolling or ragebaiting.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, <loves/tolerates/hates> systemd, and wants to interject for a moment. You can stop now.
  • 5. πŸ‡¬πŸ‡§ Language/язык/Sprache
  • This is primarily an English-speaking community. πŸ‡¬πŸ‡§πŸ‡¦πŸ‡ΊπŸ‡ΊπŸ‡Έ
  • Comments written in other languages are allowed.
  • The substance of a post should be comprehensible for people who only speak English.
  • Titles and post bodies written in other languages will be allowed, but only as long as the above rule is observed.
  • 6. (NEW!) Regarding public figuresWe all have our opinions, and certain public figures can be divisive. Keep in mind that this is a community for memes and light-hearted fun, not for airing grievances or leveling accusations.
  • Keep discussions polite and free of disparagement.
  • We are never in possession of all of the facts. Defamatory comments will not be tolerated.
  • Discussions that get too heated will be locked and offending comments removed.
  • Β 

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't remove France.

    founded 2 years ago
    MODERATORS
     
    you are viewing a single comment's thread
    view the rest of the comments
    [–] BCsven@lemmy.ca 28 points 1 year ago* (last edited 1 year ago) (1 children)
    • install windows
    • adjust main partition so you have space for Linux
    • install linux, during install create anither efi partition, and root partition.
    • linux probes foreign OS (some distros might not) and creates a chainloader entry from your new EFI to Windows EFI
    • set BIOS to boot from linux EFI

    Windows never knows the other partition exists and leaves it intact.

    [–] meliodas_101@lemmy.world 4 points 1 year ago (2 children)

    Could you give me more detail for step 3?

    [–] jose1324@lemmy.world 9 points 1 year ago (3 children)

    Don't even have to do that. Install windows first, then install Linux with refind bootloader on preferably a separate disk. Done

    [–] meliodas_100@lemmynsfw.com 2 points 1 year ago

    Did exactly that.

    [–] meliodas_101@lemmy.world 0 points 1 year ago (1 children)

    I installed arch so that didn't happen.

    [–] jose1324@lemmy.world 1 points 1 year ago

    Not how it works

    [–] BCsven@lemmy.ca 0 points 1 year ago* (last edited 1 year ago) (1 children)

    You do need a separate EFI, even though linux finds EFI, otherwise windows update trashes it randomly and why the meme we see here exists, with separate EFI windows doesn't know about it. You can shutdown windows mid update and boot linux, then reboot back to windows and update will continue. Siloed System

    [–] jose1324@lemmy.world 2 points 1 year ago (1 children)

    That's literally what I did yesterday with my method. It works, Windows has never trashed it

    [–] BCsven@lemmy.ca 2 points 1 year ago* (last edited 1 year ago) (1 children)

    It will, thats why that meme exists.

    Not during typically reboots, but when some windows update or autofile repair happens it thinks it is the only OS on that partition and does what it likes.

    [–] jose1324@lemmy.world 1 points 1 year ago (1 children)

    Nope, ran it like this for over 5 years. Definitely rebooted during updates / did some crap

    [–] BCsven@lemmy.ca 0 points 1 year ago (1 children)

    Then you have been lucky, because most peoples experience with grub EFI on Windows partition is windows will eventually scrub it.

    [–] jose1324@lemmy.world 1 points 1 year ago (1 children)
    [–] BCsven@lemmy.ca 0 points 1 year ago

    Makes no difference of what bootloader, just that windows thimks it owns that partition

    [–] BCsven@lemmy.ca 2 points 1 year ago (1 children)

    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.

    [–] meliodas_100@lemmynsfw.com 1 points 1 year ago (2 children)

    How to add chainloader entry to grub?

    [–] BCsven@lemmy.ca 1 points 1 year ago

    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

    [–] BCsven@lemmy.ca 1 points 1 year ago* (last edited 1 year ago)

    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.

    ### BEGIN /etc/grub.d/30_os-prober ###
    menuentry 'Windows Boot Manager (on /dev/nvme0n1p2)' --class windows --class os $menuentry_id_option 'osprober-efi-4E48-193F' {
    	insmod part_gpt
    	insmod fat
    	search --no-floppy --fs-uuid --set=root 4E48-193F
    	chainloader /efi/Microsoft/Boot/bootmgfw.efi
    }
    ### END /etc/grub.d/30_os-prober ###
    
    ### BEGIN /etc/grub.d/30_uefi-firmware ###
    menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
    	fwsetup
    }