0

If i try booting with live usb unplugged, it will show ERROR: No boot disk has been detected or the disk has failed. if i do it with usb plugged and boot with UEFI mode, it will show a grub menu (but it's not the grub menu i usually see).

I'm able to get into linux Mint that has already been installed on my hard disk with the grub menu (that i mentioned above) command line with these commands:

grub> set root=(hd1,gpt2)
grub> linux /boot/vmlinuz-5.4.0-117-generic root=/dev/sda2
grub> initrd /boot/initrd.img-5.4.0-117-generic
grub> boot

then i will boot into Mint just like if i boot it from its grub entry.

How do i get Mint's grub menu back and boot as usual before this problem happened?

More:

My pc is HP Pavilion 20-a210l, supports UEFI.

I was trying to dual-boot Fedora 36, i used UNetBootin to create the media, tried using dd command but when booting into the media it only shows blinking big underscore on top left of the screen.

I then chose automatic partition so it will use all the hard disk free space. Installation finished, and i reboot, and then the unfamiliar grub menu shows up instead of Mint's grub menu.

I strongly believe that grub menu i mentioned is from the usb.

I am also unable to boot into installed Fedora.

And as i said, if i boot the usb with UEFI mode i will get an unfamiliar grub menu. If i boot into the usb with Legacy mode it will show the UNetBootin menu that allows me to boot into the live Fedora, just like when i boot the usb with UEFI mode before this problem happened.

I was able to boot into the usb with Boot Menu(F9) or "UEFI Firmware Settings" grub entry before this problem happened. Now the usb doesn't show up as a UEFI option in Boot Menu.

"ubuntu" is on top of the boot order:

ran efibootmgr :

BootCurrent: 0008
Timeout: 0 seconds
BootOrder: 0000,0002,0008,0001,0003,0007,0006,0004,0005
Boot0000* ubuntu
Boot0001* USB Floppy/CD
Boot0002* USB Hard Drive
Boot0003* ATAPI CD-ROM Drive
Boot0004* CD/DVD Drive 
Boot0005* USB Floppy/CD
Boot0006* Hard Drive
Boot0007* Realtek PXE B03 D00
Boot0008* UEFI: SanDisk

and as you can see, i booted from SanDisk usb thumb drive.

ran sudo parted -l :

Model: ATA WDC WD5000AAKX-6 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: pmbr_boot

Number  Start   End    Size    File system  Name                  Flags
 1      1049kB  538MB  537MB   fat32        EFI System Partition  boot, esp
 2      538MB   315GB  315GB   ext4
 3      315GB   315GB  1049kB                                     bios_grub
 4      315GB   316GB  1074MB  ext4
 5      316GB   500GB  184GB   btrfs


Model: SanDisk Cruzer Blade (scsi)
Disk /dev/sdb: 15,7GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  15,7GB  15,7GB  primary  fat32        boot



What i tried:

  • Updating grub, no good.
  • Turning on Network Boot, shows the same message but with PXE error messages on top of it.

1 Answer 1

0

Looks like you booted the Fedora installer in legacy mode, and so it set up Fedora to boot in legacy BIOS style with a GPT-partitioned disk. This combination is something Windows doesn't support at all, so it can be poorly tested by firmware developers.

In the BIOS settings of your system, is there a way to choose whether the system attempts boot in UEFI style, legacy style, or both? If not, then the preference may be hard-coded in the firmware, and apparently your firmware currently prioritizes legacy-style boot over UEFI. If you can, change the boot style setting to "UEFI style only" and see if it helps.

(It seems to me that systems that allow booting on either style by default are a recipe for disaster unless you are aware of the trap and careful whenever installing operating systems. I would generally recommend picking one boot style and setting the BIOS settings to allow that style only, whenever possible.)

If you cannot force UEFI-style boot only, or if it does not help, you'll need to remove the legacy-style boot settings from your system disk. The easiest is to remove the pmbr_boot disk flag:

# parted /dev/sda
(parted) disk_set pmbr_boot off
(parted) quit

You might also want to delete partition #3, as it only contains the core image of the legacy-mode GRUB of Fedora.

In the worst case, you might need to also destroy the legacy-style MBR boot code from the beginning of /dev/sda to make the firmware stop trying to boot legacy-style from the sda disk. You'll only want to overwrite the first 439 bytes of the MBR block, so if you find you need to do this, be very, very careful:

dd if=/dev/zero bs=439 count=1 of=/dev/sda

If you have the os-prober package installed in Mint, it might be able to detect the kernel and initramfs of the Fedora installation when you run sudo update-grub in Mint, and add them automatically as extra menu items to Mint's GRUB menu. That would be one possible way to get Fedora booted in UEFI mode for real. Then you could make sure /dev/sda1 gets mounted as /boot/efi in Fedora too, and then reinstall Fedora's UEFI GRUB to /boot/efi/EFI/fedora (grub-install --target=x86_64-efi --efi-directory=/boot/efi /dev/sda should do it automatically when executed from a Fedora installation). Then you could use efibootmgr to decide which GRUB would be your primary boot menu: Mint's GRUB, or Fedora's GRUB.

1
  • Yes it might have booted in legacy mode, Fedora docs even said this (docs.fedoraproject.org/en-US/quick-docs/…). I am able to disable Legacy mode, it didn't work either. And i've removed the flag you mentioned, and i'll reboot then set the boot mode to UEFI only. I'll catch up later. Jun 12, 2022 at 14:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .