Dual Boot - Windows is Gone

General support questions
desertcat
Posts: 843
Joined: 2014/08/07 02:17:29
Location: Tucson, AZ

Re: Dual Boot - Windows is Gone

Post by desertcat » 2018/07/12 05:46:32

desertcat wrote:
2018/07/12 05:22:47
Sorry for your problems. Trust me I feel your pain as I've been there and done that. OK there are three (3) files and/or directories where your problems are located:

/boot/grub2/grub/grub.cfg
/etc/default/grub
/etc/grub.d under which you should find:

00_header
00_tuned
01_users
10_linux
20_linux_xen
20_ppc_terminfo
30_os-prober
40_custom
This is a LONG shot but it has happened to me: If you go to /etc/grub.d what exactly are the files that are being found?? They should look EXACTLY like the list posted above. If NOT post the names of the files posted there. You are also going to need a good file browser/editor such as Midnight Commander (mc) [yum install mc]. Again this is a long shot but if they are mangled the solution is easy to fix.

desertcat
Posts: 843
Joined: 2014/08/07 02:17:29
Location: Tucson, AZ

Re: Dual Boot - Windows is Gone

Post by desertcat » 2018/07/12 06:15:00

8675309-jim wrote:
2018/07/11 20:13:08
On my main screen while the computer is booting after the bios I now have 5 or 6 different OS's to choose from. 2 Windows 10's, a Windows environment, and 2 CentOS's
In going back over your post the above caught my attention: It almost seems as though you have DUPLICATE entry files. An easy way to check if this may be the case is if the "2 CentOS's" have the same kernel number. Starting at the top try booting each OS. If you have 2 Windows 10's it sounds like one is a DUPLICATE. If one boots and the other does NOT... Do the ENTIRE list. If one boots and the other does not note which entry boots and which does not. Grub Customizer will make cleaning up the menu a piece of cake.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Dual Boot - Windows is Gone

Post by TrevorH » 2018/07/12 08:52:26

So from the file -s output, that looks to me like your Windows installation is still there and present on /dev/sda3. At the very least you will be able to mount that on linux using ntfs-3g and copy any data you cannot afford to lose. I'd actually recommend doing exactly that even though I am fairly sure that it should be possible to recover from this.

Windows has a trick sometimes where it will install on a single partition and on other occasions it installs itself in two - one about 100MB in size just for the boot loader etc and the rest for Windows itself. From your fdisk output, I think that /dev/sda1 is not your real Windows boot partition - from the RE "Recovery Environment" that looks like a preinstalled manufacturer copy of Windows to be used to reinstall your system. You can see more details about it's for from https://docs.microsoft.com/en-us/window ... -reference

I am suspecting that your Windows boot partition was /dev/sda2 and that it has been overwritten and reused for the CentOS /boot. To confirm this, can you boot linux, mount /dev/sda2 and list its contents so that we can see what's there and what it looks like. Hopefully we can work out a way to get your Windows booting again.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

8675309-jim
Posts: 19
Joined: 2018/07/11 01:57:42

Re: Dual Boot - Windows is Gone

Post by 8675309-jim » 2018/07/12 20:11:00

hunter86_bg wrote:
2018/07/12 04:04:56
Can you give the output of

Code: Select all

cat /proc/cmdline
[root@host1 ~]# cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-3.10.0-862.6.3.el7.x86_64 root=/dev/mapper/vg00-root ro crashkernel=auto rd.lvm.lv=vg00/root rd.lvm.lv=vg00/swap rhgb quiet

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: Dual Boot - Windows is Gone

Post by hunter86_bg » 2018/07/12 21:11:47

OK, try to mount your windows and run grub2-mkconfig again:

Code: Select all

 mkdir /mnt/sda{1..3} && for i in {1..3} ;do mount -o ro /dev/sda$i /mnt/sda$i ; done && grub2-mkconfig -o /boot/grub2/grub.cfg 
After that paste the whole grub.cfg file here:

Code: Select all

cat /boot/grub2/grub.cfg

8675309-jim
Posts: 19
Joined: 2018/07/11 01:57:42

Re: Dual Boot - Windows is Gone

Post by 8675309-jim » 2018/07/13 19:57:47

hunter86_bg wrote:
2018/07/12 21:11:47
OK, try to mount your windows and run grub2-mkconfig again:

Code: Select all

 mkdir /mnt/sda{1..3} && for i in {1..3} ;do mount -o ro /dev/sda$i /mnt/sda$i ; done && grub2-mkconfig -o /boot/grub2/grub.cfg 
After that paste the whole grub.cfg file here:

Code: Select all

cat /boot/grub2/grub.cfg
cat /boot/grub2/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
set pager=1

if [ -s $prefix/grubenv ]; then
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="${saved_entry}"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}

function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}

terminal_output console
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=5
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/01_tuned ###
set tuned_params=""
set tuned_initrd=""
### END /etc/grub.d/01_tuned ###

### BEGIN /etc/grub.d/02_users ###
if [ -f ${prefix}/user.cfg ]; then
source ${prefix}/user.cfg
if [ -n "${GRUB2_PASSWORD}" ]; then
set superusers="root"
export superusers
password_pbkdf2 root ${GRUB2_PASSWORD}
fi
fi
### END /etc/grub.d/02_users ###

### BEGIN /etc/grub.d/10_linux_proxy ###




