Hi,

On Thu, Aug 30, 2018 at 7:54 PM, daggs <[email protected]> wrote:
> Greetings,
>
> I apologize if this isn't the right location to ask. as you guys wrote efi 
> support for linux I've thought you might be able to help me fill the gaps on 
> this issue.
>
> we have a production server with sles12 sp3 installed on it.
> the partition table on the machine is this:
> # fdisk -l /dev/sda
> Disk /dev/sda: 223.6 GiB, 240057409536 bytes, 468862128 sectors
> 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

See the Disklabel type: dos. If it shows dos, AFAICR it means it is
MBR schema (and not a GPT schema)

> Disk identifier: 0xf9a6b446
>
> Device Boot Start End Sectors Size Id Type
> /dev/sda1 * 2048 4192255 4190208 2G 83 Linux
> /dev/sda2 4192256 468860927 464668672 221.6G 83 Linux
>
> mount output is as follows:
> s2600wf-0:~ # mount | grep boot
> /dev/sda2 on /boot/grub2/i386-pc type btrfs 
> (rw,relatime,ssd,space_cache,subvolid=260,subvol=/@/boot/grub2/i386-pc)
> /dev/sda1 on /boot/efi type vfat 
> (rw,relatime,fmask=0002,dmask=0002,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
> /dev/sda2 on /boot/grub2/x86_64-efi type btrfs 
> (rw,relatime,ssd,space_cache,subvolid=261,subvol=/@/boot/grub2/x86_64-efi)

May be you should try 'gdisk' instead to list the GPT partitions in
addition to the MBR ones. Following is an output from my Fedora28 EFI
machine:

$ sudo gdisk -l /dev/sda
GPT fdisk (gdisk) version 1.0.4

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 1953525168 sectors, 931.5 GiB
Model: TOSHIBA DT01ACA1
Sector size (logical/physical): 512/4096 bytes
Disk identifier (GUID): E01AB4D7-2DA7-4300-9CE8-FD573801C1DC
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 1953525134
Partitions will be aligned on 2048-sector boundaries
Total free space is 3437 sectors (1.7 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          411647   200.0 MiB   EF00  EFI System Partition
   2          411648         2508799   1024.0 MiB  8300
   3         2508800      1953523711   930.3 GiB   8E00

Looking at the output you can make out the 'EFI System Partition' entry.
Also if you see something like:

***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory.
***************************************************************

then you have a MBR style disk..

> and here is the content of /sys/firmware/efi/:
> s2600wf-0:~ # ll /sys/firmware/efi/
> total 0
> -r--r--r--   1 root root 4096 Aug 29 03:19 config_table
> drwxr-xr-x   2 root root    0 Aug 29 03:17 efivars
> -r--r--r--   1 root root 4096 Aug 29 03:19 fw_platform_size
> -r--r--r--   1 root root 4096 Aug 29 03:19 fw_vendor
> -r--r--r--   1 root root 4096 Aug 29 03:19 runtime
> drwxr-xr-x  11 root root    0 Aug 29 03:19 runtime-map
> -r--------   1 root root 4096 Aug 29 03:17 systab
> drwxr-xr-x 140 root root    0 Aug 29 03:19 vars
>
> afaik, if the partition table is mbr, then for efi to boot, the boot 
> partition must be of type EF. in this case it isn't so I was wondering how 
> the system boots in efi? how does the bios detects it?
> am I missing something?

It depends on the BIOS on your machine. Please see
<https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface#UEFI_booting>
for details.

Thanks,
Bhupesh

Reply via email to