You are not logged in.

#1 2024-01-30 12:27:58

le0n
Member
Registered: 2024-01-30
Posts: 7

[SOLVED]grub not showing triple boot WIndow10, Kali, Arch!

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

#2 2024-01-30 13:53:56

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,357

Re: [SOLVED]grub not showing triple boot WIndow10, Kali, Arch!

Everything you've said makes this sound like a UEFI system. Why are you installing grub for BIOS?

Online

#3 2024-01-30 14:03:49

le0n
Member
Registered: 2024-01-30
Posts: 7

Re: [SOLVED]grub not showing triple boot WIndow10, Kali, Arch!

Sorry can you explain a bit more? what have I done wrong?

Offline

#4 2024-01-30 14:05:00

d.ALT
Member
Registered: 2019-05-10
Posts: 913

Re: [SOLVED]grub not showing triple boot WIndow10, Kali, Arch!

le0n wrote:

Sorry can you explain a bit more? what have I done wrong?

le0n wrote:

grub-install /dev/sda
exit
unmounted and rebooted

Scimmia wrote:

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

#5 2024-01-30 14:05:31

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,357

Re: [SOLVED]grub not showing triple boot WIndow10, Kali, Arch!

Online

#6 2024-01-30 15:35:58

le0n
Member
Registered: 2024-01-30
Posts: 7

Re: [SOLVED]grub not showing triple boot WIndow10, Kali, Arch!

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

#7 2024-01-30 15:37:22

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,357

Re: [SOLVED]grub not showing triple boot WIndow10, Kali, Arch!

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

#8 2024-01-30 15:40:03

d.ALT
Member
Registered: 2019-05-10
Posts: 913

Re: [SOLVED]grub not showing triple boot WIndow10, Kali, Arch!

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

#9 2024-01-30 15:41:32

le0n
Member
Registered: 2024-01-30
Posts: 7

Re: [SOLVED]grub not showing triple boot WIndow10, Kali, Arch!

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

#10 2024-01-30 15:44:01

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,357

Re: [SOLVED]grub not showing triple boot WIndow10, Kali, Arch!

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

#11 2024-01-30 15:46:05

le0n
Member
Registered: 2024-01-30
Posts: 7

Re: [SOLVED]grub not showing triple boot WIndow10, Kali, Arch!

Sorry everyone. I am learning things.

Offline

#12 2024-01-30 16:04:51

le0n
Member
Registered: 2024-01-30
Posts: 7

Re: [SOLVED]grub not showing triple boot WIndow10, Kali, Arch!

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

#13 2024-01-31 10:02:06

le0n
Member
Registered: 2024-01-30
Posts: 7

Re: [SOLVED]grub not showing triple boot WIndow10, Kali, Arch!

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

Board footer

Powered by FluxBB