if [ "x$default" = 'CentOS Linux (3.10.0-862.6.3.el7.x86_64) 7 (Core)' ]; then default='Advanced options for CentOS Linux>CentOS Linux (3.10.0-862.6.3.el7.x86_64) 7 (Core)'; fi;
### END /etc/grub.d/10_linux_proxy ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "Windows10"{
set root='(hd0,1)'
chainloader +1
}

### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_linux_proxy ###
menuentry "CentOS Linux (3.10.0-862.6.3.el7.x86_64) 7 (Core)" --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-862.6.3.el7.x86_64-advanced-7d5aeaa7-13fc-4f60-b7f0-31e5b23fe1b8' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod xfs
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd0,msdos5' 2c64e0e2-b2ba-476a-81dd-04266e13abd0
else
search --no-floppy --fs-uuid --set=root 2c64e0e2-b2ba-476a-81dd-04266e13abd0
fi
linux16 /vmlinuz-3.10.0-862.6.3.el7.x86_64 root=/dev/mapper/vg00-root ro crashkernel=auto rd.lvm.lv=vg00/root rd.lvm.lv=vg00/swap rhgb quiet
initrd16 /initramfs-3.10.0-862.6.3.el7.x86_64.img
}
### END /etc/grub.d/41_linux_proxy ###

### BEGIN /etc/grub.d/43_linux_xen ###
### END /etc/grub.d/43_linux_xen ###

### BEGIN /etc/grub.d/44_ppc_terminfo ###
### END /etc/grub.d/44_ppc_terminfo ###

### BEGIN /etc/grub.d/45_os-prober ###
menuentry 'Windows Recovery Environment (loader) (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-8482D08F82D08758' {
insmod part_msdos
insmod ntfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1' 8482D08F82D08758
else
search --no-floppy --fs-uuid --set=root 8482D08F82D08758
fi
parttool ${root} hidden-
drivemap -s (hd0) ${root}
chainloader +1
}
### END /etc/grub.d/45_os-prober ###

### BEGIN /etc/grub.d/46_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/46_custom ###
[root@host1 ~]#

8675309-jim
Posts: 19
Joined: 2018/07/11 01:57:42

Re: Dual Boot - Windows is Gone

Post by 8675309-jim » 2018/07/13 20:26:21

Sorry wasn't on a lot yesterday, but here is the paste you were looking for.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Dual Boot - Windows is Gone

Post by TrevorH » 2018/07/13 20:41:39

/dev/sda1 is NOT your Windows boot partition. It is A windows boot partition but it's for teh recovery environment put there by the machine manufacturer to allow you to reinstall Windows from scratch. I suspect /dev/sda2 was and may still be your real Windows boot partition.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

8675309-jim
Posts: 19
Joined: 2018/07/11 01:57:42

Re: Dual Boot - Windows is Gone

Post by 8675309-jim » 2018/07/13 21:25:11

So try booting from
menuentry "Windows" {
Set root='(hd0,2)'
chainloader +1
}

desertcat
Posts: 843
Joined: 2014/08/07 02:17:29
Location: Tucson, AZ

Re: Dual Boot - Windows is Gone

Post by desertcat » 2018/07/14 08:19:46

8675309-jim wrote:
2018/07/13 19:57:47
hunter86_bg wrote:
2018/07/12 21:11:47
OK, try to mount your windows and run grub2-mkconfig again:

Code: Select all

 mkdir /mnt/sda{1..3} && for i in {1..3} ;do mount -o ro /dev/sda$i /mnt/sda$i ; done && grub2-mkconfig -o /boot/grub2/grub.cfg 
After that paste the whole grub.cfg file here:

Code: Select all

cat /boot/grub2/grub.cfg
cat /boot/grub2/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
set pager=1

if [ -s $prefix/grubenv ]; then
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="${saved_entry}"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}

function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}

terminal_output console
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=5
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/01_tuned ###
set tuned_params=""
set tuned_initrd=""
### END /etc/grub.d/01_tuned ###

### BEGIN /etc/grub.d/02_users ###
if [ -f ${prefix}/user.cfg ]; then
source ${prefix}/user.cfg
if [ -n "${GRUB2_PASSWORD}" ]; then
set superusers="root"
export superusers
password_pbkdf2 root ${GRUB2_PASSWORD}
fi
fi
### END /etc/grub.d/02_users ###

### BEGIN /etc/grub.d/10_linux_proxy ###




if [ "x$default" = 'CentOS Linux (3.10.0-862.6.3.el7.x86_64) 7 (Core)' ]; then default='Advanced options for CentOS Linux>CentOS Linux (3.10.0-862.6.3.el7.x86_64) 7 (Core)'; fi;
### END /etc/grub.d/10_linux_proxy ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "Windows10"{
set root='(hd0,1)'
chainloader +1
}

### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_linux_proxy ###
menuentry "CentOS Linux (3.10.0-862.6.3.el7.x86_64) 7 (Core)" --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-862.6.3.el7.x86_64-advanced-7d5aeaa7-13fc-4f60-b7f0-31e5b23fe1b8' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod xfs
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd0,msdos5' 2c64e0e2-b2ba-476a-81dd-04266e13abd0
else
search --no-floppy --fs-uuid --set=root 2c64e0e2-b2ba-476a-81dd-04266e13abd0
fi
linux16 /vmlinuz-3.10.0-862.6.3.el7.x86_64 root=/dev/mapper/vg00-root ro crashkernel=auto rd.lvm.lv=vg00/root rd.lvm.lv=vg00/swap rhgb quiet
initrd16 /initramfs-3.10.0-862.6.3.el7.x86_64.img
}
### END /etc/grub.d/41_linux_proxy ###

