You are not logged in.
Hello-
Struggling to get Grub booting this Surface Pro 3.
Following instructions from
https://wiki.archlinux.org/index.php/GRUB#UEFI_systems
and
EFI/GPT section of
https://wiki.archlinux.org/index.php/Be … oot_loader
have partition created >512M, marked bootable and 'ESP' (although i can't find reference to what the 'esp' flag does in the man page, etc)
parted output had something like this (no net access to computer at this point)
Number ... Size ... File system ... Flags
1 ... 650MB ... fat32 ... boot, esp
2 ... 122GB ... ext4 ...
Have installed grub on that partition like so
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=archtag_grub --recheck
which results in
Installing for x86_64-efi platform
Installation finished. No error reported
Created config as instructed
grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found Intel Microcode image <---(same result with and without microcode installed)
/run/lvm/lvmetad.socket: connect failed: No such file or directory
WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
grub-probe: error: cannot find a GRUB drive for /dev/sdb1. Check your device map <---(i think shouldn't matter since boot device is sda)
done
Verified that config file is 'fresh' at specified path:
('ls -l' time matches 'date')
I found this section
https://wiki.archlinux.org/index.php/GRUB#EFI_path
And have tried copying the file to the right place, however the paths don't exist- the wiki calls for
mkdir /boot/efi/EFI/boot
cp /boot/efi/EFI/grub/grubx64.efi /boot/efi/EFI/boot/bootx64.efi'
However, my computer does not have a '/boot/efi/EFI/grub/grubx64.efi' -- it has '/boot/EFI/grub/grubx64.efi'
i did try copying that file to /boot/EFI/boot/bootx64.efi , however that did not make any changes
upon reboot, arrives at the grub> prompt
when at the grub> prompt, attempted to boot using this, results in this:
set root=(hd0,gpt1)
chainloader +1
error:invalid EFI file path.
All of the references in the grub examples
https://wiki.archlinux.org/index.php/GRUB/EFI_examples
show the /boot/efi/EFI path, however i'm not sure how that exists, since the beginners install manual and EFISTUB wikis specifically say
# grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=arch_grub --recheck
/boot is also recommended for mounting the EFI System Partition on a UEFI/GPT system. See EFISTUB and related articles for alternatives.
The simplest option is to mount it at /boot, since this allows pacman to directly update the kernel that the EFI firmware will read. If you elect for this option, continue to #Booting EFISTUB.
The only bit of output of grub-mkconfig that includes 'efi' in the correct context is
grub-mkconfig | grep -i efi
insmod efi_gop
insmod efi_uga
search --no-flopppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 $UUID
efibootmgr -v does show
HD(1,GPT,$UUID)/File(\EFI\grub\grubx64.efi)
(which exists at /boot/EFI/grub/grubx64.efi)
Any further troubleshooting tips would be much appreciated!
Last edited by thenextdon13 (2015-08-28 03:10:48)
Offline
Have you tried using systemd-boot (gummiboot) or a direct NVRAM entry (using EFI_STUB booting)?
To troubleshoot this, we really need to see verbatim command output -- you can pipe command output to a text file and export that to a USB stick to post it here.
# parted -l
# efibootmgr -v
lsblk -f
The last command should be run *after* mounting all your partitions and using `arch-chroot`
The content of /boot/grub/grub.cfg would also be very useful.
Jin, Jîyan, Azadî
Offline
Hello, Head_on_a_Stick. Sorry about that.
I forgot that I have outgoing networking on the device, just not incoming (NAT/Firewalling where i am). Unfortunately have to use only USB port for keyboard, but got the output you were asking for via scp.
~$ cat parted.txt
Model: ATA HFS128G3AMNB-220 (scsi)
Disk /dev/sda: 128GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 651MB 650MB fat32 boot, esp
2 651MB 123GB 122GB ext4
Model: Generic- USB3.0 CRW -SD (scsi)
Disk /dev/sdb: 31.9GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
2 129kB 32.6MB 32.5MB primary fat16 esp
~$ cat efibootmgr.txt
BootCurrent: 0002
Timeout: 2 seconds
BootOrder: 0002,0003,0000,0001
Boot0000* grub HD(1,GPT,78ad7abf-fd09-4139-b9a5-755d91f895da,0x800,0x136000)/File(\EFI\grub\grubx64.efi)
Boot0001 Windows Boot Manager VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................
Boot0002* USB Drive PciRoot(0x0)/Pci(0x14,0x0)/USB(13,0)/HD(1,MBR,0x4294967268,0xfc,0xf800)..BO
Boot0003* archtag_grub HD(1,GPT,78ad7abf-fd09-4139-b9a5-755d91f895da,0x800,0x136000)/File(\EFI\archtag_grub\grubx64.efi)
~$ cat lsblk.txt
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
├─sda1 /boot
└─sda2 /
sdb
├─sdb1
└─sdb2
loop0
loop1
└─arch_airootfs /etc/resolv.conf
loop2
└─arch_airootfs /etc/resolv.conf
I see that in bootorder, grub is not first - but i am certainly making it to grub, or was prior to this boot.
Offline
Whoops, missed the /boot/grub/grub.conf note at the end, find that now attached
Thank you for the help.
:~$ cat grub.txt
#
# 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 0eaa73f3-a02c-4241-8417-64423d043376
else
search --no-floppy --fs-uuid --set=root 0eaa73f3-a02c-4241-8417-64423d043376
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 ###
### 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.
### 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+ ###
Offline
I see that grub.cfg has root set as 'hd0,gpt2'
If i chainloader +1 from grub command line, same results
grub> set root=(hd0,gpt2)
grub> chainloader +1
error: invalid EFI file path.
grub>
Offline
And i feel like an idiot. Every time i reread your post, i see something i missed. Sorry for updating my own post this many times- but for sake of completeness-
No, I have not tried systemd-boot (gummiboot) or a direct NVRAM entry (using EFI_STUB booting)...
All of the other systems I maintain use Grub, and for sake of not trying to stuff another bit of stuff into my brain, which seems to be pouring things out faster than i can retain them, I was going to try to stick with Grub.
Offline
Found the problem, thanks to looking at other people helping with troubleshooting.
That helped me find out more about grub commands, and the ability to list the files on a drive/partition by using the syntax
> ls (hd0,gpt2)/
i found that i had /boot living on both gpt1 and gpt2, probably due to a screwup during mounting and pacstrapping base and base-devel.
I was unsure of the situation with using /boot for EFI rather than an EFI partition directly, and must not have had /boot mounted when i did the pacstrap.
I found that initramfs* and vmlinuz-linux were on the wrong partition.
Copied them to the correct partition, all is well.
Will edit title and mark as solved.
EDIT:
Can't seem to see how to edit title. This is resolved/solved.
Last edited by thenextdon13 (2015-08-28 03:03:28)
Offline
You can mark your thread as [Solved] by editing your first post and prepending it to the title.
Offline
Thank you.
Offline