<div dir="ltr">Hello,<div><br></div><div>I am trying to build a custom ubuntu-core image with a custom kernel. Below is my assertion:</div><div><br></div><div>







<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">{</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">  "type": "model",</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">  "authority-id": "<removed>",</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">  "brand-id": "<removed>",</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">  "series": "16",</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">  "model": "pc",</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">  "architecture": "amd64",</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">  "gadget": "pc",</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">  "kernel": "onl-kernel_3.18.25_amd64.snap",</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">  "timestamp": "2016-10-13T22:26:50+00:00"</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">}</font></span></p></div><div><br></div><div>I the sign the assertion and have a valid assertion model, but when I try to build, I get the following error:</div><div><br></div><div><br></div><div>







<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">$ sudo /snap/bin/ubuntu-image -c stable -o onl-snappy.img --extra-snaps onl-kernel_3.18.25_amd64.snap pc.model</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">Fetching core</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">Copying "onl-kernel_3.18.25_amd64.snap" (onl-kernel)</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">Fetching pc</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">onl-kernel already prepared, skipping</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">uncaught exception in state machine step: [2] load_gadget_yaml</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">Traceback (most recent call last):</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">  File "/snap/ubuntu-image/20/usr/lib/python3.5/site-packages/ubuntu_image/state.py", line 68, in __next__</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">    step()</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">  File "/snap/ubuntu-image/20/usr/lib/python3.5/site-packages/ubuntu_image/builder.py", line 145, in load_gadget_yaml</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">    with open(yaml_file, 'r', encoding='utf-8') as fp:</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpfmnriroe/unpack/gadget/meta/gadget.yaml'</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">Crash in state machine</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">Traceback (most recent call last):</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">  File "/snap/ubuntu-image/20/usr/lib/python3.5/site-packages/ubuntu_image/__main__.py", line 117, in main</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">    list(state_machine)</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">  File "/snap/ubuntu-image/20/usr/lib/python3.5/site-packages/ubuntu_image/state.py", line 68, in __next__</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">    step()</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">  File "/snap/ubuntu-image/20/usr/lib/python3.5/site-packages/ubuntu_image/builder.py", line 145, in load_gadget_yaml</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">    with open(yaml_file, 'r', encoding='utf-8') as fp:</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpfmnriroe/unpack/gadget/meta/gadget.yaml'</font></span></p><div>It almost looks like the gadget snap is no longer called pc, but I cannot find in any past threads or documentation what it was changed to.</div><div><br></div><div>Any help would be greatly appreciated.</div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Thanks,<br><br><br>Luke Williams - Technical Partner Manager, Network Switches and Ubuntu-Core<div><a href="mailto:luke.williams@canonical.com" target="_blank">luke.williams@canonical.com</a></div><div><a href="http://www.canonical.com" target="_blank">www.canonical.com</a> || <a href="http://www.ubuntu.com" target="_blank">www.ubuntu.com</a></div><div><br></div></div></div>
</div></div>