### BEGIN /etc/grub.d/43_linux_xen ###
### END /etc/grub.d/43_linux_xen ###

### BEGIN /etc/grub.d/44_ppc_terminfo ###
### END /etc/grub.d/44_ppc_terminfo ###

### BEGIN /etc/grub.d/45_os-prober ###
menuentry 'Windows Recovery Environment (loader) (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-8482D08F82D08758' {
insmod part_msdos
insmod ntfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1' 8482D08F82D08758
else
search --no-floppy --fs-uuid --set=root 8482D08F82D08758
fi
parttool ${root} hidden-
drivemap -s (hd0) ${root}
chainloader +1
}
### END /etc/grub.d/45_os-prober ###

### BEGIN /etc/grub.d/46_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/46_custom ###
[root@host1 ~]#


Thank you for posting the contents of your /etc/grub.d file. As I suspected your file system is all mangled, and the solution is to rename all the mangled files. It is as simple as that.... caveat emptor. There is always a teeny tiny problem: You have to know what the real files should look like. For this you need a good file browser and text editor. mc has been my choice since the days of DOS.

First lets compare names:

Mine Yours
00_header 00_header
00_tuned 01_tuned
01_users 02_users
06_grub-customizer_menu_color_helper
10_linux 10_linux_proxy
20_linux_xen
20_ppc_terminfo
30_os-prober
40_custom 40_custom
41_custom 41_linux_proxy
43_linux_xen
44_ppc_terminfo
45_os-prober
46_custom

As you can see they don't look nearly the same 20_linux_xen is 43_linux_xen on yours; 20_ppc_terminfo is 44_terminfo on yours; 30_os-prober is 45_os-prober on yours; and 41_custom is 46_custom on your. To make matters worse you have two (2) linux_proxy [10, and 41]. As I said your menu is scrambled; as I also said the solution is rather easy -- just rename the files and put them in the correct order.

Step 1: BACKUP /boot/grub2/grub.cfg
BACKUP /etc/default/grub
BACKUP /etc/grub.d

The easiest way is to simply copy and rename the file to something like xyz.old. Thus if things go south you simply delete the "xyz.new, and then rename xyz.old=> xyz.

Step 2: Download a copy of mc or your choice of file browser /editor. mc is EASY to use. We are going to need to look at the contents of each of your whacked out files to know what is what. The files that you are interested are in /etc/grub.d. If you use mc simply become root (su + Password), then hight light the file you which to look into and hit F3

Step 3: Before we begin you need to run ls -l and check to see that ALL the files are owned by root and have their permissions set to 755 (-rwxr-xr-x)

Step 4: You need to know what the contents of what each of your files should more-or-less look like. I'm going to try and help you here, and post the contents of my files which you can then use to identify the correct contents of your files.

00_header:

#! /bin/sh
set -e

# grub-mkconfig helper script.
# Copyright (C) 2006,2007,2008,2009,2010 Free Software Foundation, Inc.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GRUB is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GRUB. If not, see <http://www.gnu.org/licenses/>.

prefix="/usr"
exec_prefix="/usr"
datarootdir="/usr/share"
grub_lang=`echo $LANG | cut -d . -f 1`

export TEXTDOMAIN=grub
export TEXTDOMAINDIR="${datarootdir}/locale"

. "/usr/share/grub/grub-mkconfig_lib"

# Do this as early as possible, since other commands might depend on it.
# (e.g. the `loadfont' command might need lvm or raid modules)
for i in ${GRUB_PRELOAD_MODULES} ; do
echo "insmod $i"
done

if [ "x${GRUB_DEFAULT}" = "x" ] ; then GRUB_DEFAULT=0 ; fi
if [ "x${GRUB_DEFAULT}" = "xsaved" ] ; then GRUB_DEFAULT='${saved_entry}' ; fi
if [ "x${GRUB_TIMEOUT}" = "x" ] ; then GRUB_TIMEOUT=5 ; fi
if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=auto ; fi

if [ "x${GRUB_DEFAULT_BUTTON}" = "x" ] ; then GRUB_DEFAULT_BUTTON="$GRUB_DEFAULT" ; fi
if [ "x${GRUB_DEFAULT_BUTTON}" = "xsaved" ] ; then GRUB_DEFAULT_BUTTON='${saved_entry}' ; fi
if [ "x${GRUB_TIMEOUT_BUTTON}" = "x" ] ; then GRUB_TIMEOUT_BUTTON="$GRUB_TIMEOUT" ; fi

cat << EOF
set pager=1

if [ -s \$prefix/grubenv ]; then
load_env
fi
EOF
if [ "x$GRUB_BUTTON_CMOS_ADDRESS" != "x" ]; then
cat <<EOF
if cmostest $GRUB_BUTTON_CMOS_ADDRESS ; then
set default="${GRUB_DEFAULT_BUTTON}"
elif [ "\${next_entry}" ] ; then
set default="\${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="${GRUB_DEFAULT}"
fi
EOF
else
cat <<EOF
if [ "\${next_entry}" ] ; then
set default="\${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="${GRUB_DEFAULT}"
fi
EOF
fi
cat <<EOF

