You are not logged in.

#1 2017-06-25 17:21:11

underasail
Member
Registered: 2017-06-25
Posts: 9

[SOLVED] Unable to boot into GRUB after install

I have tried repeatedly to finish the Arch install and boot into the new install, but each time I finish the steps for installing and reboot, I can only boot into the screen where I can disable Secure Boot. This is on a machine I'm trying to dual boot with Windows 10 that is already installed. However, I also can't boot into Windows anymore.

Last edited by underasail (2017-06-27 12:15:50)

Offline

#2 2017-06-25 18:10:48

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,779

Re: [SOLVED] Unable to boot into GRUB after install

Welcome to the Arch Linux forums.  As we are discussing secure boot, I can but assume this is a uefi system.
Tell us about your partition scheme.  Boot your install media and post the output of lsblk
What boot loader are you using?
What are you using as an installation guide?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Online

#3 2017-06-25 18:41:49

underasail
Member
Registered: 2017-06-25
Posts: 9

Re: [SOLVED] Unable to boot into GRUB after install

As I don't have an easy way to copy text over, I'll just keep to typing out as much as I can. If more detail would help, I can throw up a picture.

I have 7 partitions right now. 1, 6, and 7 are listed as Windows recovery environments with the output of fdisk -l. 2 is the EFI system. 3 is listed as Microsoft reserved. 4 and 5 are listed as Microsoft basic data. 4 houses my Windows 10 primary partition and 5 (EDIT) is where I'm trying to install Arch.
I've been attempting to use GRUB following this (https://wiki.archlinux.org/index.php/GRUB#UEFI_systems) setup.
I've been using the general Installation Guide on the Wiki for the installation.

lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0    7:0    0 375.6M  1 loop /run/archiso/sfs/airootfs
sda      8:0    0 119.2G  0 disk 
├─sda1   8:1    0   340M  0 part 
├─sda2   8:2    0   200M  0 part 
├─sda3   8:3    0   128M  0 part 
├─sda4   8:4    0    50G  0 part 
├─sda5   8:5    0  62.5G  0 part 
├─sda6   8:6    0   450M  0 part 
└─sda7   8:7    0   5.7G  0 part 
sdb      8:16   1   3.8G  0 disk 
├─sdb1   8:17   1   488M  0 part /run/archiso/bootmnt
└─sdb2   8:18   1    64M  0 part 
 fdisk -l
Disk /dev/sda: 119.2 GiB, 128035676160 bytes, 250069680 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 7413DC3E-3390-4553-9885-0B36C9EC0B22

Device         Start       End   Sectors  Size Type
/dev/sda1       2048    698367    696320  340M Windows recovery environment
/dev/sda2     698368   1107967    409600  200M EFI System
/dev/sda3    1107968   1370111    262144  128M Microsoft reserved
/dev/sda4    1370112 106196901 104826790   50G Microsoft basic data
/dev/sda5  106196992 237266943 131069952 62.5G Microsoft basic data
/dev/sda6  237268992 238190591    921600  450M Windows recovery environment
/dev/sda7  238190592 250068991  11878400  5.7G Windows recovery environment


Disk /dev/sdb: 3.8 GiB, 4022337024 bytes, 7856127 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x58ea47c6

Device     Boot Start    End Sectors  Size Id Type
/dev/sdb1  *        0 999423  999424  488M  0 Empty
/dev/sdb2         164 131235  131072   64M ef EFI (FAT-12/16/32)


Disk /dev/loop0: 375.6 MiB, 393854976 bytes, 769248 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Last edited by underasail (2017-06-26 13:02:15)

Offline

#4 2017-06-25 19:13:07

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,779

Re: [SOLVED] Unable to boot into GRUB after install

To be clear, Partition 4 housed your Windows Primary Partition and you are installing Arch Linux replacing that Windows Primary Partition ?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Online

#5 2017-06-25 19:43:40

underasail
Member
Registered: 2017-06-25
Posts: 9

Re: [SOLVED] Unable to boot into GRUB after install

Nope, that's my bad. I was typing without thinking. Partition 5 is where I'm trying to install Arch. I'd like to keep Windows in a dual boot.

