Image building : Model requires system-seed-partition, but no system-seed or system-data partition found

Hi,

Well I am working on building an ubuntu core image 20 and whenever I specify my custom gadget snap and the kernel for armhf architecture, snapd and the base, I get an error saying that Model requires system-seed-partition, but no system-seed or system-data partition found. This error does not appear when I do not specify all my snaps through snap: argument.

Thanks.

make sure your gadget.yaml has a boot partition with role: system-seed defined …

Yes, so that means that system-data needs also to be specified, how can we do that, thanks.

take a look at the pi reference gadget for example …

So I adapted my case to this but it says that non-empty uboot.env is not supported on UC20 yet so am I obliged to use UC18 for my board knowing that I had issues with getty with UC18 and that was fixed on UC20

Is it even possible to build UC20 image for armhf device other than raspberrypi ?

Are you asking whether there are other armhf reference boards? AFAIU the reference gadgets and images are only provided for x86-64 and Raspberry Pi (armhf and aarch64).

Yes my question is : Is there any way to build an UC20 image for my case it is a sabresd board ? I found an example of sabrelite gadget snap and model assertion done by Mr ogra with UC18 I managed to build the image but Getty did not really work and interrupted the boot sequence and then I tested UC20, It doesn’t have getty launch problem anymore but struggles with a snap binary that is missing. So after network configuration I can’t boot. Any toughts or recommandations to just “boot” ?

I don’t have any recommendation for the gadgets. However, can you provide more details on the problem with UC20? Do you have any logs?

Yes, here’s the problem logs:

    Starting Permit User Sessions...

[ OK ] Finished Start the snapd services from the snapd snap. Starting Wait until snapd is fully seeded… [FAILED] Failed to start Wait until snapd is fully seeded. See ‘systemctl status snapd.seeded.service’ for details. [DEPEND] Dependency failed for Unit to stop systemd-bootchart. [ OK ] Finished Permit User Sessions. [ OK ] Started Getty on tty1. [ OK ] Started Serial Getty on ttymxc0. [ OK ] Reached target Login Prompts.