if [ x"\${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi

export menuentry_id_option

if [ "\${prev_saved_entry}" ]; then
set saved_entry="\${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z "\${boot_once}" ]; then
saved_entry="\${chosen}"
save_env saved_entry
fi
}

function load_video {
EOF
if [ -n "${GRUB_VIDEO_BACKEND}" ]; then
cat <<EOF
insmod ${GRUB_VIDEO_BACKEND}
EOF
else
# If all_video.mod isn't available load all modules available
# with versions prior to introduction of all_video.mod
cat <<EOF
if [ x\$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
EOF
fi
cat <<EOF
}

EOF

serial=0;
gfxterm=0;
for x in ${GRUB_TERMINAL_INPUT} ${GRUB_TERMINAL_OUTPUT}; do
if [ xserial = "x$x" ]; then
serial=1;
fi
if [ xgfxterm = "x$x" ]; then
gfxterm=1;
fi
done

if [ "x$serial" = x1 ]; then
if [ "x${GRUB_SERIAL_COMMAND}" = "x" ] ; then
grub_warn "$(gettext "Requested serial terminal but GRUB_SERIAL_COMMAND is unspecified. Default parameters will be used.")"
GRUB_SERIAL_COMMAND=serial
fi
echo "${GRUB_SERIAL_COMMAND}"
fi

if [ "x$gfxterm" = x1 ]; then
if [ -n "$GRUB_FONT" ] ; then
# Make the font accessible
prepare_grub_to_access_device `${grub_probe} --target=device "${GRUB_FONT}"`
cat << EOF
if loadfont `make_system_path_relative_to_its_root "${GRUB_FONT}"` ; then
EOF
else
for dir in "${pkgdatadir}" "`echo '/boot/grub2' | sed "s,//*,/,g"`" /usr/share/grub ; do
for basename in unicode unifont ascii; do
path="${dir}/${basename}.pf2"
if is_path_readable_by_grub "${path}" > /dev/null ; then
font_path="${path}"
else
continue
fi
break 2
done
done
if [ -n "${font_path}" ] ; then
cat << EOF
if [ x\$feature_default_font_path = xy ] ; then
font=unicode
else
EOF
# Make the font accessible
prepare_grub_to_access_device `${grub_probe} --target=device "${font_path}"`
cat << EOF
font="`make_system_path_relative_to_its_root "${font_path}"`"
fi

if loadfont \$font ; then
EOF
else
cat << EOF
if loadfont unicode ; then
EOF
fi
fi

cat << EOF
set gfxmode=${GRUB_GFXMODE}
load_video
insmod gfxterm
EOF

# Gettext variables and module
if [ "x${LANG}" != "xC" ] && [ "x${LANG}" != "x" ]; then
cat << EOF
set locale_dir=\$prefix/locale
set lang=${grub_lang}
insmod gettext
EOF
fi

cat <<EOF
fi
EOF
fi

case x${GRUB_TERMINAL_INPUT} in
x)
# Just use the native terminal
;;
x*)
cat << EOF
terminal_input ${GRUB_TERMINAL_INPUT}
EOF
;;
esac

case x${GRUB_TERMINAL_OUTPUT} in
x)
# Just use the native terminal
;;
x*)
cat << EOF
terminal_output ${GRUB_TERMINAL_OUTPUT}
EOF
;;
esac

if [ "x$gfxterm" = x1 ]; then
if [ "x$GRUB_THEME" != x ] && [ -f "$GRUB_THEME" ] \
&& is_path_readable_by_grub "$GRUB_THEME"; then
gettext_printf "Found theme: %s\n" "$GRUB_THEME" >&2

prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_THEME"`
cat << EOF
insmod gfxmenu
EOF
themedir="`dirname "$GRUB_THEME"`"
for x in "$themedir"/*.pf2 "$themedir"/f/*.pf2; do
if [ -f "$x" ]; then
cat << EOF
loadfont (\$root)`make_system_path_relative_to_its_root $x`
EOF
fi
done
if [ x"`echo "$themedir"/*.jpg`" != x"$themedir/*.jpg" ] || [ x"`echo "$themedir"/*.jpeg`" != x"$themedir/*.jpeg" ]; then
cat << EOF
insmod jpeg
EOF
fi
if [ x"`echo "$themedir"/*.png`" != x"$themedir/*.png" ]; then
cat << EOF
insmod png
EOF
fi
if [ x"`echo "$themedir"/*.tga`" != x"$themedir/*.t


If you see something like this you are fine.

Now we get to the checking and renaming part.


00_tuned (your 01_tuned)

You will see something in there with the word "tuned":

#! /bin/sh
set -e

# grub-mkconfig helper script.
# Copyright (C) 2014 Red Hat, Inc
# Author: Jaroslav Škarvada <jskarvad@redhat.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#

tunedcfgdir=/etc/tuned
tuned_bootcmdline_file=$tunedcfgdir/bootcmdline

. $tuned_bootcmdline_file

echo "set tuned_params=\"$TUNED_BOOT_CMDLINE\""
echo "set tuned_initrd=\"$TUNED_BOOT_INITRD_ADD\""

If you see something like this SAVE AND RENAME THE FILE 00_tuned. If you DON"T see "tuned" chances are it is somewhere else. Write down this file as being WRONG.

01_users (your 02_users)

This is a short file and it should read like this:

#!/bin/sh -e
cat << EOF
if [ -f \${prefix}/user.cfg ]; then
source \${prefix}/user.cfg
if [ -n "\${GRUB2_PASSWORD}" ]; then
set superusers="root"
export superusers
password_pbkdf2 root \${GRUB2_PASSWORD}
fi
fi
EOF

IF you see something like this SAVE AND RENAME THE FILE[\b] 01_users If you DON"T see something like the above chances are it is somewhere else. Write down this file as being WRONG.



10_linux
. This is where your system is screwed up. You have two (2) files marked linux_proxy (10_ and 41_ ) and one (1) marked linux_xen (43_ ). You should not have ANY proxy files, if you do then it is a sure sign your files are scrambled and the computer is trying to figure out what is the. Let's start with two linux-proxy files. Chances are ONE (1) is *likely* to be CORRECT and the other WRONG.

This file gives definitions the SUB-MENU CONFIGURATIONS.Look inside and find the one that says something like this:

#! /bin/sh
set -e

# grub-mkconfig helper script.
# Copyright (C) 2006,2007,2008,2009,2010 Free Software Foundation, Inc.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GRUB is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GRUB. If not, see <http://www.gnu.org/licenses/>.

prefix="/usr"
exec_prefix="/usr"
datarootdir="/usr/share"

. "/usr/share/grub/grub-mkconfig_lib"

export TEXTDOMAIN=grub
export TEXTDOMAINDIR="${datarootdir}/locale"

CLASS="--class gnu-linux --class gnu --class os --unrestricted"

if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
OS="$(eval $(grep PRETTY_NAME /etc/os-release) ; echo ${PRETTY_NAME})"
CLASS="--class $(eval $(grep '^ID_LIKE=\|^ID=' /etc/os-release) ; [ -n "${ID_LIKE}" ] && echo ${ID_LIKE} || echo ${ID}) ${CLASS}"
else
OS="${GRUB_DISTRIBUTOR}"
CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
fi

# loop-AES arranges things so that /dev/loop/X can be our root device, but
# the initrds that Linux uses don't like that.
case ${GRUB_DEVICE} in
/dev/loop/*|/dev/loop[0-9])
GRUB_DEVICE=`losetup ${GRUB_DEVICE} | sed -e "s/^[^(]*(\([^)]\+\)).*/\1/"`
;;
esac

if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \
|| ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" \
|| uses_abstraction "${GRUB_DEVICE}" lvm; then
LINUX_ROOT_DEVICE=${GRUB_DEVICE}
else
LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
fi

case x"$GRUB_FS" in
xbtrfs)
rootsubvol="`make_system_path_relative_to_its_root /`"
rootsubvol="${rootsubvol#/}"
if [ "x${rootsubvol}" != x ]; then
GRUB_CMDLINE_LINUX="rootflags=subvol=${rootsubvol} ${GRUB_CMDLINE_LINUX}"
fi;;
xzfs)
rpool=`${grub_probe} --device ${GRUB_DEVICE} --target=fs_label 2>/dev/null || true`
bootfs="`make_system_path_relative_to_its_root / | sed -e "s,@$,,"`"
LINUX_ROOT_DEVICE="ZFS=${rpool}${bootfs}"
;;
esac

mktitle ()
{
local title_type
local version
local OS_NAME
local OS_VERS

title_type=$1 && shift
version=$1 && shift

OS_NAME="$(eval $(grep ^NAME= /etc/os-release) ; echo ${NAME})"
OS_VERS="$(eval $(grep ^VERSION= /etc/os-release) ; echo ${VERSION})"

case $title_type in
recovery)
title=$(printf '%s (%s) %s (recovery mode)' \
"${OS_NAME}" "${version}" "${OS_VERS}")
;;
*)
title=$(printf '%s (%s) %s' \
"${OS_NAME}" "${version}" "${OS_VERS}")
;;
esac
echo -n ${title}
}

title_correction_code=

linux_entry ()
{
os="$1"
version="$2"
type="$3"
isdebug="$4"
args="$5"

sixteenbit=""
linuxefi="linux"
initrdefi="initrd"
case "$machine" in
i?86|x86_64)
sixteenbit="16"
linuxefi="linuxefi"
initrdefi="initrdefi"
;;
aarch64)
linuxefi="linux"
initrdefi="initrd"
;;
esac

if [ -z "$boot_device_id" ]; then
boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
fi
if [ x$type != xsimple ] ; then
title=$(mktitle "$type" "$version")
if [ x"$title" = x"$GRUB_ACTUAL_DEFAULT" ] || [ x"Previous Linux versions>$title" = x"$GRUB_ACTUAL_DEFAULT" ]; then
replacement_title="$(echo "Advanced options for ${OS}" | sed 's,>,>>,g')>$(echo "$title" | sed 's,>,>>,g')"
quoted="$(echo "$GRUB_ACTUAL_DEFAULT" | grub_quote)"
title_correction_code="${title_correction_code}if [ \"x\$default\" = '$quoted' ]; then default='$(echo "$replacement_title" | grub_quote)'; fi;"
fi
if [ x$isdebug = xdebug ]; then
title="$title${GRUB_LINUX_DEBUG_TITLE_POSTFIX}"
fi
echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-$version-$type-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
else
echo "menuentry '$(echo "$os" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
fi
if [ x$type != xrecovery ] ; then
save_default_entry | grub_add_tab
fi