Offline

#6 2017-06-26 07:00:36

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: [SOLVED] Unable to boot into GRUB after install

Please load up the Arch live ISO image and use a pastebin client to upload the outputs of the following commands and post the generated URL here:

parted --list
efibootmgr -v

You will have to disable Secure Boot to start your Arch system, I presume you have tried this.

Please also confirm that the contents of the EFI system partition were left unmolested, Windows needs those files to boot.

Offline

#7 2017-06-26 12:35:11

underasail
Member
Registered: 2017-06-25
Posts: 9

Re: [SOLVED] Unable to boot into GRUB after install

Hadn't heard of the pastebin clients before. Thank you! Those will make life easier.

parted --list

Model: ATA SAMSUNG MZMPC128 (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  358MB   357MB   ntfs         Basi                  hidden, diag
 2      358MB   567MB   210MB   fat32        EFI                   boot, legacy_boot, esp
 3      567MB   701MB   134MB                Micr                  msftres
 4      701MB   54.4GB  53.7GB  ntfs                               msftdata
 5      54.4GB  121GB   67.1GB  ext4         Basic data partition  msftdata
 6      121GB   122GB   472MB   ntfs                               hidden, diag
 7      122GB   128GB   6082MB  ntfs         Basi                  hidden, diag


Model: SanDisk Cruzer (scsi)
Disk /dev/sdb: 4022MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 2      84.0kB  67.2MB  67.1MB  primary  fat16        esp
efibootmgr -v

BootCurrent: 0002
Timeout: 2 seconds
BootOrder: 0001,0002
Boot0001* Windows Boot Manager	HD(2,GPT,10b957fd-d150-46e0-ab7e-f334e2aff7f0,0xaa800,0x64000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)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(0x1d,0x0)/USB(1,0)/USB(1,0)/USB(4,0)/HD(1,MBR,0x58ea47c6,0xa4,0x20000)..BO

What should I do to confirm for the EFI partition?

Offline

#8 2017-06-26 16:58:57

Blasphemist
Member
From: Colorado
Registered: 2013-01-17
Posts: 160

Re: [SOLVED] Unable to boot into GRUB after install

When booted, UEFI uses the boot entries shown here by efibootmgr, and the boot order, to launch a UEFI file. Could be a boot loader, boot manager or UEFISTUB kernel (such as the Arch kernel). You have no boot entry for this. Your windows boot manager should launch and if that isn't found the entry configured to boot the USB drive should launch.

I notice that the flag and name of your linux partition should be changed but the first thing to do is correct your boot loader installation. What mount point are you using for the UEFI System Partition (ESP)? Make sure you match your Grub configuration to that. /boot is the recommended mount point, my recommendation at least. The efibootmgr utility is what creates the boot entry in the UEFI variables and you can always use it to investigate the state of those variables. Take a look at the efibootmgr man page for answers and examples.

You may not have anything wrong except lacking the boot entry but the fact that it is missing makes me wonder what error was made during the boot loader install and configuration. Go back over that and make sure every step was done and done right. While your at it, change the name of your linux partition and get rid of the msftdata flag on it.

You also seem to have broken the windows boot loader in some way or this would be booting into windows now. I'd first get Grub and it's osprober working, ensure it launches Arch and then see if it can launch windows. It it can't get windows up, then move on to fixing that.


Simple and Open

Offline

#9 2017-06-26 18:08:31

underasail
Member
Registered: 2017-06-25
Posts: 9

Re: [SOLVED] Unable to boot into GRUB after install

When I'm mounting partitions prior to changing root into the new system, I've been mounting /dev/sda5 (my Linux partition) to /mnt and /dev/sda2 (the ESP) to /mnt/boot. What can I do to make sure the grub configuration matches that?
I generated a Linux entry in efibootmgr (as seen below), but upon rebooting, it still goes to the same UEFI screen, and when I plug the USB back in and go into the liveCD again, the entry is gone again.

efibootmgr -v
BootCurrent: 0002
Timeout: 2 seconds
BootOrder: 0000,0001,0002
Boot0000* Linux	HD(1,GPT,1352dafd-4e34-4faf-8c7d-2041edabcf07,0x800,0xaa000)/File(\EFI\\boot\EFI\grub.efi)
Boot0001* Windows Boot Manager	HD(2,GPT,10b957fd-d150-46e0-ab7e-f334e2aff7f0,0xaa800,0x64000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)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(0x1d,0x0)/USB(1,0)/USB(1,0)/USB(4,0)/HD(1,MBR,0x58ea47c6,0xa4,0x20000)..BO

Last edited by underasail (2017-06-26 21:04:26)

Offline

#10 2017-06-26 21:02:03

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: [SOLVED] Unable to boot into GRUB after install

underasail wrote:

What should I do to confirm for the EFI partition?

From the live environment:

mount /dev/sda2 /mnt
find /mnt

If /mnt/EFI/Microsoft/Boot/bootmgfw.efi is not in the output then you have broken your Windows bootloader and should repair it using the methods available for that operating system.

underasail wrote:

I generated a Linux entry in efibootmgr

How *exactly* did you do this?

Please post the exact command(s) used.

It looks like the path to the .efi loader is wrong.

EDIT: cross-posted with your edit.

underasail wrote:

upon rebooting, it still goes to the same UEFI screen, and when I plug the USB back in and go into the liveCD again, the entry is gone again.

Sounds like your UEFI firmware may be defective, this is quite common  hmm

http://www.rodsbooks.com/efi-bootloader … ive-naming

Try copying your chosen .efi loader to the removable loader location at $ESP/EFI/BOOT/BOOTX64.EFI (as used by live USB sticks and the like) and see if that boots.

If not then your motherboard must be only booting Microsoft's bootmgfw.efi

In that case, run this command from Windows (after repairing the bootloader) to get bootmgfw.efi to chainload BOOTX64.EFI:

bcdedit /set "{bootmgr}" path "\EFI\BOOT\BOOTX64.EFI"

Unfortunately, any major updates for Windows will reverse this change, to make the change permanent this guide must be followed:

https://forums.bunsenlabs.org/viewtopic.php?id=3624

Last edited by Head_on_a_Stick (2017-06-26 21:02:51)

Offline

#11 2017-06-26 21:04:38

underasail
Member
Registered: 2017-06-25
Posts: 9

Re: [SOLVED] Unable to boot into GRUB after install

The way I'd previously generated a new entry was just by running efibootmgr -c as that seemed to be enough to get a Linux labeled boot entry. Using the much more adequate command (below again) found in this post by Blasphemist aswell, I was able to get an entry that worked and stuck around after the reboot. I'm now able to boot into Arch! Now I'm working on getting Windows back. I have a functioning version of grub now, but still no option to boot into Windows.

efibootmgr -d /dev/sda -p 2 -c -L "Arch Linux" -l \vmlinuz-linux -u "root=/dev/sda5 rw initrd=/initramfs-linux.img"

efibootmgr still has an option for the Windows Boot Manager, but I can't get it to come up in grub.

BootCurrent: 0002
Timeout: 2 seconds
BootOrder: 0002,0000,0001
Boot0000* USB Drive	PciRoot(0x0)/Pci(0x1d,0x0)/USB(1,0)/USB(2,0)/USB(4,0)/HD(1,MBR,0x3e367b,0x3f,0x3983bc)..BO
Boot0001* Windows Boot Manager	HD(2,GPT,10b957fd-d150-46e0-ab7e-f334e2aff7f0,0xaa800,0x64000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)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* grub	HD(2,GPT,10b957fd-d150-46e0-ab7e-f334e2aff7f0,0xaa800,0x64000)/File(\EFI\grub\grubx64.efi)

Last edited by underasail (2017-06-26 21:53:55)

Offline

#12 2017-06-26 22:24:25

Maniaxx
Member
Registered: 2014-05-14
Posts: 738

Re: [SOLVED] Unable to boot into GRUB after install

Install 'os-prober' and create new grub config.
https://wiki.archlinux.org/index.php/GR … ation_file

If booting Windows destroys your grub (force changes boot order to Windows bootmanager) you have to set (or keep) Windows bootmanager on 1st boot order but set it inactive. Set grub to 2nd boot order. Windows tends to enforce its boot manager to 1st boot order on some EFI systems.

Last edited by Maniaxx (2017-06-26 22:30:49)


sys2064

Offline

#13 2017-06-26 22:25:43

underasail
Member
Registered: 2017-06-25
Posts: 9

Re: [SOLVED] Unable to boot into GRUB after install

I have os-prober installed, but it hasn't helped grub pick-up Windows Boot Manager.

Offline

#14 2017-06-26 22:32:13

Maniaxx
Member
Registered: 2014-05-14
Posts: 738

Re: [SOLVED] Unable to boot into GRUB after install

Did you create a new grub config? It should tell you that it found Windows. Make sure that /boot is mounted properly when executing the command.

grub-mkconfig -o /boot/grub/grub.cfg

Last edited by Maniaxx (2017-06-26 22:39:13)


sys2064

Offline

#15 2017-06-26 22:46:47

underasail
Member
Registered: 2017-06-25
Posts: 9

Re: [SOLVED] Unable to boot into GRUB after install

Yes, I've made a new grub config after each attempted correction. My EFI partition is currently mounted to /boot/efi, but I don't have a Windows entry there which I'm beginning to think is the problem.

I'm now trying to use the script found here to fix it. However, I run into an error trying to find the $fs_uuid value.

grub-probe: error: failed to get canonical path of `/boot/efi/EFI/Microsoft/Boot/bootmgfw.efi'.

Last edited by underasail (2017-06-26 22:48:28)

Offline

#16 2017-06-26 23:06:20

Maniaxx
Member
Registered: 2014-05-14
Posts: 738

Re: [SOLVED] Unable to boot into GRUB after install

I've never seen that it gets lost but if so you have to re-install it by using Windows Setup boot repair.


sys2064

Offline

#17 2017-06-27 01:47:20

underasail
Member
Registered: 2017-06-25
Posts: 9

Re: [SOLVED] Unable to boot into GRUB after install

Thank you all for the help and direction. I've managed to get everything working to fix this. I used a Windows Recovery Drive to fix the missing boot info from the command line using diskpart and bootrec. Then I was able to get back to Arch and update the grub config, and it pulled the fix Windows boot info.

Offline

#18 2017-06-27 06:59:24

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: [SOLVED] Unable to boot into GRUB after install

I think you may have formatted your EFI system partition during the installation process and wiped the Windows bootloader, as I suggested in my post — a quick check of the contents would have confirmed this.

Anyway, glad you got it working, please mark this thread [SOLVED] to help others with this problem.

Offline

#19 2017-06-28 18:33:47

Blasphemist
Member
From: Colorado
Registered: 2013-01-17
Posts: 160

Re: [SOLVED] Unable to boot into GRUB after install

I agree about the likelyhood that the ESP was formatted at some point but whatever, glad it's working now. To add something hopefully helpful to others, the UEFI boot process goes like this. Boot option and boot order entries in the UEFI NVRAM tell UEFI what to launch. The boot order provides the order to try the entries, the entries provide the detail of what to launch. All boot options exist on the ESP, UEFI executable files in their own directory. The thing that is a bit different is when you use the linux kernel EFISTUB option and /boot as the mount point for your ESP. The kernel installs to /boot so the Arch kernel for example resides at the root of the ESP, when /boot is the mount point of the ESP. There is no boot loader in that case so there is no boot loader directory. The Grub boot loader does install to a directory on the ESP, as does the windows boot manager. You can browse the ESP to see this.

Installing the Grub package installs the package contents. The grub-install command puts the necessary files for Grub on the ESP. The grub-mkconfig finishes grub configuration by writing the boot options to the grub configuration file, including those for other OS's that os-prober may find on the ESP. The efibootmgr utility is what writes the boot entries to the UEFI variables in NVRAM. I use efibootmgr to write an entry to boot my EFISTUB enabled Arch kernel directly. Grub uses that same efibootmgr utility to write an entry to UEFI for grub.


Simple and Open

Offline

Board footer

Powered by FluxBB