You are not logged in.
I have used many distros before installing arch on Gnome Boxes (QEMU/KVM) on AntiX linux, then I decided removing AntiX and installing Arch on my main machine which currently has Windows10 which I never use and Kali linux (used for about 2 years).
I removed the partition Having AntiX and Linux swap (of AntiX), then created two new partition for 1st for Arch and 2nd for Swap. The grub installation reported no errors (and I modified the /etc/default/grub and uncommented os-prober line.) but after rebooting, the system only showed windows boot manager. tried to boot from efi file (not worked).
I should have not installed grub and instead should have run update-grub in kali like I do when I installed new distros. but I wanted grub of Arch as my bootloader.
currently I have live booted parrot OS in ventoy USB.
these are the files in /dev/sda1 (efi partition) - EFI grub 'System Volume Information' and inside 'EFI' folder is antiX arch Boot EFI GRUB HP kali Microsoft. I have tried making efibootmgr order but the grub is not loading. reinstalled grub not worked. I reinstalled grub of kali by booting in live environment of kali that didn't worked too. now I don't have any grub bootloader.
also
mount /dev/sda6 /mnt
mkdir mnt/dev
mkdir mnt/proc
mkdir -p /mnt/sys/firmware/efi/efivars
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
mount --bind /sys/firmware/efi/efivars /mnt/sys/firmware/efi/efivars
mkdir -p /mnt/boot/efi
mount /dev/sda1 /mnt/boot/efi
mount -o remount,rw /dev/sda1 /mnt/boot/efi
mkdir /mnt/hostrun
mount --bind /run /mnt/hostrun
arch-chroot /mnt
mkdir /run/lvm
mount --bind /hostrun/lvm /run/lvm
grub-mkconfig -o /boot/grub/grub.cfg
grub-install /dev/sda
exit
unmounted and rebooted
/dev/sda6 is arch filesystem and /dev/sda1 is for efi boot. Also I might have installed grub two times (with different bootloader ids).
Can someone explain what might have gone wrong and how to fix this.
Last edited by le0n (2024-01-31 16:18:10)
Offline
Everything you've said makes this sound like a UEFI system. Why are you installing grub for BIOS?
Online
Sorry can you explain a bit more? what have I done wrong?
Offline
Sorry can you explain a bit more? what have I done wrong?
grub-install /dev/sda
exit
unmounted and rebooted
Everything you've said makes this sound like a UEFI system. Why are you installing grub for BIOS?
<49,17,III,I> Fama di loro il mondo esser non lassa;
<50,17,III,I> misericordia e giustizia li sdegna:
<51,17,III,I> non ragioniam di lor, ma guarda e passa.
Offline
Online
I booted again in archiso ran these commands
# cat /sys/firmware/efi/fw_platform_size
# mount /dev/sda6 /mnt
# mount /dev/sda1 /mnt/boot
# genfstab -U /mnt >> /mnt/etc/fstab
# arch-chroot /mnt
then deleted old grub files of all linux systems
# mount --bind /mnt/boot /mnt/esp
# grub-install --target=x86_64-efi --efi-directory=esp --bootloader-id=GRUB
# grub-mkconfig -o /boot/grub/grub.cfg
# umount /mnt/esp
# exit
# umount /mnt/boot
# umount /mnt
# reboot
but it still failed , should I reinstall arch again?
Last edited by le0n (2024-01-30 15:44:05)
Offline
No, you read the part about what 'esp' means.
And what is with that bind mount from /boot to /esp?
Last edited by Scimmia (2024-01-30 15:38:03)
Online
Please make use of [ code ][ /code ] tags, thank you.
Mount your $ROOT 1st, then any other mountpoint below that $ROOT.
<49,17,III,I> Fama di loro il mondo esser non lassa;
<50,17,III,I> misericordia e giustizia li sdegna:
<51,17,III,I> non ragioniam di lor, ma guarda e passa.
Offline
https://wiki.archlinux.org/title/GRUB
Mount the EFI system partition and in the remainder of this section, substitute esp with its mount point.
thats why I bind mount from boot to esp
Offline
That means it's using esp as a placeholder, you substitute the actual path. No idea why you would ever think that meant anything with bind mounts.
Online
Sorry everyone. I am learning things.
Offline
I retried the above except the esp part but again this time like before this command
# grub-mkconfig -o /boot/grub/grub.cfg
didn't generated the boot entry for arch and only for UEFI firmware settings
and after rebooting the system boots again to Windows bootloader.
Offline
I just cp the grub efi file to the /EFI/Windows/Boot/bootmgfw.efi
Now its working fine I can boot into both linux.
Offline