On 02/16/2017 05:20 PM, Barry Warsaw wrote:
Hi Kyle,

On Feb 16, 2017, at 04:44 PM, knitzsche wrote:

I had been (with 0.14 snap) building the image and saving to file with -o
my.img

Then mounting the img partitions with (as root):

kpartx -a my.img
loopmnt=`findfs LABEL=writable`
mount $loopmtn DIR

With 0.15, that mount fails with a Kill message.

Can you provide the exact failure you're seeing?  What version of Ubuntu are
you on?  It works for me on Zesty:

* xenial
* my model points at branded store that contains learnit snap
* I add three snaps to the image via --extra-snaps

ubuntu-image \
    --channel stable \
    -o $image_name \ (LOWERCASE -o)
    --image-size 4G \
    --extra-snaps  pi2-kernel_26.snap \ this is local
    --extra-snaps  pi2_36.snap \ local
--extra-snaps learnit \ from branded store into which it is whitelisted via store admin
    $model

=== snap experience

$ sudo kpartx -a test-learnit.img
[sudo] password for knitzsche:
$ findfs LABEL=writable
/dev/mapper/loop4p2
$ sudo mount /dev/mapper/loop4p2 mnt
Killed
$

That does not happen with the ubuntu-image from deb on xenial (see below)

$ snap info ubuntu-image
name:      ubuntu-image
summary:   "Create Ubuntu images"
publisher: canonical
description: |
  Use this tool to create Ubuntu images.

commands:
  - ubuntu-image
tracking:  beta
installed: 0.15+snap3 (48) 17MB devmode
refreshed: 2017-02-15 15:05:38 -0500 EST
channels:
  beta:    0.15+snap3 (48) 17MB devmode
  edge:    0.15+snap3 (48) 17MB devmode

===== deb experience

$ sudo kpartx -a test-learnitdeb.img
[sudo] password for knitzsche:
$ findfs LABEL=writable
/dev/mapper/loop2p2
$ sudo mount /dev/mapper/loop2p2 mnt
$ ls mnt
lost+found  system-data

$ apt policy ubuntu-image
ubuntu-image:
  Installed: 0.14+16.04ubuntu2
  Candidate: 0.14+16.04ubuntu2
  Version table:
 *** 0.14+16.04ubuntu2 500
500 http://us.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages 500 http://us.archive.ubuntu.com/ubuntu xenial-updates/universe i386 Packages
        100 /var/lib/dpkg/status

cheers




% snap install ubuntu-image --devmode --beta
ubuntu-image (beta) 0.15+snap3 from 'canonical' installed
% ubuntu-image -O . models/pc-amd64-model.assertion
Fetching core
Fetching pc-kernel
Fetching pc
Partition size/offset need to be a multiple of sector size (512).  The 
size/offset will be rounded up to the nearest sector.
% sudo kpartx -a pc.img
% loopmnt=`findfs LABEL=writable`
% sudo mount $loopmnt mnt
% ls mnt
lost+found/  system-data/

Cheers,
-Barry


--
Devices mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.snapcraft.io/mailman/listinfo/devices

Reply via email to