My problem is the following: i have 2 hds, one with eos and the other one with windows 7 (at least i had) my problem is that since i formated the hd with windows 7 to install windows 10 grub is still showing windows 7 and if i try to boot that hd it will fail, do i need to regenerate grub or maybe update it ? thanks
You probably need to delete/modify the config for Windows in /etc/grub.d
If you delete it, enable os-prober in /etc/default/grub
and run sudo grub-mkconfig -o /boot/grub/grub.cfg
┬─[ramon@ramon-m61pmes2p:/e/grub.d]─[12:06:54]
╰─>$ ls 0 < 12:06:54
00_header* 10_linux* 10_linux.bak 20_linux_xen* 30_os-prober* 30_os-prober.bak 30_uefi-firmware* 35_fwupd* 40_custom* 41_custom* README
i dont see any windows file inside grub.d
In that case, you can skip that step and do the other steps.
GRUB_DISABLE_OS_PROBER=false, do i need to set this to true ?
No, that is correct. You probably just need to run the last command.
Thanks, is there any risk to run that command ?
Yes.
i ran that command maybe a few weeks ago. so it should be pretty much okay to run it again i guess ?
Yes, in most cases it will be fine.
i ran the command and it cleared windows 7 on grub, but now it only shows both options to boot eos, how can i make grub show the hd with windows 10 ?
Can you share the full output from the command sudo grub-mkconfig
┬─[ramon@ramon-m61pmes2p:~]─[13:19:17]
╰─>$ sudo grub-mkconfig 0 < 13:19:17
[sudo] senha para ramon:
A gerar ficheiro de configuração grub...
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
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="0"
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
}
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_msdos
insmod ext2
set root='hd1,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 d1a3e63f-1931-4b17-a860-b6cbef37c814
else
search --no-floppy --fs-uuid --set=root d1a3e63f-1931-4b17-a860-b6cbef37c814
fi
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=pt_BR
insmod gettext
fi
terminal_input console
terminal_output gfxterm
Tema encontrado: /boot/grub/themes/EndeavourOS/theme.txt
insmod part_msdos
insmod ext2
set root='hd1,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 d1a3e63f-1931-4b17-a860-b6cbef37c814
else
search --no-floppy --fs-uuid --set=root d1a3e63f-1931-4b17-a860-b6cbef37c814
fi
insmod gfxmenu
loadfont ($root)/boot/grub/themes/EndeavourOS/unifont-regular-16.pf2
insmod png
set theme=($root)/boot/grub/themes/EndeavourOS/theme.txt
export theme
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/10_linux ###
Imagem Linux encontrada: /boot/vmlinuz-linux
Imagem initrd encontrada: /boot/amd-ucode.img /boot/initramfs-linux.img
menuentry 'EndeavourOS, on linux' --class endeavouros --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-d1a3e63f-1931-4b17-a860-b6cbef37c814' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='hd1,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 d1a3e63f-1931-4b17-a860-b6cbef37c814
else
search --no-floppy --fs-uuid --set=root d1a3e63f-1931-4b17-a860-b6cbef37c814
fi
echo 'Loading kernel linux ...'
linux /boot/vmlinuz-linux root=UUID=d1a3e63f-1931-4b17-a860-b6cbef37c814 rw quiet loglevel=3 nowatchdog nvme_load=YES
echo 'Carregando o ramdisk inicial...'
initrd /boot/amd-ucode.img /boot/initramfs-linux.img
}
Found fallback initrd image(s) in /boot: amd-ucode.img initramfs-linux-fallback.img
menuentry 'EndeavourOS, on linux (fallback initramfs)' --class endeavouros --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-d1a3e63f-1931-4b17-a860-b6cbef37c814' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='hd1,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 d1a3e63f-1931-4b17-a860-b6cbef37c814
else
search --no-floppy --fs-uuid --set=root d1a3e63f-1931-4b17-a860-b6cbef37c814
fi
echo 'Loading kernel linux ...'
linux /boot/vmlinuz-linux root=UUID=d1a3e63f-1931-4b17-a860-b6cbef37c814 rw quiet loglevel=3 nowatchdog nvme_load=YES
echo 'Carregando o ramdisk inicial...'
initrd /boot/amd-ucode.img /boot/initramfs-linux-fallback.img
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
Aviso: os-prober será executado para detectar outras partições de arranque.
A sua saída será usada para detectar binários de arranque nessas partições e criar novas entradas.
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/30_uefi-firmware ###
A adicionar entrada de menu para UEFI Firmware Settings ...
if [ "$grub_platform" = "efi" ]; then
fwsetup --is-supported
if [ "$?" = 0 ]; then
menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
fwsetup
}
fi
fi
### END /etc/grub.d/30_uefi-firmware ###
### BEGIN /etc/grub.d/35_fwupd ###
### END /etc/grub.d/35_fwupd ###
### 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.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_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/41_custom ###
concluído
It looks like os-prober
is running but not detecting your Windows partition.
maybe if i set the hd windows 10 as primary boot order this could help ?
The most common reason is that your Linux is EFI and your windows BIOS or the opposite.
They either need to both be installed in BIOS mode or both in UEFI.
i think i’ll just use quick boot menu instead, thanks for the help
think you could add windows to grub.d/40_custom
so i just add ‘windows’ at the end of the 40_custom file ?
I don’t think that will work if one is UEFI and the other BIOS/MBR.