# Use ELILO's generic "efifb" when it's known to be available.
# FIXME: We need an interface to select vesafb in case efifb can't be used.
if [ "x$GRUB_GFXPAYLOAD_LINUX" = x ]; then
echo " load_video" | sed "s/^/$submenu_indentation/"
if grep -qx "CONFIG_FB_EFI=y" "${config}" 2> /dev/null \
&& grep -qx "CONFIG_VT_HW_CONSOLE_BINDING=y" "${config}" 2> /dev/null; then
echo " set gfxpayload=keep" | sed "s/^/$submenu_indentation/"
fi
else
if [ "x$GRUB_GFXPAYLOAD_LINUX" != xtext ]; then
echo " load_video" | sed "s/^/$submenu_indentation/"
fi
echo " set gfxpayload=$GRUB_GFXPAYLOAD_LINUX" | sed "s/^/$submenu_indentation/"
fi

echo " insmod gzio" | sed "s/^/$submenu_indentation/"

if [ x$dirname = x/ ]; then
if [ -z "${prepare_root_cache}" ]; then
prepare_root_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE} | grub_add_tab)"
fi
printf '%s\n' "${prepare_root_cache}" | sed "s/^/$submenu_indentation/"
else
if [ -z "${prepare_boot_cache}" ]; then
prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | grub_add_tab)"
fi
printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
fi
if [ -d /sys/firmware/efi ]; then
sed "s/^/$submenu_indentation/" << EOF
${linuxefi} ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
EOF
else
sed "s/^/$submenu_indentation/" << EOF
linux${sixteenbit} ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
EOF
fi
if test -n "${initrd}" ; then
if [ -d /sys/firmware/efi ]; then
sed "s/^/$submenu_indentation/" << EOF
${initrdefi} ${rel_dirname}/${initrd}
EOF
else
sed "s/^/$submenu_indentation/" << EOF
initrd${sixteenbit} ${rel_dirname}/${initrd}
EOF
fi
fi
if test -n "${fdt}" ; then
sed "s/^/$submenu_indentation/" << EOF
devicetree ${rel_dirname}/${fdt}
EOF
fi
sed "s/^/$submenu_indentation/" << EOF
}
EOF
}

machine=`uname -m`
case "x$machine" in
xi?86 | xx86_64)
list=`for i in /boot/vmlinuz-* /vmlinuz-* /boot/kernel-* ; do
if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
done` ;;
*)
list=`for i in /boot/vmlinuz-* /boot/vmlinux-* /vmlinuz-* /vmlinux-* /boot/kernel-* ; do
if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
done` ;;
esac

case "$machine" in
i?86) GENKERNEL_ARCH="x86" ;;
mips|mips64) GENKERNEL_ARCH="mips" ;;
mipsel|mips64el) GENKERNEL_ARCH="mipsel" ;;
arm*) GENKERNEL_ARCH="arm" ;;
*) GENKERNEL_ARCH="$machine" ;;
esac

prepare_boot_cache=
prepare_root_cache=
boot_device_id=
title_correction_code=

# Extra indentation to add to menu entries in a submenu. We're not in a submenu
# yet, so it's empty. In a submenu it will be equal to '\t' (one tab).
submenu_indentation=""

is_top_level=true
while [ "x$list" != "x" ] ; do
linux=`version_find_latest $list`
gettext_printf "Found linux image: %s\n" "$linux" >&2
basename=`basename $linux`
dirname=`dirname $linux`
rel_dirname=`make_system_path_relative_to_its_root $dirname`
version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
alt_version=`echo $version | sed -e "s,\.old$,,g"`
linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"

initrd=
for i in "initrd.img-${version}" "initrd-${version}.img" "initrd-${version}.gz" \
"initrd-${version}" "initramfs-${version}.img" \
"initrd.img-${alt_version}" "initrd-${alt_version}.img" \
"initrd-${alt_version}" "initramfs-${alt_version}.img" \
"initramfs-genkernel-${version}" \
"initramfs-genkernel-${alt_version}" \
"initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \
"initramfs-genkernel-${GENKERNEL_ARCH}-${alt_version}"; do
if test -e "${dirname}/${i}" ; then
initrd="$i"
break
fi
done

fdt=
for i in "dtb-${version}" "dtb-${alt_version}"; do
if test -f "${dirname}/${i}/${GRUB_DEFAULT_DTB}" ; then
fdt="${i}/${GRUB_DEFAULT_DTB}"
break
fi
done

config=
for i in "${dirname}/config-${version}" "${dirname}/config-${alt_version}" "/etc/kernels/kernel-config-${version}" ; do
if test -e "${i}" ; then
config="${i}"
break
fi
done

initramfs=
if test -n "${config}" ; then
initramfs=`grep CONFIG_INITRAMFS_SOURCE= "${config}" | cut -f2 -d= | tr -d \"`
fi

if test -n "${initrd}" ; then
gettext_printf "Found initrd image: %s\n" "${dirname}/${initrd}" >&2
elif test -z "${initramfs}" ; then
# "UUID=" and "ZFS=" magic is parsed by initrd or initramfs. Since there's
# no initrd or builtin initramfs, it can't work here.
linux_root_device_thisversion=${GRUB_DEVICE}
fi

