Os-prober doesn't find windows

After some recent updates, I found out there is no windows entry in grub menu.

Here is output of my last update:

(19/39) Updating Grub-Bootmenu
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-6.6-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-6.6-x86_64.img
Found initrd fallback image: /boot/initramfs-6.6-x86_64-fallback.img
Found linux image: /boot/vmlinuz-6.1-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-6.1-x86_64.img
Found initrd fallback image: /boot/initramfs-6.1-x86_64-fallback.img
Found linux image: /boot/vmlinuz-5.4-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.4-x86_64.img
Found initrd fallback image: /boot/initramfs-5.4-x86_64-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Adding boot menu entry for UEFI Firmware Settings ...
Found memtest86+ image: /boot/memtest86+/memtest.bin
done

Previously, it was detecting windows 8 without any problem.

I have a SSD (/dev/sda) and a HDD (/dev/sdb) hard disks but both of my operations systems are installed on /dev/sda.

I also noticed that some recent stable updates included a security patch for GRUB, but I’m not sure if this issue is related. I furthermore refrained from following those instructions to avoid making the situation worse.

Grub gained security fixes. Updating it may be risky

More Info
$ sudo fdisk -l
Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: Samsung SSD 870 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xd9fa2484

Device     Boot      Start        End    Sectors   Size Id Type
/dev/sda1  *          2048     718847     716800   350M  7 HPFS/NTFS/exFAT
/dev/sda2           718848  204802047  204083200  97.3G  7 HPFS/NTFS/exFAT
/dev/sda3        204812746 1953520064 1748707319 833.8G  f W95 Ext'd (LBA)
/dev/sda5        204812748  819200496  614387749   293G  7 HPFS/NTFS/exFAT
/dev/sda6        819206144 1253367807  434161664   207G  7 HPFS/NTFS/exFAT
/dev/sda7       1843193856 1953519615  110325760  52.6G  7 HPFS/NTFS/exFAT
/dev/sda8       1253369856 1286139903   32770048  15.6G 82 Linux swap / Solaris
/dev/sda9       1286141952 1288189951    2048000  1000M 83 Linux
/dev/sda10      1288192000 1513471999  225280000 107.4G 83 Linux
/dev/sda11      1513474048 1843191807  329717760 157.2G 83 Linux

Partition table entries are not in disk order.


Disk /dev/sdb: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: WDC WD10JPCX-24U
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x47b507c7

Device     Boot Start        End    Sectors   Size Id Type
/dev/sdb1        2048 1953521663 1953519616 931.5G  7 HPFS/NTFS/exFAT


Disk /dev/loop0: 104.19 MiB, 109252608 bytes, 213384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop1: 105.82 MiB, 110960640 bytes, 216720 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop2: 63.46 MiB, 66547712 bytes, 129976 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop4: 8.29 MiB, 8691712 bytes, 16976 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop3: 63.7 MiB, 66789376 bytes, 130448 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop5: 8.99 MiB, 9424896 bytes, 18408 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

sda2 is my C drive.

What’s a sea drive? :smiling_imp:

Anyway, try the following…

sudo grub-install --recheck --removable
sudo update-grub

I liked that :joy: :ok_hand:

Here is output:

$ sudo grub-install --recheck --removable /dev/sda                                                                             Installing for i386-pc platform.
Installation finished. No error reported.

$ sudo update-grub
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-6.6-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-6.6-x86_64.img
Found initrd fallback image: /boot/initramfs-6.6-x86_64-fallback.img
Found linux image: /boot/vmlinuz-6.1-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-6.1-x86_64.img
Found initrd fallback image: /boot/initramfs-6.1-x86_64-fallback.img
Found linux image: /boot/vmlinuz-5.4-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.4-x86_64.img
Found initrd fallback image: /boot/initramfs-5.4-x86_64-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found memtest86+ image: /boot/memtest86+/memtest.bin
done

Unfortunately it still couldn’t detect windows :frowning_face:

Hmm… Does your system boot in legacy BIOS mode?

Usually, the failure to detect Windows is down to one operating system being installed in legacy BIOS mode and the other in native UEFI mode.

The command you executed is not the command I gave you, and is a command for a legacy BIOS system β€” on a UEFI system, grub is not installed in the MBR but in the EFI partition.

I looked at BIOS and here are related settings:

Boot Mode: Legacy Support
Boot Priority: UEFI First
USB Boot: Enabled
PXE Boot to Lan: Enabled

EFI

