<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Figured it out with the help of community. It was due to my kernel snap having a specific name in my assertion and it was causing the core snap to remove itself after failed boot. I had to give the assertion model the generic “name” of my kernel snap and then point the actual kernel snap file name. Once I rebuilt my image that way, everything was good to go and it works properly and shows up in the snap list correctly, and subsequent reboots the system does not remove the core snap. <div class=""><br class=""></div><div class="">Now I just have to work on my script to convert the ubuntu-core image to ONIE, but that is outside of this topic.</div><div class=""><br class=""></div><div class=""><br class=""><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Thanks,</div><div class=""><br class=""></div><div class="">Luke Williams - Technical Partner Manager, Network Switches/Ubuntu-Core</div><div class="">email: <a href="mailto:luke.williams@canonical.com" class="">luke.williams@canonical.com</a></div><div class=""><a href="http://www.canonical.com/" class="">http://www.canonical.com/</a> |<span class="Apple-converted-space"> </span><a href="http://www.ubuntu.com" class="">http://www.ubuntu.com</a></div><div class=""><br class=""></div><div class=""><br class=""></div></div></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Nov 2, 2016, at 12:31 PM, Luke Williams <<a href="mailto:luke.williams@canonical.com" class="">luke.williams@canonical.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hello,<div class=""><br class=""></div><div class="">I have an interresting situation happening.</div><div class=""><br class=""></div><div class="">I created a custom ubuntu-core image with a custom kernel snap from yakkety from <a href="http://kernel.ubuntu.com/" class="">kernel.ubuntu.com</a>. I build the snap using the included snapcraft.yaml and just changing the name and version number and description and then I use ubuntu-image to build the image. I then had to modify the system-boot image to get it to work properly with the ONIE install scripts since for some reason prefix in grub is hard coded to /EFI/ubuntu/grub directory, I had to copy the grub.cfg and grubenv to a grub directory. For some reason when I changed the install script for the ONIE installer to /EFI/ubuntu grub would fail and the system would just sit there becuase prefix was hard coded. I got around this by doing the above mentioned. I was then able to get the device to start and let me do the initial configuration of the device. After I add my ssh keys from launchpad to the device, I do some initial configuration by creating some udev rules for the device network adapters to get the correct names. I also do a snap list to check that the kernel snap and core snap and gadget snap are all good, which I get the error saying no snaps installed and I should install hello-world. I’ve seen this in the past, but the system tends to work as it should unless I install a snap, then the system fails catastrophically and I have to reflash the system since it gets all sorts of confussed as to what snaps are installed. I used to fix this by making sure my kernel snap was in grade stable and confinement strict, which i did in my kernel snap, but it is doing this again. I’m assuming its becuase I am using the edge channel when I build my image. </div><div class="">Anyways, the main reason for this email, after I do a reboot to verify my udev rule and everything works correctly, the system fails to boot and I get dumped to an initramfs prompt. I managed to get a screen log of everything happening and I noticed that it tried to mount the core_383.snap to /root, and it failed becuase it couldn’t find the file. I looked where it was trying to mount from and sure enough, there is no core_383.snap file in tmpmnt_writable/system-data/var/lib/snapd/snaps but instead my kernel snap and an empty folder named partial. </div><div class="">If I reinstall the device with the base image, it works again, but as soon as I do a reboot, I’m stuck back where I’m at. Any ideas on how to fix this or prevent this snap from being deleted after initial installation? Also, why is the system saying no snaps installed when its an Ubuntu-Core system?</div><div class=""><br class=""></div><div class="">If you need any other details or information, please let me know. The vendor really wants a working image since they have a customer that wants this badly.</div><div class=""><br class=""><div class="">
<div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Thanks,</div><div class=""><br class=""></div><div class="">Luke Williams - Technical Partner Manager, Network Switches/Ubuntu-Core</div><div class="">email: <a href="mailto:luke.williams@canonical.com" class="">luke.williams@canonical.com</a></div><div class=""><a href="http://www.canonical.com/" class="">http://www.canonical.com/</a> |<span class="Apple-converted-space"> </span><a href="http://www.ubuntu.com/" class="">http://www.ubuntu.com</a></div><div class=""><br class=""></div><div class=""><br class=""></div></div></div><br class="Apple-interchange-newline"><br class=""></div></div></div></div></blockquote></div><br class=""></div></body></html>