You are not logged in.
My current problem is I can't use grub 2 to generate the correct grub.cfg that has both my Linux and Windows partitions. Whenever I boot into grub I only get the minimal bash prompt, instead of a list of the installed OSs. Below is a description of what I have done so far to investigate the problem.
I have installed arch linux along side Windows 8.1 on a UEFI system.
My partition scheme is:
(note: not using LVM. This is a GPT partitioned disk)
/dev/sda1 ESP partition mount /boot/efi
/dev/sda2 ARCHLINUX mount /
/dev/sda5 WINDOWS
Whenever I run os-prober, it can only find my windows installation:
# os-prober
No volume groups found
/dev/sda1@/EFI/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi
linux-boot-prober does find my Arch installation:
# linux-boot-prober
/dev/sda1:/dev/sda1::/vmlinuz-linux:/initramfs-linux.img:root=/dev/sda1
In /etc/grub.d/30_os-prober both of these commands are used to populate the found OSs. However, if I run just 30_os-prober in bash it only prints out a menuentry for Windows
# bash -e /etc/grub.d/30_os-prober
menuentry "Windows ...
Here are the software versions I'm using:
* os-prober 1.58-3
* grub 1:2.02.beta2-4
Does anyone else know what could be going wrong on my system? Thanks in advance.
Offline
Did you install the necessary efi files for Linux?
I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.
Offline
Did you install the necessary efi files for Linux?
I have not. What is the best way to install them?
Offline
nomorewindows wrote:Did you install the necessary efi files for Linux?
I have not. What is the best way to install them?
Reading the grub wiki, did you run the line
grub-install --target=x86_64-efi --efi-directory=$esp --bootloader-id=grub --recheck --debug
Most likely windows is properly setup, but the bootloader for linux has to have the efi and com32 files installed for it to work.
I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.
Offline
avr wrote:nomorewindows wrote:Did you install the necessary efi files for Linux?
I have not. What is the best way to install them?
Reading the grub wiki, did you run the line
grub-install --target=x86_64-efi --efi-directory=$esp --bootloader-id=grub --recheck --debug
Most likely windows is properly setup, but the bootloader for linux has to have the efi and com32 files installed for it to work.
I ran grub-install with those settings when I set up grub for the first time. I've just re-run it, but os-prober is still only finding Windows.
Offline
Although this is Arch's grub and not another distribution's grub loader it should recognize Arch. The suggestion there was to install lsb-release but I don't think that should make any difference here. What does your grub.cfg and related files show? Even though you really shouldn't have to manually make the grub entries, you could also use the grub shell to enter the normal sequence to see if you can get it to boot. I haven't really gotten ahold of a UEFI machine yet, but the wiki should get you there unless you have a funky implementation of UEFI.
I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.
Offline
Here's my /boot/efi/grub/grub.cfg
#
# 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_gpt
insmod ext2
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 7df5e7b7-fd6f-48a0-bfd9-6034798adf1e
else
search --no-floppy --fs-uuid --set=root 7df5e7b7-fd6f-48a0-bfd9-6034798adf1e
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=en_US
insmod gettext
fi
terminal_input console
terminal_output gfxterm
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 ###
### 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 ###
menuentry 'Windows Boot Manager (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-efi-2826-7706' {
insmod part_gpt
insmod fat
set root='hd0,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 2826-7706
else
search --no-floppy --fs-uuid --set=root 2826-7706
fi
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
### END /etc/grub.d/30_os-prober ###
### 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 "Windows 8.1" {
insmod part_gpt
insmod fat
insmod serach_fs_uuid
insmod chain
search --fs-uuid --no-floppy --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremental=ahci0,gpt1
chainloader /efi/Microsoft/Boot/bootmgfw.efi
}
menuentry "Shutdown" {
echo "Shutting down..."
halt
}
menuentry "Restart" {
echo "Restarting..."
reboot
}
### 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 ###
### BEGIN /etc/grub.d/60_memtest86+ ###
### END /etc/grub.d/60_memtest86+ ###
Note the last three menuentries are pulled from 40_custom in /etc/grub.d/
Offline
For what it's worth, here are all of the files that can't be copied into the ESP using the grub-install command
grub-install: info: cannot open `/boot/grub/device.map': No such file or directory.
grub-install: info: cannot open `/usr/lib/grub/x86_64-efi/efiemu32.o': No such file or directory.
grub-install: info: cannot open `/usr/lib/grub/x86_64-efi/efiemu64.o': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/oc/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/be@latin/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/el/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/am/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/nds/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/ms/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/dz/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/ca@valencia/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/gu/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/ur/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/tg/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/mai/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/bn/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/rw/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/en_US/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/mk/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/cy/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/br/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/no.us-ascii/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/sw/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/ga/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/ne/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/zu/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/locale.alias/LC_MESSAGES/grub.mo': Not a directory.
grub-install: info: cannot open `/usr/share/locale/hr/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/bg/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/nb/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/pt.us-ascii/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/ps/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/kk/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/en@shaw/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/pt_BR.us-ascii/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/lg/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/be/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/rm/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/as/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/si/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/et/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/fa/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/km/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/hy/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/de_AT/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/ug/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/ml/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/de.us-ascii/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/or/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/crh/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/cs/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/pt/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/sl_SI/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/sk/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/is/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/ia/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/ks/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/sr/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/an/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/ta/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/bs/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/eu/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/th/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/hi/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/sq/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/ku/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/bn_IN/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/ar/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/ky/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/tt/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/wa/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/te/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/es.us-ascii/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/gd/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/ka/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/yi/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/ko/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/zh_HK/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/bal/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/en_GB/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/kn/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/sr@latin/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/xh/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/af/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/mr/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/lv/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/az/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/he/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/en_CA/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/mg/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/nn/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/en@boldquot/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/mn/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/sr@ije/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/ro/LC_MESSAGES/grub.mo': No such file or directory.
grub-install: info: cannot open `/usr/share/locale/tl/LC_MESSAGES/grub.mo': No such file or directory.
Offline
Does pacman -Qk grub show that all the files are there? Are your linux partitions marked as Linux?
Last edited by nomorewindows (2014-10-12 12:26:11)
I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.
Offline
Does pacman -Qk grub show that all the files are there? Are your linux partitions marked as Linux?
# pacman -Qk | grep -i 'grub'
warning: grub: /boot/grub/grub.cfg (No such file or directory)
grub: 1025 total files, 1 missing file
warning: linux: /boot/vmlinuz-linux (No such file or directory)
If I remount to /boot
# pacman -Qk | grep -i 'grub'
grub: 1025 total tiles, 0 missing files
However, when I now do:
# grub-mkconfig -o /boot/grub/grub.cfg
It finds my linux kernel (just vmlinuz, no .efi files related to Linux) and the initramfs along with finding windows. But when I reboot I'm still stuck at the grub minimal bash prompt.
Last edited by avr (2014-10-13 02:51:13)
Offline
I tried running the generated .cfg with bash, and noticed that it was failing because insmod couldn't find part_gpt.mod. However, part_gpt.mod exists in /boot/x86_64-efi/part_gpt.mod
# bash -e /boot/grub/grub.cfg
insmod: ERROR: could not load module part_gpt: No such file or directory
Last edited by avr (2014-10-13 04:08:34)
Offline
Try this:(if you haven't already)
https://wiki.archlinux.org/index.php/GR … workaround
Also, I guess the file /boot/grub/grub.cfg is referred to when in legacy mode.
To work with efi, your grub file should ideally be at:
/boot/efi/grub/grub.cfg (I see that it is-in your case, however it's kindof pointless to deal with /boot/grub/grub.cfg if you're not using legacy mode)
or
/boot/efi/EFI/grub/grub.cfg (Preferred)
where /boot/efi => $esp
Last edited by nskool (2014-10-13 10:17:02)
I'm ready to learn anything good that you're ready to teach me:)
Offline
Try this:(if you haven't already)
https://wiki.archlinux.org/index.php/GR … workaroundAlso, I guess the file /boot/grub/grub.cfg is referred to when in legacy mode.
To work with efi, your grub file should ideally be at:
/boot/efi/grub/grub.cfg (I see that it is-in your case, however it's kindof pointless to deal with /boot/grub/grub.cfg if you're not using legacy mode)
or
/boot/efi/EFI/grub/grub.cfg (Preferred)
where /boot/efi => $esp
I'm afraid you've guessed wrong.
1. /boot/grub/grub.cfg is 'referred to' equally for standard BIOS and UEFI installations.
2. It is possible to install grub completely to the UEFI partition, but that is just an alternative - not ideal - method.
Offline