<div dir="ltr"><div>Hi,</div><div><br></div>I wanted to capture one of the issues that was encountered.<div><br></div><div>ubuntu-device-flash snap can not work from an Ubuntu Core system; this is because it calls kpartx with the -s flag which relies on libdevmapper coordinating with its udev counterpart. Because dmsetup isn't installed in the core image, the udev signaling never comes back.</div><div><br></div><div>To sum up:</div><div>- Ubuntu classic + kpartx -avs: works</div><div>- Ubuntu Core + kpartx -avs: hangs</div><div>- Ubuntu Core + kpartx -av: works</div><div><br></div><div>I wanted to mention this for people who try running ubuntu-device-flash from an Ubuntu Core system.</div><div><br></div><div>(Various workarounds would be possible but because ubuntu-device-flash ought to be replaced by ubuntu-image soon it's probably not worth addressing right now.)</div><div><br></div><div>Cheers,</div><div>- Loïc Minier</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 31, 2016 at 8:27 PM, Loïc Minier <span dir="ltr"><<a href="mailto:loic.minier@ubuntu.com" target="_blank">loic.minier@ubuntu.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Yep; but the failure in kpartx didn't seem specific to local vs remote snaps.<div><br></div><div>For people on the list, I followed up on IRC and Yann was running into weird issues with kpartx and ext4 in his environments, but from a clean Ubuntu vm things worked and that's a viable solution for now.</div><div><br></div><div>Cheers,</div><div>- Loïc</div></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On Wed, Aug 31, 2016 at 12:26 PM, Simon Fels <span dir="ltr"><<a href="mailto:simon.fels@canonical.com" target="_blank">simon.fels@canonical.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On 31.08.2016 12:16, Loïc Minier wrote:<br>
> Works for me:<br>
><br>
> $ sudo -E UBUNTU_DEVICE_FLASH_IGNORE_UNS<wbr>TABLE_GADGET_DEFINITION=1<br>
> /snap/bin/ubuntu-device-flash --verbose core 16 -o snappy.img --channel<br>
> edge  --gadget pc --kernel pc-kernel --os ubuntu-core<br>
<br>
</span>Yann is trying to use a gadget snap which isn't in the store but placed<br>
on the local disk. So I suspect he is running something like<br>
<br>
$ sudo -E UBUNTU_DEVICE_FLASH_IGNORE_UNS<wbr>TABLE_GADGET_DEFINITION=1<br>
/snap/bin/ubuntu-device-flash ... --gadget /home/user/my-gadget.snap ...<br>
<br>
regards,<br>
Simon<br>
<span><br>
> Determining gadget configuration<br>
><br>
>  836.00 KB / 836.00 KB [=============================<wbr>=====] 100.00%<br>
> 12.77 MB/s 0<br>
><br>
> Partitioning...<br>
><br>
> Formatting...<br>
><br>
> Mounting...<br>
><br>
> Provisioning...<br>
><br>
>  74.40 MB / 74.40 MB [=============================<wbr>======] 100.00% 24.02<br>
> MB/s 3s<br>
><br>
>  74.40 MB / 74.40 MB [=============================<wbr>======] 100.00% 59.46<br>
> MB/s 1s<br>
><br>
>  110.54 MB / 110.54 MB [=============================<wbr>====] 100.00% 23.19<br>
> MB/s 4s<br>
><br>
>  836.00 KB / 836.00 KB [=============================<wbr>=====] 100.00%<br>
> 68.23 MB/s 0<br>
><br>
> Unmounting...<br>
><br>
> New image complete<br>
><br>
> Summary:<br>
><br>
>  Output: snappy.img<br>
><br>
>  Architecture: amd64<br>
><br>
>  Channel: edge<br>
><br>
>  Version: 0<br>
><br>
><br>
> On Wed, Aug 31, 2016 at 11:11 AM, Yann Sionneau<br>
</span><div><div>> <<a href="mailto:yann.sionneau@parrot.com" target="_blank">yann.sionneau@parrot.com</a> <mailto:<a href="mailto:yann.sionneau@parrot.com" target="_blank">yann.sionneau@parrot.c<wbr>om</a>>> wrote:<br>
><br>
><br>
><br>
>     Le 08/31/2016 à 10:56 AM, Simon Fels a écrit :<br>
>     > On 31.08.2016 10:49, Yann Sionneau wrote:<br>
>     >> Hello,<br>
>     >><br>
>     >> It seems the new (snapp'ed) ubuntu-device-flash cannot use my own gadget<br>
>     >> snap anymore.<br>
>     >><br>
>     >> yann@imperium$ sudo -E /snap/bin/ubuntu-device-flash --verbose core 16<br>
>     >> -o snappy.img --channel edge  --gadget $PWD/../../../xxx_2.0_all.snap<br>
>     >> --kernel ../../../xxx_kernel/xxx-kernel<wbr>_3.10.97_armhf.snap --os<br>
>     >> ubuntu-core --developer-mode --enable-ssh<br>
>     >> cannot use<br>
>     >> "/home/yann/dev/snappy_xxx/too<wbr>ls/snappy/xxx_image/../../../<wbr>xxx_2.0_all.snap",<br>
>     >> must be one of: ["canonical-i386" "canonical-pc" "pc" "canonical-pi2"<br>
>     >> "pi2" "pi3" "canonical-dragon" "dragonboard" "beagleblack" "plano-amd64"]<br>
>     >><br>
>     >> Is porting Snappy on non official devices not supported anymore?<br>
>     > No, that is not the case.<br>
>     ><br>
>     >> How is it supposed to work now? I must confess that I am blocked in my<br>
>     >> work because of this change, I cannot generate nor flash images anymore<br>
>     >> and my project is thus stalled :/<br>
>     > We're currently in a phase where ubuntu-device-flash is still being used<br>
>     > but the future will be a new tool called ubuntu-image which will allow<br>
>     > you to create images in a much better way.<br>
>     Yes I've heard of the new ubuntu-image tool. It's a good idea to make<br>
>     this new tool!<br>
>     It's just important I think that the old tools stay functional until the<br>
>     new ones are ready.<br>
>     ><br>
>     > From what I got from Michael a lot things are currently hard coded<br>
>     > inside ubuntu-device-flash. See [1] for the relevant code bits.<br>
>     ><br>
>     > You can override the sanity check for the gadget names with setting<br>
>     > UBUNTU_DEVICE_FLASH_IGNORE_UNS<wbr>TABLE_GADGET_DEFINITION=1 in the command<br>
>     > line you're executing. Didn't tested this but maybe Michael can comment<br>
>     > how this should work.<br>
>     Ok, the environment variable works, thanks a lot!<br>
>     Now I get this:<br>
><br>
>     error while executing external command mkfs.ext4 -F -L writable<br>
>     /dev/mapper/loop3p2: mke2fs 1.42.13 (17-May-2015)<br>
>     Invalid filesystem option set:<br>
>     has_journal,extent,huge_file,<wbr>flex_bg,metadata_csum,64bit,di<wbr>r_nlink,extra_isize<br>
><br>
>     any idea?<br>
><br>
>     ><br>
>     > regards,<br>
>     > Simon<br>
>     ><br>
>     > [1]:<br>
>     ><br>
>     <a href="https://bazaar.launchpad.net/~mvo/goget-ubuntu-touch/minimal-first-boot-no-prepare-image/view/head:/ubuntu-device-flash/snappy.go#L116" rel="noreferrer" target="_blank">https://bazaar.launchpad.net/<wbr>~mvo/goget-ubuntu-touch/minima<wbr>l-first-boot-no-prepare-image/<wbr>view/head:/ubuntu-device-<wbr>flash/snappy.go#L116</a><br>
>     <<a href="https://bazaar.launchpad.net/~mvo/goget-ubuntu-touch/minimal-first-boot-no-prepare-image/view/head:/ubuntu-device-flash/snappy.go#L116" rel="noreferrer" target="_blank">https://bazaar.launchpad.<wbr>net/~mvo/goget-ubuntu-touch/mi<wbr>nimal-first-boot-no-prepare-im<wbr>age/view/head:/ubuntu-device-<wbr>flash/snappy.go#L116</a>><br>
>     ><br>
><br>
><br>
>     --<br>
>     Snapcraft mailing list<br>
</div></div>>     <a href="mailto:Snapcraft@lists.snapcraft.io" target="_blank">Snapcraft@lists.snapcraft.io</a> <mailto:<a href="mailto:Snapcraft@lists.snapcraft.io" target="_blank">Snapcraft@lists.snapcr<wbr>aft.io</a>><br>
<div><div>>     Modify settings or unsubscribe at:<br>
>     <a href="https://lists.ubuntu.com/mailman/listinfo/snapcraft" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mail<wbr>man/listinfo/snapcraft</a><br>
>     <<a href="https://lists.ubuntu.com/mailman/listinfo/snapcraft" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mai<wbr>lman/listinfo/snapcraft</a>><br>
><br>
><br>
><br>
><br>
> --<br>
> - Loïc<br>
><br>
><br>
<br>
<br>
--<br>
Snapcraft mailing list<br>
<a href="mailto:Snapcraft@lists.snapcraft.io" target="_blank">Snapcraft@lists.snapcraft.io</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/snapcraft" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailm<wbr>an/listinfo/snapcraft</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div data-smartmail="gmail_signature"><div dir="ltr">- Loïc</div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">- Loïc</div></div>
</div>