Skip to content

Instantly share code, notes, and snippets.

@liangzai-cool
Created September 19, 2016 06:19
Show Gist options
  • Save liangzai-cool/59f0c29a528305a9aa1c3971aeef604b to your computer and use it in GitHub Desktop.
Save liangzai-cool/59f0c29a528305a9aa1c3971aeef604b to your computer and use it in GitHub Desktop.
a patch for os-prober, to resolve centos 7 + win10 dual system, but boot menu show 'Windows 7...'
--- /usr/libexec/os-probes/mounted/20microsoft 2016-09-19 00:09:25.917283774 -0400
+++ 20microsoft 2016-09-19 00:55:38.750505997 -0400
@@ -31,7 +31,9 @@
for boot in $(item_in_dir boot "$2"); do
bcd=$(item_in_dir bcd "$2/$boot")
if [ -n "$bcd" ]; then
- if grep -qs "W.i.n.d.o.w.s. .8" "$2/$boot/$bcd"; then
+ if grep -qs "W.i.n.d.o.w.s. .1.0" "$2/$boot/$bcd"; then
+ long="Windows 10 (loader)"
+ elif grep -qs "W.i.n.d.o.w.s. .8" "$2/$boot/$bcd"; then
long="Windows 8 (loader)"
elif grep -qs "W.i.n.d.o.w.s. .7" "$2/$boot/$bcd"; then
long="Windows 7 (loader)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment