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

linuxmemes

21434 readers
755 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 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!


    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 fork-bomb your computer.

    founded 1 year ago
    MODERATORS
     
    you are viewing a single comment's thread
    view the rest of the comments
    [–] BCsven@lemmy.ca 1 points 8 months ago* (last edited 8 months 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
    }