Last active
February 10, 2020 19:16
-
-
Save Pristavkin/2ae751c1d48efe594415f61b78b84bfa to your computer and use it in GitHub Desktop.
RHEL/CentOS GRUB dualboot Winows config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# 1. Place this file to /etc/grub.d/05_Windows | |
# 2. Update Windows patrtition setting. In this example Winodws will be booted from hd0,1 - sda2 partition ("hd0" is sda, and ",1" is second partition on disk) | |
# 3. Add "GRUB_DEFAULT=saved" and "GRUB_SAVEDEFAULT=true" lines to /etc/default/grub for save last booted OS | |
# 4. Run "chmod +x /etc/grub.d/41_Windows && grub2-mkconfig --output=/boot/grub2/grub.cfg" after all modifications for make new config file | |
exec tail -n 5 $0 | |
menuentry "Windows 10" { | |
savedefault | |
set root=(hd0,1) | |
chainloader +1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment