What is exactly command to create grub bootloader?

Hai all,
I’ve installed fedora 36 pre-release a week ago. But this is surprise to me because all my other os linux in my laptop detected and add entry to grub by fedora 36 prerelease installation.
Actually before I Installed fedora 36 prerelease, I had 3 OS installed, windows 7, Kali linux, and ParrotOS. if I update or upgrade system in example kai linux, kali linux also generated grub so, grub generated by parrotos replaced. so if i want to boot into parrotos i use disk boot repair and it works but only detect and add to grub menu bootloader parrotos and windows 7, and also when i want to boot into kali linux i use disk boot repair and only kali linux and windows 7 detected and add to grub menu bootloader.
But after I installed fedora 36 prerelease I surprised because fedora can detect all my OS in my laptop and add all entry to grub menu bootlaoder. See SS below.
The question is, what exactly command to generate grub so the result is like in my SS?, I know i can use chroot with fedora live usb if for example I boot into parrotos and update/upgrade then parrotos replace grub menu bootloader with it version?

Fedora 36 pre-release grub menu bootloader:

This is my hdd partition:

sudo parted /dev/sda print
Model: ATA WDC WD5000LPVX-2 (scsi)
Disk /dev/sda: 500GB
Ukuran sektor (logical/physical): 512B/4096B
Tabel Partisi: msdos
Disk Flags: 

Nomor  Awal    Akhir  Ukuran  Tipe      File system     Tanda
 1     1049kB  105GB  105GB   primary   ntfs
 2     105GB   177GB  72,2GB  primary   ntfs
 4     177GB   500GB  323GB   extended
13     177GB   231GB  53,7GB  logical   ext4
14     231GB   232GB  1074MB  logical   ext4            boot
15     232GB   284GB  52,6GB  logical   btrfs
11     284GB   286GB  1074MB  logical   ext4
12     286GB   392GB  106GB   logical   btrfs
 5     392GB   393GB  999MB   logical   ext4
 6     393GB   407GB  14,0GB  logical   ext4
 7     407GB   447GB  40,0GB  logical   ext4
 8     447GB   467GB  20,0GB  logical   ext4
 9     467GB   471GB  3999MB  logical   linux-swap(v1)  swap
10     471GB   500GB  29,3GB  logical   ext4

Thank You in Advance
Best regards,

Have a look

1 Like

Thank you for those link, I will try it soon.

I am actually surprised you are able to quad-boot that system considering it is using msdos partitioning and legacy MBR boot.

1 Like

Yes, I am surprised, because sometimes after use disk boot repair, in example i choose to boot kali linux, disk boot repair don’t to repair grub perfectly, windows 7 partition it’s not detected. Then usually i do grub-install target=i386-pc /dev/sda then I do update-grub. Windows is detected and add to menu grub bootloader. but ParrotOS is not detected. I surprised in this, fedora 36 pre-release installer can detect all my os in my laptop perfectly. I curious if i boot to parrotOS (parrotOS release new version) then i do sudo parrot-upgrade. automatically upgrade generated grub with it version, because kernel is updated. I predict and sure(base on my experience) parrotOs cannot detect my fedora, kali linux, so because of this I want to know what is exactly command in fedora 36 pre-release so i can replace those grub menu with grub bootloader fedora, and I can access all my os again perfectly?. I plan to recovery grub fedora with usb live fedora then do chroot.

I use this to reconfig grub and reinstall whatever you wntt to do


I think it likely that if you allow any grub but fedora to update the boot loader you will be back to what you had before.

Alternatively you can update the other os, then boot back to fedora and update grub there with the manual sudo grub2-mkconfig -o /etc/grub2.cfg it will restore the fedora boot loader and you should then be able to boot to any of the 4 OSes from there. That may require you to boot from a live usb device then chroot to the fedora install so it can do the job properly but should work.

1 Like

May be it little out of topic. If I remember correctly, Debian base linux have something like under directories kind of thing on their boot list:

Debian somthing 1
Debian recovery
    |- Debian something 2
    |- Debian something 3

In recent grub (couple weeks ago) the new grub have ability to read the under directory tree by default and make the list something like bellow:

Debian something 1
Debian something 2
Debian something 3

This new grub update also have some better ability to detect other OS and for this reason I disabled it since I prefer using efibootmgr by changing the boot order (UEFI).

May be from above it also advancing the grub detection with legacy BIOS. I think in the past when legacy BIOS still common, we could also create dual booting (Ubuntu & Windows).

1 Like

The OP is using MBR boot so efibootmgr is not likely to have any affect for him. As I recall, when using legacy boot the MBR was only able to boot one OS and grub had to manage everything else. Thus if grub did not provide the menu to select other OSes to boot you were stuck.

Glad to see the improvement with debian.

1 Like

Thanks you very much for fedora developer, I’ve update/upgrade kali linux and parrot os to the lastest kernel, I also update fedora 36 beta to the lastest kernel, and amazing I don’t need worry about Grub menu loader, because kali linux dan parrot os can update entry in grub menu bootloader fedora but won’t replace it. This problem solved. Kali linux and parrot os update/upgrade successfully but won’t replace fedora 36 beta grub menu bootloader. No matter what I update first,