/usr/share/subiquity/console-conf-wrapper: line 32: snap: command not found Press enter to configure. Traceback (most recent call last): File “/usr/lib/python3/dist-packages/urllib3/connectionpool.py”, line 665, in urlopen httplib_response = self._make_request( File “/usr/lib/python3/dist-packages/urllib3/connectionpool.py”, line 387, in _make_request conn.request(method, url, **httplib_request_kw) File “/usr/lib/python3.8/http/client.py”, line 1256, in request self._send_request(method, url, body, headers, encode_chunked) File “/usr/lib/python3.8/http/client.py”, line 1302, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File “/usr/lib/python3.8/http/client.py”, line 1251, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File “/usr/lib/python3.8/http/client.py”, line 1011, in _send_output self.send(msg) File “/usr/lib/python3.8/http/client.py”, line 951, in send self.connect() File “/usr/lib/python3/dist-packages/requests_unixsocket/adapters.py”, line 41, in connect sock.connect(socket_path) FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “/usr/lib/python3/dist-packages/requests/adapters.py”, line 439, in send resp = conn.urlopen( File “/usr/lib/python3/dist-packages/urllib3/connectionpool.py”, line 719, in urlopen retries = retries.increment( File “/usr/lib/python3/dist-packages/urllib3/util/retry.py”, line 400, in increment raise six.reraise(type(error), error, _stacktrace) File “/usr/lib/python3/dist-packages/six.py”, line 702, in reraise raise value.with_traceback(tb) File “/usr/lib/python3/dist-packages/urllib3/connectionpool.py”, line 665, in urlopen httplib_response = self._make_request( File “/usr/lib/python3/dist-packages/urllib3/connectionpool.py”, line 387, in _make_request conn.request(method, url, **httplib_request_kw) File “/usr/lib/python3.8/http/client.py”, line 1256, in request self._send_request(method, url, body, headers, encode_chunked) File “/usr/lib/python3.8/http/client.py”, line 1302, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File “/usr/lib/python3.8/http/client.py”, line 1251, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File “/usr/lib/python3.8/http/client.py”, line 1011, in _send_output self.send(msg) File “/usr/lib/python3.8/http/client.py”, line 951, in send self.connect() File “/usr/lib/python3/dist-packages/requests_unixsocket/adapters.py”, line 41, in connect sock.connect(socket_path) urllib3.exceptions.ProtocolError: (‘Connection aborted.’, FileNotFoundError(2, ‘No such file or directory’))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “/usr/bin/console-conf”, line 11, in load_entry_point(‘subiquity==0.0.5’, ‘console_scripts’, ‘console-conf-tui’)() File “/usr/share/subiquity/console_conf/cmd/tui.py”, line 86, in main interface.run() File “/usr/share/subiquity/subiquitycore/core.py”, line 488, in run self.urwid_loop.run() File “/usr/lib/python3/dist-packages/urwid/main_loop.py”, line 286, in run self._run() File “/usr/lib/python3/dist-packages/urwid/main_loop.py”, line 384, in _run self.event_loop.run() File “/usr/lib/python3/dist-packages/urwid/main_loop.py”, line 1484, in run reraise(*exc_info) File “/usr/lib/python3/dist-packages/urwid/compat.py”, line 58, in reraise raise value File “/usr/lib/python3.8/asyncio/events.py”, line 81, in _run self._context.run(self._callback, *self._args) File “/usr/lib/python3/dist-packages/urwid/raw_display.py”, line 403, in wrapper = lambda: self.parse_input( File “/usr/lib/python3/dist-packages/urwid/raw_display.py”, line 502, in parse_input callback(processed, processed_codes) File “/usr/lib/python3/dist-packages/urwid/main_loop.py”, line 411, in _update self.process_input(keys) File “/usr/lib/python3/dist-packages/urwid/main_loop.py”, line 511, in process_input k = self._topmost_widget.keypress(self.screen_size, k) File “/usr/lib/python3/dist-packages/urwid/wimp.py”, line 648, in keypress return self._current_widget.keypress(size, key) File “/usr/share/subiquity/subiquitycore/ui/container.py”, line 178, in keypress upkey = self.focus.keypress(tsize, downkey) File “/usr/share/subiquity/subiquitycore/view.py”, line 107, in keypress key = super().keypress(size, key) File “/usr/lib/python3/dist-packages/urwid/decoration.py”, line 622, in keypress return self._original_widget.keypress(maxvals, key) File “/usr/share/subiquity/subiquitycore/ui/container.py”, line 178, in keypress upkey = self.focus.keypress(tsize, downkey) File “/usr/share/subiquity/subiquitycore/ui/container.py”, line 178, in keypress upkey = self.focus.keypress(tsize, downkey) File “/usr/lib/python3/dist-packages/urwid/decoration.py”, line 622, in keypress return self._original_widget.keypress(maxvals, key) File “/usr/share/subiquity/subiquitycore/ui/container.py”, line 178, in keypress upkey = self.focus.keypress(tsize, downkey) File “/usr/lib/python3/dist-packages/urwid/wimp.py”, line 540, in keypress self._emit(‘click’) File “/usr/lib/python3/dist-packages/urwid/widget.py”, line 460, in _emit signals.emit_signal(self, name, self, *args) File “/usr/lib/python3/dist-packages/urwid/signals.py”, line 265, in emit result |= self._call_callback(callback, user_arg, user_args, args) File “/usr/lib/python3/dist-packages/urwid/signals.py”, line 295, in _call_callback return bool(callback(*args_to_pass)) File “/usr/share/subiquity/subiquitycore/ui/views/network.py”, line 422, in done self.controller.done() File “/usr/share/subiquity/subiquitycore/controllers/network.py”, line 214, in done self.app.next_screen() File “/usr/share/subiquity/subiquitycore/core.py”, line 310, in next_screen self._move_screen(1) File “/usr/share/subiquity/subiquitycore/core.py”, line 302, in _move_screen self.select_screen(new) File “/usr/share/subiquity/subiquitycore/core.py”, line 279, in select_screen new.start_ui() File “/usr/share/subiquity/console_conf/controllers/identity.py”, line 152, in start_ui if get_managed(): File “/usr/share/subiquity/console_conf/controllers/identity.py”, line 58, in get_managed return con.get(‘v2/system-info’).json()[‘result’][‘managed’] File “/usr/share/subiquity/subiquitycore/snapd.py”, line 48, in get return self.session.get(self.url_base + path, timeout=60) File “/usr/lib/python3/dist-packages/requests/sessions.py”, line 546, in get return self.request(‘GET’, url, **kwargs) File “/usr/lib/python3/dist-packages/requests/sessions.py”, line 533, in request resp = self.send(prep, **send_kwargs) File “/usr/lib/python3/dist-packages/requests/sessions.py”, line 646, in send r = adapter.send(request, **kwargs) File “/usr/lib/python3/dist-packages/requests/adapters.py”, line 498, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: (‘Connection aborted.’, FileNotFoundError(2, ‘No such file or directory’))

I am thinking of trying to build the snap command binary for the board architecture but I guess that adding that binary to the rootfs wouldn’t be efficient

This looks confusing. The snap(d) binaries are part of the snapd snap which, early in the boot process is set up in a way that /usr/lib/snapd contains all the relevant files, while /usr/bin/snap from the base snap points at the right snap binary. Looking at the log it seems there’s no snapd snap, or it didn’t get mounted or something else is wrong, but it hard to say what.

the system failed seeding, so the snapd snap does not get installed, as fallout console-conf fails because the snap command shipped by the snapd snap is not available …

either your gadget or your model are most likely wrong/broken so that the seeding can not finish …

Hi, thank you for your responses. I managed to boot ubuntu core 16 with the pc-kernel 18 that I took from an UC 18 image that I built and your snap_core that I found on this link https://people.canonical.com/~ogra/snappy/all-snaps/ but It would be perfect if I can build a decent image with UC18 or even 20. Here’s the elements I am currently using to build the images :

and here the gadget.yaml that I am using : yaml-gad
and the snapcraft.yaml :

I have another question which is why does nothing arrive to the pc-kernel folder after image building once I pick to choose the pc-kernel=20 in my model assertion ?

Thanks !

UC20 kernel/gadget are incompatible with UC16 and UC18. AFAICT with pc-kernel=20 you will not even get a bootable system, as 16/18 bootloader expects a a split kernel/initrd iamges, while in 20 there’s a single EFI file (as far as the pc-kernel is considered).

Ok, so is there any way or a procedure to follow in order to build an UC20/22 for an armhf board ? Or just a way to generate the latest kernel/dtbs/initrd for the board. Thanks !