core_383.snap missing after reboot of Ubuntu-Core

Luke Williams luke.williams at canonical.com
Wed Nov 2 19:31:14 UTC 2016


Hello,

I have an interresting situation happening.

I created a custom ubuntu-core image with a custom kernel snap from yakkety from kernel.ubuntu.com <http://kernel.ubuntu.com/>. 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. 
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. 
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?

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.

Thanks,

Luke Williams - Technical Partner Manager, Network Switches/Ubuntu-Core
email: luke.williams at canonical.com <mailto:luke.williams at canonical.com>
http://www.canonical.com/ <http://www.canonical.com/> | http://www.ubuntu.com <http://www.ubuntu.com/>




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20161102/a34855dc/attachment.html>


More information about the Snapcraft mailing list