<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>6722</bug_id>
          
          <creation_ts>2014-09-12 21:12:17 +0000</creation_ts>
          <short_desc>Boot entry for partition not exposed</short_desc>
          <delta_ts>2015-02-17 21:12:48 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>12</classification_id>
          <classification>Hardware Platforms</classification>
          <product>MinnowBoard MAX Firmware</product>
          <component>minnowboard-firmware</component>
          <version>2C A1</version>
          <rep_platform>MinnowBoard Max</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Production Release</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Marcel Holtmann">marcel</reporter>
          <assigned_to name="Darren Hart">dvhart</assigned_to>
          <cc>danders</cc>
    
    <cc>david.wei</cc>
    
    <cc>dvhart</cc>
    
    <cc>marcel</cc>
    
    <cc>matt</cc>
    
    <cc>shifeix.a.lu</cc>
    
    <cc>sjolley.yp.pm</cc>
    
    <cc>warthog9</cc>
    
    <cc>yoctoproject</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>45597</commentid>
    <comment_count>0</comment_count>
    <who name="Marcel Holtmann">marcel</who>
    <bug_when>2014-09-12 21:12:17 +0000</bug_when>
    <thetext>The boot options for the selected boot entry does not reveal any information about the partition. This is from bootctl utility:

System:
   Machine ID: e175a86a8ac145f78a9bdc62b4d27f25
      Boot ID: 1f39b9c0ed454a2cb9db0a1ebd0fda33
     Firmware: UEFI 2.40 (EDK II 1.00)
  Secure Boot: disabled
   Setup Mode: setup

Selected Firmware Entry:
        Title: EFI Hard Drive
    Partition: n/a

Boot Loader:
      Product: gummiboot 45
    Partition: /dev/disk/by-partuuid/fa592eba-3242-4575-99a2-e52d8a830142
         File: └─/EFI/BOOT/BOOTX64.EFI

Normally the Partition: n/a from Selected Firmware Entry should resolve to the same Partition information from Boot Loader.

Checking with efibootmgr I see that the partition information is missing:

BootCurrent: 0001
Timeout: 5 seconds
BootOrder: 0001,0002,0000
Boot0000* EFI Internal Shell	FvVol(a881d567-6cb0-4eee-8435-2e72d33e45b5)
Boot0001* EFI Hard Drive	ACPI(a0341d0,0)PCI(12,0)Controller(0)
Boot0002* EFI Network	ACPI(a0341d0,0)PCI(1c,2)PCI(0,0)MAC(MAC(001320fe319e,0)

For boot entry 0001, it misses the HD() entry providing the UUID.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45598</commentid>
    <comment_count>1</comment_count>
    <who name="Stephen K Jolley">sjolley.yp.pm</who>
    <bug_when>2014-09-12 21:19:46 +0000</bug_when>
    <thetext>Not HW this is Frimware</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45818</commentid>
    <comment_count>2</comment_count>
    <who name="He, Tim">tim.he</who>
    <bug_when>2014-09-25 07:48:22 +0000</bug_when>
    <thetext>Thanks Marcel, I will check the information about partition.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46630</commentid>
    <comment_count>3</comment_count>
    <who name="Lu_Shifei">shifeix.a.lu</who>
    <bug_when>2014-10-29 05:25:33 +0000</bug_when>
    <thetext>Hi Marcel,
Our BIOS can reach device level with Device Path of EFI Hard Drive,not reach
Partition level with Device Path of EFI Hard Drive. If you want to need Partition information from Boot Loader,maybe Yocto OS will involved in to investigate it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46632</commentid>
    <comment_count>4</comment_count>
    <who name="David_Wei">david.wei</who>
    <bug_when>2014-10-29 06:24:08 +0000</bug_when>
    <thetext>More detail from me and Shifei: 

     Boot0001* EFI Hard Drive	ACPI(a0341d0,0)PCI(12,0)Controller(0)

Above boot option &quot;Boot0001* EFI Hard Drive&quot; is the path of hard drive, not the file path pointing to boot loader file (BOOTX64.EFI). When user selec to boot from this device, BIOS searchs for boot loader file (BOOTX64.EFI) within this HDD.  This formate is not a bug. 

Typically there is another boot option whose path does contains the bootable partition&apos;s name and the boot loader file&apos;s name. But that boot option is not generated by BIOS, it is generated by OS boot loader itself.

Take Microsoft Windows for example, Windows boot loader adds a &quot;Windows Boot Manager&quot; option into the boot menu at the first boot. 

So I re-assgin this bug to Marcel Holtmann to continue investigating from OS loader side.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46834</commentid>
    <comment_count>5</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2014-11-06 23:35:25 +0000</bug_when>
    <thetext>Matt, wondering if you can add some experience here. Does look like an OS or a firmware issue to you?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46858</commentid>
    <comment_count>6</comment_count>
    <who name="Matt Fleming">matt</who>
    <bug_when>2014-11-07 14:59:57 +0000</bug_when>
    <thetext>Hard to say.

Can someone use efibootmgr to create a new boot entry with a partition and loader option?

Something like,

efibootmgr -c -d /dev/sda -p 1 -l \\EFI\\BOOT\\BOOTX64.EFI  -L &quot;Test loader&quot;

should do the trick. Then update this report with the output of efibootmgr -v.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46888</commentid>
    <comment_count>7</comment_count>
    <who name="David_Wei">david.wei</who>
    <bug_when>2014-11-10 01:59:08 +0000</bug_when>
    <thetext>The UEFI BIOS also has an integrated function which allow user to add &quot;&lt;Partition&gt;\\EFI\\BOOT\\BOOTX64.EFI&quot; as a new boot option. Please enter BIOS Setup, then go into &quot;Boot Maintenance Manager -&gt; Boot options -&gt; Add Boot Option&quot;, which will list out the bootable BOOTX64.EFI for you to add. 

Basically, the path of directory where boot loader is stored, such as &quot;\\EFI\\BOOT\\BOOTX64.EFI&quot;,  should be OS specific. It is not defined by UEFI specification. 

As you know, our current BIOS could automatically boot from Yocto OS loader &quot;\\EFI\\BOOT\\BOOTX64.EFI&quot; even there is no such a boot option pointing to this file. That&apos;s because this path, which is treated as a &quot;well known OS laoder&quot; path by our BIOS, along with its partition path, are appened to the device path of SD controller &quot;ACPI(a0341d0,0)PCI(12,0)Controller(0)&quot; to form a full path. 
But I think this is only a enhancement from BIOS side. It cannot cover the job what OS/OS loader should do.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47013</commentid>
    <comment_count>8</comment_count>
    <who name="John &apos;Warthog9&apos; Hawley">warthog9</who>
    <bug_when>2014-11-13 23:37:42 +0000</bug_when>
    <thetext>Marcell can you double check what Matt and David were saying?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48677</commentid>
    <comment_count>9</comment_count>
    <who name="John &apos;Warthog9&apos; Hawley">warthog9</who>
    <bug_when>2015-02-10 00:37:34 +0000</bug_when>
    <thetext>Following Matt&apos;s suggestion, with 0.77 and a 3.19 kernel, test loader is added and seems to work.  I&apos;m going to close, if this is incorrect please re-open</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>