<?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>8001</bug_id>
          
          <creation_ts>2015-07-14 21:54:33 +0000</creation_ts>
          <short_desc>wic: Add bootloader options for multi-rootfs</short_desc>
          <delta_ts>2015-09-21 11:29:55 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>deployment</component>
          <version>1.8</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>NOTABUG</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>1.9 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mariano Lopez">mariano.lopez</reporter>
          <assigned_to name="Ed Bartosh">eduard.bartosh</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>bogdanx.a.voiculescu</cc>
    
    <cc>igor.stoppa</cc>
          
          <qa_contact name="Daniel Istrate">daniel.alexandrux.istrate</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>52369</commentid>
    <comment_count>0</comment_count>
    <who name="Mariano Lopez">mariano.lopez</who>
    <bug_when>2015-07-14 21:54:33 +0000</bug_when>
    <thetext>For multi-rootfs there is no way to configure the bootloader to boot from more than one partition. This is required for systems that have a primary partition and a maintenance partition or for devices that need to have more than one rootfs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52440</commentid>
    <comment_count>1</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-07-16 14:45:39 +0000</bug_when>
    <thetext>It is possible for EFI I believe.

Can you explain your configuration in more details?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52447</commentid>
    <comment_count>2</comment_count>
    <who name="Mariano Lopez">mariano.lopez</who>
    <bug_when>2015-07-16 15:55:02 +0000</bug_when>
    <thetext>For example, using grub-efi loader with a parition scheme like: 

bootloader | maintenance | config_data | rootfs

I want to boot from the 4th partition. It is not possible to change the default boot partiton (or other grub options;  the only option available to change is timeout). Also is not possible to add more menu entries into grub (for other boot partitions).

So the enhancement request is to be able to set more menu entries and to change arbitrary grub options (default and fallback come to mind).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52448</commentid>
    <comment_count>3</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-07-16 15:58:21 +0000</bug_when>
    <thetext>It is possible to prepare boot directory by bitbake and put there any bootloader configuration you want and use wic to convert it into partitioned image. Would this way work for you?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52473</commentid>
    <comment_count>4</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-07-19 19:37:54 +0000</bug_when>
    <thetext>Igor, can you explain Mariano how did you prepare multiple rootfs dirs in one bitbake recipe?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52475</commentid>
    <comment_count>5</comment_count>
    <who name="Igor Stoppa">igor.stoppa</who>
    <bug_when>2015-07-20 07:10:20 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; Igor, can you explain Mariano how did you prepare multiple rootfs dirs in
&gt; one bitbake recipe?

No, I cannot, because I haven&apos;t done it yet :-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52476</commentid>
    <comment_count>6</comment_count>
    <who name="Igor Stoppa">igor.stoppa</who>
    <bug_when>2015-07-20 07:28:55 +0000</bug_when>
    <thetext>I think this should somehow converge into the work for #bug 7672.
Once it&apos;s finally possible to call wic from inside a recipe, this is the obvious follow up, that such recipe must be able to configure which one is the default  partition to boot from.

However this requires that the chosen bootloader is actually capable of doing such feat. So far I know only of grub and uboot that can load a kernel from a partition other than the one where they reside.

I think the simplest way is to use a class/recipe to configure the bootloader, to keep wic ignorant about the details.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52481</commentid>
    <comment_count>7</comment_count>
    <who name="Igor Stoppa">igor.stoppa</who>
    <bug_when>2015-07-20 13:11:54 +0000</bug_when>
    <thetext>Btw, I&apos;m looking at the way something very similar was done for Edison.
It also includes dynamically changing boot target (ex: firmware ota vs. normal boot).


https://software.intel.com/iot/hardware/edison/downloads

It&apos;s done with u-boot rather than grub, but it meets all the needs listed so far.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52499</commentid>
    <comment_count>8</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-07-21 09:17:05 +0000</bug_when>
    <thetext>(In reply to comment #6)
&gt; I think this should somehow converge into the work for #bug 7672.
&gt; Once it&apos;s finally possible to call wic from inside a recipe, this is the
&gt; obvious follow up, that such recipe must be able to configure which one is
&gt; the default  partition to boot from.
&gt; 
&gt; However this requires that the chosen bootloader is actually capable of
&gt; doing such feat. So far I know only of grub and uboot that can load a kernel
&gt; from a partition other than the one where they reside.
&gt; 
&gt; I think the simplest way is to use a class/recipe to configure the
&gt; bootloader, to keep wic ignorant about the details.

I thought Mariano is asking for something similar to what we&apos;ve done for #bug 7854. Can you share your recipe producing bootloader and rootfs dirs and working .wks file to produce an image?

Mariano, in #bug 7854 I showed working example of producing image from 2 rootfses. You might want to look at it too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52503</commentid>
    <comment_count>9</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-07-21 10:06:55 +0000</bug_when>
    <thetext>Here is a comment in #bug 7854 https://bugzilla.yoctoproject.org/show_bug.cgi?id=7854#c11 with the example of producing partitioned image from two rootfs recipes.
So, from my understanding that&apos;s the approach you should use.
Please, let me know if you need my help with this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52508</commentid>
    <comment_count>10</comment_count>
    <who name="Mariano Lopez">mariano.lopez</who>
    <bug_when>2015-07-21 14:17:51 +0000</bug_when>
    <thetext>What I need is to have a custom grub.cfg file, is there a way to provide a custom file for the grub-efi loader?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52514</commentid>
    <comment_count>11</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-07-22 09:25:50 +0000</bug_when>
    <thetext>Sure. You can prepare your grub configuration in your bitbake recipe. wic will just take whatever is in rootfs dir and put it into partition of the partitioned image.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52786</commentid>
    <comment_count>12</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-08-03 14:01:35 +0000</bug_when>
    <thetext>Any progress on this? Does proposed solution suit your needs? Can we close this bug?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52925</commentid>
    <comment_count>13</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-08-09 11:55:25 +0000</bug_when>
    <thetext>Any news on this? Please close the bug if proposed solution works for you.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52943</commentid>
    <comment_count>14</comment_count>
    <who name="Mariano Lopez">mariano.lopez</who>
    <bug_when>2015-08-10 13:45:23 +0000</bug_when>
    <thetext>I used my own wks to have a custom grub.conf. You can close the bug</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52956</commentid>
    <comment_count>15</comment_count>
    <who name="Stephen K Jolley">sjolley.yp.pm</who>
    <bug_when>2015-08-10 16:30:48 +0000</bug_when>
    <thetext>It appears the NEEDINFO has been met.  Please put this back into NEEDINFO if anything else is needed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52980</commentid>
    <comment_count>16</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-08-11 07:30:47 +0000</bug_when>
    <thetext>Resolving as not a bug as it didn&apos;t require any code changes in wic.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54366</commentid>
    <comment_count>17</comment_count>
    <who name="Daniel Istrate">daniel.alexandrux.istrate</who>
    <bug_when>2015-09-21 11:29:55 +0000</bug_when>
    <thetext>Verified: not a bug</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>