You are not logged in.

#1 2020-06-10 03:20:41

andheisus
Member
Registered: 2016-04-16
Posts: 6

[Solved] Grub Not Loading After Installation First Reboot

I have been trying to install Arch on a new laptop, dual booting with Windows. I have gone through the Wiki procedure twice, everything seems fine with no errors shown, but each time, upon reboot there is no grub menu – it boots straight into Windows.
(Windows no longer sees its D drive (my sda1) which I overwrote with ext4, so partitioning and formatting did something at least...)
I have used the live USB to chroot back into the installation. I see files I modified that look correct: fstab, locale.conf, hostname, hosts – these show that something did happen. But  when I look inside the /boot directory, there is nothing.
File systems seem ok on the partitions, and drive assignments as well. Windows is on the nvme in partitions 1-4, Arch root in p5, /home in p6. But only root shows as mounted in lsblk.

I followed the Wiki installation guide, although I did not run mkinitcpio -P since the guide says it is done with pacstrap.

When I installed base, I also installed intel-ucode, linux, linux-firmware, nano, and that’s it.
As I was installing grub, I also installed some Windows tools like os-prober, dialog, mtools, dosfstools, ntfs-3g, but along with some networking and audio stuff, that was about all.

I did see the microcode.img file as an entry when grub was installed; it also saw Windows’ efi.

For the grub install, I did :

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

then did

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

and then shut down (shutdown -h now). As I was shutting down I did see that it said briefly that it failed to unmount the /run/archiso/boot (I think, it was quick).

But when I remove the usb and boot it goes back into Windows. At least it can boot windows, unlike this thread https://bbs.archlinux.org/viewtopic.php?id=227645. But where is grub and the rest of the installation?

Here is some output from parted

parted --list

Model: ATA ST1000LM048-2E71 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  1000GB  1000GB  ext4


Model: Mass Storage Device (scsi)
Disk /dev/sdb: 1016MB
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


Model: WDC PC SN730 SDBPNTY-512G-1032 (nvme)
Disk /dev/nvme0n1: 512GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size    File system  Name                          Flags
 1      1049kB  316MB  315MB   fat32        EFI system partition          boot, esp
 2      316MB   450MB  134MB                Microsoft reserved partition  msftres
 3      450MB   109GB  108GB   ntfs         Basic data partition          msftdata
 5      109GB   162GB  53.7GB  ext4
 6      162GB   511GB  349GB   ext4
 4      511GB   512GB  944MB   ntfs         Basic data partition          hidden, diag 

and after chrooting into /mnt, here is my
fdisk -l

fdisk -l

Disk /dev/nvme0n1: 476.96 GiB, 512110190592 bytes, 1000215216 sectors
Disk model: WDC PC SN730 SDBPNTY-512G-1032          
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: 63B2CC92-ED0E-4FBE-AEE5-71211F40DBEF

Device             Start        End   Sectors   Size Type
/dev/nvme0n1p1      2048     616447    614400   300M EFI System
/dev/nvme0n1p2    616448     878591    262144   128M Microsoft reserved
/dev/nvme0n1p3    878592  211939327 211060736 100.7G Microsoft basic data
/dev/nvme0n1p4 998371328 1000214527   1843200   900M Windows recovery environment
/dev/nvme0n1p5 211939328  316796927 104857600    50G Linux filesystem
/dev/nvme0n1p6 316796928  998371327 681574400   325G Linux filesystem

Partition table entries are not in disk order.


Disk /dev/sda: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000LM048-2E71
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 381864BA-E9C2-D540-AFF3-A28164FA3D54

Device     Start        End    Sectors   Size Type
/dev/sda1   2048 1953525134 1953523087 931.5G Linux filesystem


Disk /dev/sdb: 968.77 MiB, 1015808000 bytes, 1984000 sectors
Disk model: Storage Device  
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: 0x05d84088

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


Disk /dev/loop0: 534.95 MiB, 560914432 bytes, 1095536 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 

lsblk - (I recall other mountpoints being noted in lsblk during the installation)

 lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0         7:0    0   535M  1 loop 
sda           8:0    0 931.5G  0 disk 
└─sda1        8:1    0 931.5G  0 part 
sdb           8:16   1 968.8M  0 disk 
├─sdb1        8:17   1   652M  0 part 
└─sdb2        8:18   1    64M  0 part 
nvme0n1     259:0    0   477G  0 disk 
├─nvme0n1p1 259:1    0   300M  0 part 
├─nvme0n1p2 259:2    0   128M  0 part 
├─nvme0n1p3 259:3    0 100.7G  0 part 
├─nvme0n1p4 259:4    0   900M  0 part 
├─nvme0n1p5 259:5    0    50G  0 part /
└─nvme0n1p6 259:6    0   325G  0 part 

efibootmgr -v

efibootmgr -v
after chroot 
BootCurrent: 0002
Timeout: 2 seconds
BootOrder: 0002,0003,0000,0001
Boot0000* Windows Boot Manager  HD(1,GPT,77531c74-4e15-4129-8402-971e7fb8f05a,0x800,0x96000)/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.}....................
Boot0001* GRUB  HD(1,GPT,77531c74-4e15-4129-8402-971e7fb8f05a,0x800,0x96000)/File(\EFI\GRUB\GRUBX64.EFI)
Boot0002* UEFI: Mass Storage Device     PciRoot(0x0)/Pci(0x14,0x0)/USB(2,0)/CDROM(1,0xa4,0x145f5c)..BO
Boot0003* UEFI: Mass Storage Device, Partition 2        PciRoot(0x0)/Pci(0x14,0x0)/USB(2,0)/HD(2,MBR,0x5d84088,0xa4,0x20000)..BO 

I don't really know how to interpret all the above data, and if I can provide anything else please let me know.
I have looked in the forum and googled, (I’m also having issues with bad PCIe Bus error spamming during the iso install, but I can tackle that after I get Arch running) and have seen some similar grub threads, but still cannot figure out why grub is not loading on reboot.

Any help would be greatly appreciated, thanks very much in advance.

Last edited by andheisus (2020-06-12 05:03:12)

Offline

#2 2020-06-10 07:27:53

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 10,495

Re: [Solved] Grub Not Loading After Installation First Reboot

A GRUB entry was successfully written as can be seen on that efibootmgr invocation, you should be able to switch to booting it from within your firmware's boot menu. Currently the logical order is indeed to just boot windows first, but if your UEFI is well behaved we can change the boot order with

efibootmgr -o 0001,0000,0002,0003

which should enforce GRUB to be loaded when you hit reboot. If that doesn't happen go through the menu's of your firmware they often have their own ordering mechanisms where you might have to adjust this. What mainboard/laptop model is this exactly?

Last edited by V1del (2020-06-10 07:29:10)

Online

#3 2020-06-12 05:01:21

andheisus
Member
Registered: 2016-04-16
Posts: 6

Re: [Solved] Grub Not Loading After Installation First Reboot

Hello V1del -

Thanks very much for your reply. I first tried to reset the boot order with

efibootmgr -o 0001,0000,0002,0003

as you suggested, which did show the order as properly changed. But upon reboot, it still went right into Windows. And running

efibootmgr -v

again showed that the boot order had reverted back.

So I went into the BIOS (this is an MSI GE75 Raider 10SE laptop running BIOS v.E17E9IMS.106, by the way) and found the way to change the boot order manually in order to set GRUB to boot first, rebooted, and the Arch GRUB menu came right up. Windows also shows as an option in the GRUB menu and logging in to it works as well.

Thank you very much for all your help, you were exactly right as to the issue and the fix. I'll mark this as solved.

Offline

Board footer

Powered by FluxBB