You are not logged in.

#1 2023-03-11 20:15:53

kipcd
Member
From: Barcelona
Registered: 2020-07-20
Posts: 3

[Solved] Laptop boots into BIOS after grub-install

Hi, I had a working dual-boot Arch/Windows config, however my /boot partition was too small (300Mb), so at one moment my Arch couldn't update anymore after some new kernel version come out. I decided to create a bigger partition for /boot and load from there. However, after doing grub-install and grub-mkconfig from chroot my laptop loads directly into BIOS, there are no advanced booting options to select grub loader anymore, I can't even load into live USB...

On pure luck, I've found a MSI recovery tool, which is loaded on pressing F3 during startup, and from there I can actually load into my new GRUB and into Arch and Windows.

Where I f*cked up? Could you help to fix, plz
Here is what I did:

in Kubuntu live usb, KDE partition manager:
Created 1GB unallocated space  (cut from windows partition)
created fat32 partition
copied contents from old boot partition to new one

logged in to arch, modified /etc/fstab - put UUID of new partition for /boot
Mistake: updated packages and linux kernel, can't login. Should updated grub first...

[Still loaded from old /boot partition. 
There was a mismatch between uname -a and pacman -Qi linux.  Fixed by copying new kernel to old boot]

Intent to switch to new boot partition:

in Arch live usb:

Open encrypted root partition:
modprobe dm-crypt
cryptsetup luksOpen /dev/nvme0n1p6 myroot
vgscan
vgchange -ay volgroup0
lvs
mkdir /mymnt
mount /dev/volgroup0/root /mymnt
mount /dev/nvmen0n1p7 /mymnt/boot

mount --bind /dev /mymnt/dev
mount --bind /dev/pts /mymnt/dev/pts
mount --bind /proc /mymnt/proc
mount --bind /sys /mymnt/sys
mount --bind /sys/firmware/efi/efivars /mymnt/sys/firmware/efi/efivars

modprobe efivarfs

chroot /mymnt

grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub2023 --recheck --debug
grub-mkconfig -o /boot/grub/grub.cfg

exit chroot:
exit

mount --make-rslave  /mymnt/sys
mount --make-rslave /mymnt/dev

umount -R /mymnt/dev
umount -R /mymnt/sys
umount -R /mymnt/proc
umount -R /mymnt/boot
umount -a
umount -R /mymnt

poweroff

Go to BIOS (Del)

CAN'T load into GRUB. LAptop restarts into BIOS, no Advanced booting options in BIOS anymore...

On reboot press F3 to load into Windows recovery. Can select my new grub there and load into Arch

added PARTLABEL = "EFI system partition" to nvme0n1p7, removed from p1 with 
cgdisk /dev/nvme0n1
naMe option
didn't help

form Arch:
sudo mkinitcpio -p linux
didn't help

 Install GRUB to default/fallback boot path
https://wiki.archlinux.org/title/GRUB#Default/fallback_boot_path
```
# grub-install --target=x86_64-efi --efi-directory=esp --removable
```
didn't help

moving manually to bootx64.efi didn't help

I have a suspicion that I overwrite grub on my Arch live USB instead of the hard drive, because it stopped booting even on my other PC

Last edited by kipcd (2023-03-12 20:03:58)

Offline

#2 2023-03-12 20:03:39

kipcd
Member
From: Barcelona
Registered: 2020-07-20
Posts: 3

Re: [Solved] Laptop boots into BIOS after grub-install

Fixed it, I had a mess in fstab having 2 entries for EFI partition mapped to /boot and another one to /boot/efi
Also inside /boot partition had /EFI/EFI/EFI subdirs

Looking into efibootmgr also helped a lot

Offline

Board footer

Powered by FluxBB