Legacy
SATA HDD: WDC WD10JPCX-24UE4TO
SATA HDD: Samsung SSD 870 EVO 1TB
Network Boot: Realtek PXE B08 D00

How can I find it out? According to settings it seems it boots in Legacy Support which is considered to support both UEFI and Legacy.

Is there a command which I can use to find out which mode each operations system is installed?

I just added /dev/sda because if I run your exact command I receive following error:

$ sudo grub-install --recheck --removable
Installing for i386-pc platform.
grub-install: error: install device isn't specified.

There’s your answer. It’s legacy BIOS mode. And I’m guessing Windows will have been installed in UEFI mode, in which case os-prober won’t pick it up.

1 Like

This will mean both OSes are installed in Legacy mode. Does your BIOS have an option to choose which OS to boot? (I think this feature may just be for UEFI though, and/or for OSes on different disks?).

It’s possible the Windows partition/filesystem is damaged. If this is the case, you’ll need something like Hirens BootCD to perform chkdisk.

I think so but I don’t know how to make sure windows is installed in Legacy mode too.

Unfortunately not! It doesn’t have such option.

Ah! It’s a bad news :frowning_face: I was booting into windows just 1 month ago without any problem.
Can you please provide a link?

@Aragorn This problem is occurred recently and just less then 1 month ago I was able to boot windows through grub. So I think Different Installation Mode is not the case and os-prober should be able to detect windows just like before.

If the Windows boot partition isn’t damaged, yes, but since that is an option… :see_no_evil:

Sorry for my repetitive responses but I appreciate your help sincerely. It’s because I should restart my pc and enter BIOS repetitively to gather information.

As matter of fact, I noticed that your previous suggestion about different installation mode is correct because:

  1. The default settings of BIOS are supporting Win8 64 bit in UEFI mode only.
  2. I’m sure previously I had Secure Boot option in BIOS and I disabled it to install linux operation systems (including Manjaro). But now, I don’t see that option in my BIOS and I noticed that it is appearing if and only if I have an EFI operation system.

I can post image of my BIOS settings if needed.

So @Aragorn, By this assumption that I have different installation mode for my operation systems and previously (one month ago) os-prober was finding it without problem, Do you have a solution for me? :pleading_face:

Well, I hope you won’t hold this against me, but quite honestly, no, that’s a mess I’d rather not get involved with. :scream:

For starters, I don’t use Microsoft Windows. Secondly, I believe there might be a some tutorial on the forum somewhere on how to convert a BIOS installation into a UEFI installation (or vice versa), but any attempt to do so would become such an ugly mess that it’s generally a lot easier to just reinstall both systems in the same mode.

And in that case, I would recommend disabling legacy BIOS (CSM) mode altogether for all bootable devices, so that your system will always boot in UEFI mode, even if you boot from the USB stick. All GNU/Linux distributions currently still maintained and developed support booting in UEFI mode, so even if you want to experiment with other distributions, it’ll always work.

But, as I said, that’s about as far as I’m willing to go in terms of advice. There is a significant difference in how UEFI boots versus how a BIOS system boots, and this includes the partition table and where the boot loader is installed.

1 Like

Hmmm… :thinking:
First of all, I’m really happy because it got fixed finally :joy: :man_facepalming:

I don’t know what was the problem and enven how it got fixed but others may point it out by reading my workflow. Here, I just share my experience and it maybe help others.

After os-prober failed to find windows, I motivated to add windows boot entry manually (I know it seems crazy :grimacing: but it was my last shot).
To do so, I first need to find out which device block really belongs to windows boot manager. I had a suggestion about /dev/sda1 but I wasn’t sure:

$ sudo lsblk
NAME    MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0     7:0    0 105.8M  1 loop /var/lib/snapd/snap/core/16202
loop1     7:1    0 104.2M  1 loop /var/lib/snapd/snap/core/17200
loop2     7:2    0  63.5M  1 loop /var/lib/snapd/snap/core20/2015
loop3     7:3    0  63.7M  1 loop /var/lib/snapd/snap/core20/2434
loop4     7:4    0   8.3M  1 loop /var/lib/snapd/snap/gost/539
loop5     7:5    0     9M  1 loop /var/lib/snapd/snap/gost/559
sda       8:0    0 931.5G  0 disk 
β”œβ”€sda1    8:1    0   350M  0 part 
β”œβ”€sda2    8:2    0  97.3G  0 part 
β”œβ”€sda3    8:3    0     1K  0 part 
β”œβ”€sda5    8:5    0   293G  0 part 
β”œβ”€sda6    8:6    0   207G  0 part 
β”œβ”€sda7    8:7    0  52.6G  0 part 
β”œβ”€sda8    8:8    0  15.6G  0 part [SWAP]
β”œβ”€sda9    8:9    0  1000M  0 part /boot
β”œβ”€sda10   8:10   0 107.4G  0 part /
└─sda11   8:11   0 157.2G  0 part /home
sdb       8:16   0 931.5G  0 disk 
└─sdb1    8:17   0 931.5G  0 part 