if [ "x${GRUB_DISABLE_SUBMENU}" = "xyes" ] || [ "x${GRUB_DISABLE_SUBMENU}" = "xy" ]; then
GRUB_DISABLE_SUBMENU="true"
fi

if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xtrue ]; then
linux_entry "${OS}" "${version}" simple standard \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
if [ "x$GRUB_LINUX_MAKE_DEBUG" = "xtrue" ]; then
linux_entry "${OS}" "${version}" simple debug \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT} ${GRUB_CMDLINE_LINUX_DEBUG}"
fi

submenu_indentation="$grub_tab"

if [ -z "$boot_device_id" ]; then
boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
fi
# TRANSLATORS: %s is replaced with an OS name
echo "submenu '$(gettext_printf "Advanced options for %s" "${OS}" | grub_quote)' \$menuentry_id_option 'gnulinux-advanced-$boot_device_id' {"
is_top_level=false
fi

linux_entry "${OS}" "${version}" advanced standard \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
if [ "x$GRUB_LINUX_MAKE_DEBUG" = "xtrue" ]; then
linux_entry "${OS}" "${version}" advanced debug \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT} ${GRUB_CMDLINE_LINUX_DEBUG}"
fi

if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
linux_entry "${OS}" "${version}" recovery standard \
"single ${GRUB_CMDLINE_LINUX}"
fi

list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
done

# If at least one kernel was found, then we need to
# add a closing '}' for the submenu command.
if [ x"$is_top_level" != xtrue ]; then
echo '}'
fi

echo "$title_correction_code"


Find the file that comes cloest to matching the above contents and RENAME THAT FILE 10_linux
Mark down the remaining file as being WRONG though its contents might be found somewhere else so DO NOT DELETE.

20_linux_xen (your file 43_linux_xen).

20_linux_xen should look like this, if not check your other linux_proxi to see if it matches: It is going to look very much like your 10_linux file so look for the word xen in it that will identify which file is your 20_linux_xen. IF file 43 is a match as being your xen file RENAME THIS FILE 20_linux_xen If 43 is NOT the linux_xen file but your other linux_proxi file is RENAME *THAT* FILE 20_linux_xen


20_ppc_terminfo (your file 44_ppc_terminfo).

This file gives information about your terminal and should look like this:

prefix=/usr
exec_prefix=/usr
bindir=/usr/bin
libdir=/usr/lib
. "/usr/share/grub/grub-mkconfig_lib"

export TEXTDOMAIN=grub
export TEXTDOMAINDIR=/usr/share/locale

X=80
Y=24
TERMINAL=ofconsole

argument () {
opt=$1
shift

if test $# -eq 0; then
echo "$0: option requires an argument -- '$opt'" 1>&2
exit 1
fi
echo $1
}

check_terminfo () {

while test $# -gt 0
do
option=$1
shift

case "$option" in
terminfo | TERMINFO)
;;

-g)
NEWXY=`argument $option "$@"`
NEWX=`echo $NEWXY | cut -d x -f 1`
NEWY=`echo $NEWXY | cut -d x -f 2`

if [ ${NEWX} -ge 80 ] ; then
X=${NEWX}
else
echo "Warning: ${NEWX} is less than the minimum size of 80"
fi

if [ ${NEWY} -ge 24 ] ; then
Y=${NEWY}
else
echo "Warning: ${NEWY} is less than the minimum size of 24"
fi

shift
;;

*)
# # accept console or ofconsole
# if [ "$option" != "console" -a "$option" != "ofconsole" ] ; then
# echo "Error: GRUB_TERMINFO unknown console: $option"
# exit 1
# fi
# # perfer console
# TERMINAL=console
# accept ofconsole
if [ "$option" != "ofconsole" ] ; then
echo "Error: GRUB_TERMINFO unknown console: $option"
exit 1
fi
# perfer console
TERMINAL=ofconsole
;;
esac

done

}

if ! uname -m | grep -q ppc ; then
exit 0
fi

if [ "x${GRUB_TERMINFO}" != "x" ] ; then
F1=`echo ${GRUB_TERMINFO} | cut -d " " -f 1`

if [ "${F1}" != "terminfo" ] ; then
echo "Error: GRUB_TERMINFO is set to \"${GRUB_TERMINFO}\" The first word should be terminfo."
exit 1
fi

check_terminfo ${GRUB_TERMINFO}
fi

cat << EOF
terminfo -g ${X}x${Y} ${TERMINAL}
EOF

IF your terminfo file matches this out put RENAME THAT FILE 20_ppc_terminfo If not mark it WRONG.


30_os-prober (Your 45_os-prober). The contents of this file should look like this; if not write it down and mark it WRONG.

prefix="/usr"
exec_prefix="/usr"
datarootdir="/usr/share"

export TEXTDOMAIN=grub
export TEXTDOMAINDIR="${datarootdir}/locale"

. "/usr/share/grub/grub-mkconfig_lib"

if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then
exit 0
fi

if [ -z "`which os-prober 2> /dev/null`" ] || [ -z "`which linux-boot-prober 2> /dev/null`" ] ; then
# missing os-prober and/or linux-boot-prober
exit 0
fi

OSPROBED="`os-prober | tr ' ' '^' | paste -s -d ' '`"
if [ -z "${OSPROBED}" ] ; then
# empty os-prober output, nothing doing
exit 0
fi

