You are not logged in.

#1 2018-07-19 21:18:47

2d666c79
Member
Registered: 2018-07-19
Posts: 8

[SOLVED] Fresh install, GRUB opens to prompt, unable to load boot menu

Hi everyone. I'm new to Arch, coming from half a year of experience with Fedora and willingness to understand Linux. I had a dual-boot setup with a EFI partition [1], Fedora root & home partitions [2, 3], and Windows partitions [4, 5, 6]. I needed to keep my Windows so what I did was back up EFI partition, delete & recreate partitions 1-3 and install Arch following instructions from Installation guide. No problems until I hit the wall with GRUB.
To install GRUB I mounted EFI partition on /boot/efi and ran

grub-install --removable --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub

and ran grub-mkconfig as per instructions, all under arch-chroot. Now when I boot into GRUB, it shows command prompt instead of the menu. I found a thread suggesting you can load the menu using configfile command:

configfile (hd1,gpt2)/boot/grub/grub.cfg

but it does nothing (just shows an empty prompt screen) and this is the point where it feels like I'm hopelessly stuck. I have verified that I'm passing the correct path to /boot/grub/grub.cfg by confirming that the file is there and comparing UUIDs of the root partition received from running lsblk -f in archiso and ls (hd1,gpt2) in GRUB.

Some notes that may or may not be relevant:

  • I'm going for a setup with no swap partition.

  • I had to use --removable for grub-install cause otherwise UEFI wouldn't even recognize it as a boot option.

  • I have installed intel-ucode before installing GRUB.

  • I have tried to perform the complete process starting with repartitioning from scratch.

I'm looking for advice on how to boot into Arch at least manually, ideally with fixing GRUB to load into menu rather than command prompt. Fortunately I have a backup of the old EFI partition so I'm not locked out of booting to Windows but I want to use Arch as my main OS. It sure already has proven itself to be tricky but I'm ready. Thank you all in advance.

Last edited by 2d666c79 (2018-07-23 11:38:54)

Offline

#2 2018-07-20 00:34:26

jordicg
Member
From: Mexico City
Registered: 2018-07-19
Posts: 94
Website

Re: [SOLVED] Fresh install, GRUB opens to prompt, unable to load boot menu

Also new here but a important step is this
pacman - S grub os-prober
grub-install /dev/sda
grub-mkconfig - o /boot/grub/grub.cfg
mkinitcpio - p linux

Also this step just before installing your desktop. -

pacman - S lightdm lightdm-gtk-greeter
systemctl enable lightdm

If you fail to complete one of this steps you will have those errors, good day

Don't know much about EFI my motherboard doesn't support it, but the steps are similar

Last edited by jordicg (2018-07-20 00:42:03)


With great power there must also come -- great responsibility!

Offline

#3 2018-07-20 05:09:22

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: [SOLVED] Fresh install, GRUB opens to prompt, unable to load boot menu

@2d666c79 /boot is not a separate partition on your system?  What is contents of /boot/grub/grub.cfg and the outputs of `parted -l` and `blkid`

Offline

#4 2018-07-20 08:51:16

robg
Member
Registered: 2015-03-05
Posts: 218

Re: [SOLVED] Fresh install, GRUB opens to prompt, unable to load boot menu

Dear jordicg,

For the sake of minimizing the confusion of other people looking up those threads, please refrain from posting incompatible instructions. The OP clearly has a UEFI setup for which the correct installation commands can be found in the corresponding wiki article. Also, lightdm is not part of the equation here and is certainly not required to boot the system.

Dear 2d666c79,

I believe loqs is on the right track. Failing to run `configfile (hd1,gpt2)/boot/grub/grub.cfg` implies either not finding the config file or the latter being invalid.

Offline

#5 2018-07-20 10:48:39

2d666c79
Member
Registered: 2018-07-19
Posts: 8

Re: [SOLVED] Fresh install, GRUB opens to prompt, unable to load boot menu

loqs wrote:

@2d666c79 /boot is not a separate partition on your system?  What is contents of /boot/grub/grub.cfg and the outputs of `parted -l` and `blkid`

I mounted ESP at /boot/efi as recommended here, so /boot is just a directory on the root partition. I did try to mount ESP to /boot and reinstall GRUB there (doing rm -r /boot beforehand) and it didn't work, might've been different problem though as I wasn't at current understanding/progress back then. Should I try again?

Contents of /boot/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-ieee1275='ieee1275//disk@0,gpt2' --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  792d1064-77e3-4d98-8f09-bb0ce97e277e
else
  search --no-floppy --fs-uuid --set=root 792d1064-77e3-4d98-8f09-bb0ce97e277e
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 ###

Output of parted -l:

Model: ATA KINGSTON SHFS37A (scsi)
Disk /dev/sda: 240GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                          Flags
 1      1049kB  538MB   537MB   fat32        EFI System                    boot, esp
 2      538MB   34.9GB  34.4GB  ext4         Linux filesystem
 3      34.9GB  152GB   117GB   ext4         Linux filesystem
 4      152GB   152GB   16.8MB               Microsoft reserved partition  msftres
 5      152GB   240GB   87.9GB  ntfs         Basic data partition          msftdata
 6      240GB   240GB   479MB   ntfs                                       hidden, diag


Model: ATA WDC WD10EZEX-00W (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                          Flags
 1      17.4kB  134MB   134MB                Microsoft reserved partition  msftres
 2      135MB   1000GB  1000GB  ntfs         Basic data partition          msftdata


Model: UFD 2.0 Silicon-Power16G (scsi)
Disk /dev/sdc: 15.6GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  15.6GB  15.6GB  primary  fat32        boot, lba

Output of blkid:

/dev/sda1: UUID="F9C0-9FBD" TYPE="vfat" PARTLABEL="EFI System" PARTUUID="47b815b4-c647-4de9-b1ff-ae6558eb737d"
/dev/sda2: UUID="792d1064-77e3-4d98-8f09-bb0ce97e277e" TYPE="ext4" PARTLABEL="Linux filesystem" PARTUUID="58cdfece-45c2-4a86-92cf-d7d9dd40fe60"
/dev/sda3: UUID="513118a5-7617-428b-ac6a-7ee7027abf89" TYPE="ext4" PARTLABEL="Linux filesystem" PARTUUID="6f256bb4-3d6f-4627-a875-4ab0e2b8e43e"
/dev/sda5: LABEL="Windows" UUID="8656DA7A56DA6A87" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="16cf0639-f0a4-481d-af99-f6ac8d41b0a5"
/dev/sda6: UUID="12CA6D6CCA6D4D53" TYPE="ntfs" PARTUUID="00223421-aeed-4d6a-a2a3-62f2ce9e0465"
/dev/sdb2: LABEL="HDD" UUID="C0F6F8AFF6F8A6B6" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="a6d3835d-f5d4-4862-b8ee-5b24835a288d"
/dev/sdc1: LABEL="ARCH_201807" UUID="42AD-0B9E" TYPE="vfat" PARTUUID="000d6949-01"
/dev/loop0: TYPE="squashfs"
/dev/sda4: PARTLABEL="Microsoft reserved partition" PARTUUID="acfd6b21-3fdf-4ed4-9c48-1ae51f4ef275"
/dev/sdb1: PARTLABEL="Microsoft reserved partition" PARTUUID="dc3af646-40b7-41e2-8e33-738529970f80"

Offline

#6 2018-07-21 17:14:32

robg
Member
Registered: 2015-03-05
Posts: 218

Re: [SOLVED] Fresh install, GRUB opens to prompt, unable to load boot menu

Have you checked whether the answer in the thread you linked to is applicable? That is, have you tried copying your GRUB config file to the ESP and see if it can be then found using the (hd1, gpt1) path? Although the thread you linked to is old, it seems plausible; if not, the GRUB EFI application would have to implement reading ext4 filesystems, which seems like a lot of extra baggage...

In any case, if the above works, I would recommend you to mount the ESP on /boot and to reinstall GRUB there. Since you claim to have done this (and that it failed), please report back with all the issued commands and outputs the next time you try to install GRUB with ESP on /boot.

Offline

#7 2018-07-21 22:17:54

respiranto
Member
Registered: 2015-05-15
Posts: 479
Website

Re: [SOLVED] Fresh install, GRUB opens to prompt, unable to load boot menu

2d666c79 wrote:

Contents of /boot/grub/grub.cfg:

[...]
### BEGIN /etc/grub.d/10_linux ###

### END /etc/grub.d/10_linux ###
[...]

That section should not be empty.  Assuming the ordinary linux kernel is installed.  And /etc/grub.d/10_linux is unchanged.

Do /boot/vmlinuz-linux and /boot/initramfs-linux.img exist?  Maybe those were installed on the EFI partition when it was mounted on /boot.

Was there any output when running `grub-mkconfig'?  If so, which?

Last edited by respiranto (2018-07-21 22:18:13)

Offline

#8 2018-07-23 11:38:27

2d666c79
Member
Registered: 2018-07-19
Posts: 8

Re: [SOLVED] Fresh install, GRUB opens to prompt, unable to load boot menu

respiranto wrote:

Do /boot/vmlinuz-linux and /boot/initramfs-linux.img exist?  Maybe those were installed on the EFI partition when it was mounted on /boot.

This was the answer, thank you! Those indeed were put on EFI partition during installation.
I tried to reinstall from scratch keeping in mind to be sure to mount EFI as /boot/efi and I knew immediately when grub-mkconfig printed "found linux at ..." which it didn't on previous installs.

Also thanks robg and loqs for your help investigating this.

Offline

Board footer

Powered by FluxBB