To make sure /dev/sda1 contains windows boot manager, I mounted it and inspected its content:

$ sudo mount /dev/sda1 /mnt
/dev/sda1 content
$ tree /mnt 
/mnt
β”œβ”€β”€ $RECYCLE.BIN
β”‚   └── S-1-5-21-3802437951-2989038664-4021769935-1001
β”‚       └── desktop.ini
β”œβ”€β”€ Boot
β”‚   β”œβ”€β”€ BCD
β”‚   β”œβ”€β”€ BCD.LOG
β”‚   β”œβ”€β”€ BCD.LOG1
β”‚   β”œβ”€β”€ BCD.LOG2
β”‚   β”œβ”€β”€ bg-BG
β”‚   β”‚   └── bootmgr.exe.mui
β”‚   β”œβ”€β”€ BOOTSTAT.DAT
β”‚   β”œβ”€β”€ cs-CZ
β”‚   β”‚   β”œβ”€β”€ bootmgr.exe.mui
β”‚   β”‚   └── memtest.exe.mui
β”‚   β”œβ”€β”€ da-DK
β”‚   β”‚   β”œβ”€β”€ bootmgr.exe.mui
β”‚   β”‚   └── memtest.exe.mui
β”‚   β”œβ”€β”€ de-DE
β”‚   β”‚   β”œβ”€β”€ bootmgr.exe.mui
β”‚   β”‚   └── memtest.exe.mui
β”‚   β”œβ”€β”€ el-GR
β”‚   β”‚   β”œβ”€β”€ bootmgr.exe.mui
β”‚   β”‚   └── memtest.exe.mui
β”‚   β”œβ”€β”€ en-GB
β”‚   β”‚   └── bootmgr.exe.mui
β”‚   β”œβ”€β”€ en-US
β”‚   β”‚   β”œβ”€β”€ bootmgr.exe.mui
β”‚   β”‚   └── memtest.exe.mui
β”‚   β”œβ”€β”€ es-ES
β”‚   β”‚   β”œβ”€β”€ bootmgr.exe.mui
β”‚   β”‚   └── memtest.exe.mui
β”‚   β”œβ”€β”€ et-EE
β”‚   β”‚   └── bootmgr.exe.mui
β”‚   β”œβ”€β”€ fi-FI
β”‚   β”‚   β”œβ”€β”€ bootmgr.exe.mui
β”‚   β”‚   └── memtest.exe.mui
β”‚   β”œβ”€β”€ Fonts
β”‚   β”‚   β”œβ”€β”€ chs_boot.ttf
β”‚   β”‚   β”œβ”€β”€ cht_boot.ttf
β”‚   β”‚   β”œβ”€β”€ jpn_boot.ttf
β”‚   β”‚   β”œβ”€β”€ kor_boot.ttf
β”‚   β”‚   β”œβ”€β”€ malgun_boot.ttf
β”‚   β”‚   β”œβ”€β”€ malgunn_boot.ttf
β”‚   β”‚   β”œβ”€β”€ meiryo_boot.ttf
β”‚   β”‚   β”œβ”€β”€ meiryon_boot.ttf
β”‚   β”‚   β”œβ”€β”€ msjh_boot.ttf
β”‚   β”‚   β”œβ”€β”€ msjhn_boot.ttf
β”‚   β”‚   β”œβ”€β”€ msyh_boot.ttf
β”‚   β”‚   β”œβ”€β”€ msyhn_boot.ttf
β”‚   β”‚   β”œβ”€β”€ segmono_boot.ttf
β”‚   β”‚   β”œβ”€β”€ segoen_slboot.ttf
β”‚   β”‚   β”œβ”€β”€ segoe_slboot.ttf
β”‚   β”‚   └── wgl4_boot.ttf
β”‚   β”œβ”€β”€ fr-FR
β”‚   β”‚   β”œβ”€β”€ bootmgr.exe.mui
β”‚   β”‚   └── memtest.exe.mui
β”‚   β”œβ”€β”€ hr-HR
β”‚   β”‚   └── bootmgr.exe.mui
β”‚   β”œβ”€β”€ hu-HU
β”‚   β”‚   β”œβ”€β”€ bootmgr.exe.mui
β”‚   β”‚   └── memtest.exe.mui
β”‚   β”œβ”€β”€ it-IT
β”‚   β”‚   β”œβ”€β”€ bootmgr.exe.mui
β”‚   β”‚   └── memtest.exe.mui
β”‚   β”œβ”€β”€ ja-JP
β”‚   β”‚   β”œβ”€β”€ bootmgr.exe.mui
β”‚   β”‚   └── memtest.exe.mui
β”‚   β”œβ”€β”€ ko-KR
β”‚   β”‚   β”œβ”€β”€ bootmgr.exe.mui
β”‚   β”‚   └── memtest.exe.mui
β”‚   β”œβ”€β”€ lt-LT
β”‚   β”‚   └── bootmgr.exe.mui
β”‚   β”œβ”€β”€ lv-LV
β”‚   β”‚   └── bootmgr.exe.mui
β”‚   β”œβ”€β”€ memtest.exe
β”‚   β”œβ”€β”€ nb-NO
β”‚   β”‚   β”œβ”€β”€ bootmgr.exe.mui
β”‚   β”‚   └── memtest.exe.mui
β”‚   β”œβ”€β”€ nl-NL
β”‚   β”‚   β”œβ”€β”€ bootmgr.exe.mui
β”‚   β”‚   └── memtest.exe.mui
β”‚   β”œβ”€β”€ pl-PL
β”‚   β”‚   β”œβ”€β”€ bootmgr.exe.mui
β”‚   β”‚   └── memtest.exe.mui
β”‚   β”œβ”€β”€ pt-BR
β”‚   β”‚   β”œβ”€β”€ bootmgr.exe.mui
β”‚   β”‚   └── memtest.exe.mui
β”‚   β”œβ”€β”€ pt-PT
β”‚   β”‚   β”œβ”€β”€ bootmgr.exe.mui
β”‚   β”‚   └── memtest.exe.mui
β”‚   β”œβ”€β”€ qps-ploc
β”‚   β”‚   β”œβ”€β”€ bootmgr.exe.mui
β”‚   β”‚   └── memtest.exe.mui
β”‚   β”œβ”€β”€ Resources
β”‚   β”‚   β”œβ”€β”€ bootres.dll
β”‚   β”‚   └── en-US
β”‚   β”‚       └── bootres.dll.mui
β”‚   β”œβ”€β”€ ro-RO
β”‚   β”‚   └── bootmgr.exe.mui
β”‚   β”œβ”€β”€ ru-RU
β”‚   β”‚   β”œβ”€β”€ bootmgr.exe.mui
β”‚   β”‚   └── memtest.exe.mui
β”‚   β”œβ”€β”€ sk-SK
β”‚   β”‚   └── bootmgr.exe.mui
β”‚   β”œβ”€β”€ sl-SI
β”‚   β”‚   └── bootmgr.exe.mui
β”‚   β”œβ”€β”€ sr-Latn-CS
β”‚   β”‚   └── bootmgr.exe.mui
β”‚   β”œβ”€β”€ sr-Latn-RS
β”‚   β”‚   └── bootmgr.exe.mui
β”‚   β”œβ”€β”€ sv-SE
β”‚   β”‚   β”œβ”€β”€ bootmgr.exe.mui
β”‚   β”‚   └── memtest.exe.mui
β”‚   β”œβ”€β”€ tr-TR
β”‚   β”‚   β”œβ”€β”€ bootmgr.exe.mui
β”‚   β”‚   └── memtest.exe.mui
β”‚   β”œβ”€β”€ uk-UA
β”‚   β”‚   └── bootmgr.exe.mui
β”‚   β”œβ”€β”€ zh-CN
β”‚   β”‚   β”œβ”€β”€ bootmgr.exe.mui
β”‚   β”‚   └── memtest.exe.mui
β”‚   β”œβ”€β”€ zh-HK
β”‚   β”‚   β”œβ”€β”€ bootmgr.exe.mui
β”‚   β”‚   └── memtest.exe.mui
β”‚   └── zh-TW
β”‚       β”œβ”€β”€ bootmgr.exe.mui
β”‚       └── memtest.exe.mui
β”œβ”€β”€ bootmgr
β”œβ”€β”€ BOOTNXT
β”œβ”€β”€ BOOTSECT.BAK
β”œβ”€β”€ C
β”œβ”€β”€ Recovery
β”‚   └── WindowsRE
β”‚       β”œβ”€β”€ boot.sdi
β”‚       β”œβ”€β”€ ReAgent.xml
β”‚       └── Winre.wim
└── System Volume Information
    β”œβ”€β”€ $MRCBT
    β”œβ”€β”€ FileProtector
    β”‚   └── STDB
    β”‚       └── status.db
    β”œβ”€β”€ IndexerVolumeGuid
    β”œβ”€β”€ MasterFileStatus.db
    β”œβ”€β”€ tracking.log
    └── WPSettings.dat