osx_entry() {
if [ x$2 = x32 ]; then
# TRANSLATORS: it refers to kernel architecture (32-bit)
bitstr="$(gettext "(32-bit)")"
else
# TRANSLATORS: it refers to kernel architecture (64-bit)
bitstr="$(gettext "(64-bit)")"
fi
# TRANSLATORS: it refers on the OS residing on device %s
onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
cat << EOF
menuentry '$(echo "${LONGNAME} $bitstr $onstr" | grub_quote)' --class osx --class darwin --class os \$menuentry_id_option 'osprober-xnu-$2-$(grub_get_device_id "${DEVICE}")' {
EOF
save_default_entry | grub_add_tab
prepare_grub_to_access_device ${DEVICE} | grub_add_tab
cat << EOF
load_video
set do_resume=0
if [ /var/vm/sleepimage -nt10 / ]; then
if xnu_resume /var/vm/sleepimage; then
set do_resume=1
fi
fi
if [ \$do_resume = 0 ]; then
xnu_uuid ${OSXUUID} uuid
if [ -f /Extra/DSDT.aml ]; then
acpi -e /Extra/DSDT.aml
fi
if [ /kernelcache -nt /System/Library/Extensions ]; then
$1 /kernelcache boot-uuid=\${uuid} rd=*uuid
else
$1 /mach_kernel boot-uuid=\${uuid} rd=*uuid
if [ /System/Library/Extensions.mkext -nt /System/Library/Extensions ]; then
xnu_mkext /System/Library/Extensions.mkext
else
xnu_kextdir /System/Library/Extensions
fi
fi
if [ -f /Extra/Extensions.mkext ]; then
xnu_mkext /Extra/Extensions.mkext
fi
if [ -d /Extra/Extensions ]; then
xnu_kextdir /Extra/Extensions
fi
if [ -f /Extra/devprop.bin ]; then
xnu_devprop_load /Extra/devprop.bin
fi
if [ -f /Extra/splash.jpg ]; then
insmod jpeg
xnu_splash /Extra/splash.jpg
fi
if [ -f /Extra/splash.png ]; then
insmod png
xnu_splash /Extra/splash.png
fi
if [ -f /Extra/splash.tga ]; then
insmod tga
xnu_splash /Extra/splash.tga
fi
fi
}
EOF
}

used_osprober_linux_ids=

for OS in ${OSPROBED} ; do
DEVICE="`echo ${OS} | cut -d ':' -f 1`"
LONGNAME="`echo ${OS} | cut -d ':' -f 2 | tr '^' ' '`"
LABEL="`echo ${OS} | cut -d ':' -f 3 | tr '^' ' '`"
BOOT="`echo ${OS} | cut -d ':' -f 4`"
if UUID="`${grub_probe} --target=fs_uuid --device ${DEVICE%@*}`"; then
EXPUUID="$UUID"

if [ x"${DEVICE#*@}" != x ] ; then
EXPUUID="${EXPUUID}@${DEVICE#*@}"
fi

if [ "x${GRUB_OS_PROBER_SKIP_LIST}" != "x" ] && [ "x`echo ${GRUB_OS_PROBER_SKIP_LIST} | grep -i -e '\b'${EXPUUID}'\b'`" != "x" ] ; then
echo "Skipped ${LONGNAME} on ${DEVICE} by user request." >&2
continue
fi
fi

If your file looks like this RENAME THAT FILE 30_os-prober

40_custom (Your 40_ and 46_)

40_custom is the one that should contain your Windows entry. Whichever one contains the text that reads something like this:

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.


### BEGIN /etc/grub.d/40_custom ###

if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
menuentry "Fedora 20 (3.19.8-100.fc20.x86_64)(Heisenbug)"{
# --class fedora --class gnulinux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.15.10-200.fc20.x86_64-advanced-6f9e3ccb-4afc-bb29-7fa6ba2d9dbd'
set gfxpayload=text
insmod gzio
insmod part_msdos
insmod ext2
set root='hd1,msdos2'
# if [ x$feature_platform_search_hint=x,y];then
# search --no-floppy --fs-uuid --set=root b07e6495-5e38-4d45-8560-8b6be263f397
# else
# search --no-floppy --fs-uuid --set=root b07e6495-5e38-4d45-8560-8b6be263f397
# fi
linux /vmlinuz-3.19.8-100.fc20.x86_64 root=UUID=6f9e3ccb-c6e9-4afc-bb29-7fa6ba2d9dbd ro vconsole.font=latarcyrheb-sun16 rhgb quiet nouveau.modset=0 rd.driver.blacklist=nouveau video=vesa:off LANG=en_US.UTF-8
initrd /initramfs-3.19.8-100.fc20.x86_64.img
# chainloader +1
}

EOF

RENAME THAT FILE 40_custom. The other file file should be largely empty, RENAME the largely EMPTY file

41_custom

Having now renamed the files to what they should be MOVE any excess WRONG files to some backup location DO NOT DELETE . Once you have moved the excess file to some place SAFE you can NOW DELETE from /etc/grub.d

Step 5: Run the command grub2-mkconfig -o /boot/grub2/grub.cfg (For UEFI , find the grub menu in /boot/efi ...)

Step 6: Reboot your machine. With luck your menu is now in the correct order and Windows will now be found.
Last edited by desertcat on 2018/07/14 11:53:32, edited 2 times in total.

Post Reply