49 directories, 97 files

Because there is no /EFI/ directory, I switched my idea about different Installation Modes again :man_facepalming: and suggested maybe windows is installed in BIOS-style mode.

To make sure that windows is installed in legacy mode, I tried two different ways.

parted command

I’m not sure about this claim but through my research, It seems if a block device contains EFI installation mode files, it is flagged by esp.

$ sudo parted -l
[sudo] password for milad: 
Model: ATA Samsung SSD 870 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type      File system     Flags
 1      1049kB  368MB   367MB   primary   ntfs            boot
 2      368MB   105GB   104GB   primary   ntfs
 3      105GB   1000GB  895GB   extended                  lba
 5      105GB   419GB   315GB   logical   ntfs
 6      419GB   642GB   222GB   logical   ntfs
 8      642GB   659GB   16.8GB  logical   linux-swap(v1)  swap
 9      659GB   660GB   1049MB  logical   ext4
10      660GB   775GB   115GB   logical   ext4
11      775GB   944GB   169GB   logical   ext4
 7      944GB   1000GB  56.5GB  logical   ntfs


Model: ATA WDC WD10JPCX-24U (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  1000GB  1000GB  primary  ntfs

As you can see, /dev/sda1 is only flagged by boot which is another evidence for Legacy installation mode of windows!

grub

Reboot your system and in boot menu, press c to enter grub prompt.
List all your available devices:

ls 
(hd0), (hd0,msdos1) (hd0,msdos2) ...

Just another evidence is that devices are labeld with msdos instead of gpt and it confirms that windows is installed in Legacy Mode but let’s continue.
Note that numbers are mapped directly, I mean dev/sdax is mapped to msdosx. So to inspect /dev/sda1, I should consider (hd0,msdos1):

ls (hd0,msdos1)/
$AttrDef $BadClus $Bitmap $Boot $Extend/ $LogFile $MFT $MFTMirr $RECYCLE.BIN/ $SECURE $UpCase $Volume Boot/ bootmgr BOOTNXT BOOTSECT.BAK C/ Recovery/ Sytem Volume Inforamtion/

Because I only have Boot and bootmgr, now I’m sure that window is installed in legacy mode too!
If windows is installed in EFI mode, You should be able to find bootmgfw.efi file in (hd0,gpt1)/EFI/Microsoft/Boot/ default path.

Now that we are sure windows is installed in Legacy mode, we should add a manual entry in /etc/grub.d/40_custom:

menuentry "Windows 8 (legacy BIOS)" {
    insmod part_msdos
    insmod ntfs
    set root='hd0,msdos1'
    chainloader +1
}
  • insmod part_msdos loads MBR partition support.
  • insmod ntfs loads NTFS filesystem support.
  • chainloader +1 tells GRUB to hand off to the first sector (the Windows bootloader code) of that partition.

Now we are ready to regenerate grub configurations but before that, make sure to take a backup:

$ sudo cp /boot/grub/grub.cfg /grub.conf.backup

Regenerate grub configurations:

$ sudo grub-mkconfig -o /boot/grub/grub.cfg

This time os-prober took a longer time to probe operations systems and it found the Windows on its own :heart_eyes:

I rebooted and There was two new boot entrys in grub menu:

  1. Windows 8
  2. Windows 8 (legacy BIOS)

The first one is detected by os-prober and the last one is my manual entry.
I selected first one and windows booted without any problem.
NOTE: I never tried Window 8 (legacy BIOS) boot option and didn’t remove it too because I don’t touch a code if it’s working :joy:

Final Note:
I really don’t know what was the root of problem and if adding manual entry was effective or not! I think it’s a bug in new update of os-prober or grub. I’m just happy that I fixed it.

2 Likes

There is a comparatively simple way to check that;

[ -d /sys/firmware/efi ] && echo UEFI || echo BIOS

Enter that command string exactly (including spaces) and it should output either β€œUEFI” or β€œBIOS”.

Add this to your notes.

Regards.

2 Likes