A default image on firstboot doesn't have a lot of tools available, and I'm not sure how to modify that at image-build time... so I have only very limited information about what exactly it's doing. It might not be key generation after all though... I don't recall seeing it for a while, but today I caught it hanging for 10 minutes on rpi3. Mar 22 16:08:14 localhost /usr/lib/snapd/snapd[1179]: taskrunner.go:353: DEBUG: Running task 26 on Do: Make snap "pi3" (6) available to the system Mar 22 16:08:14 localhost /usr/lib/snapd/snapd[1179]: taskrunner.go:353: DEBUG: Running task 27 on Do: Setup snap "pi3" (6) security profiles (phase 2) Mar 22 16:08:14 localhost /usr/lib/snapd/snapd[1179]: taskrunner.go:353: DEBUG: Running task 32 on Do: Generate device key Mar 22 16:08:14 localhost /usr/lib/snapd/snapd[1179]: taskrunner.go:353: DEBUG: Running task 28 on Do: Set automatic aliases for snap "pi3" --- blocked here --- Mar 22 16:18:18 localhost /usr/lib/snapd/snapd[1179]: daemon.go:176: DEBUG: uid=1000;@ GET /v2/system-info 9m49.567409367s 200 Mar 22 16:18:18 localhost /usr/lib/snapd/snapd[1179]: taskrunner.go:353: DEBUG: Running task 29 on Do: Setup snap "pi3" aliases Mar 22 16:18:18 localhost /usr/lib/snapd/snapd[1179]: taskrunner.go:353: DEBUG: Running task 33 on Do: Request device serial At 16:08:28 a script logged in via ssh and tried to run "snap version", which blocked for 10 minutes. But in this case it looks like maybe the key generation was already complete. Anyway, here's the rest of syslog from the time between snapd entries: Mar 22 16:08:24 localhost rsyslogd-2007: action 'action 11' suspended, next retry is Wed Mar 22 16:08:54 2017 [v8.16.0 try http://www.rsyslog.com/e/2007 ] Mar 22 16:08:25 localhost systemd[1]: Created slice User Slice of qa. Mar 22 16:08:25 localhost systemd[1]: Starting User Manager for UID 1000... Mar 22 16:08:25 localhost systemd[1]: Started Session 1 of user qa. Mar 22 16:08:25 localhost systemd[1721]: Reached target Sockets. Mar 22 16:08:25 localhost systemd[1721]: Reached target Paths. Mar 22 16:08:25 localhost systemd[1721]: Reached target Timers. Mar 22 16:08:25 localhost systemd[1721]: Reached target Basic System. Mar 22 16:08:25 localhost systemd[1721]: Reached target Default. Mar 22 16:08:25 localhost systemd[1721]: Startup finished in 691ms. Mar 22 16:08:25 localhost systemd[1]: Started User Manager for UID 1000. Mar 22 16:08:26 localhost systemd[1]: Stopping User Manager for UID 1000... Mar 22 16:08:26 localhost systemd[1721]: Reached target Shutdown. Mar 22 16:08:26 localhost systemd[1721]: Starting Exit the Session... Mar 22 16:08:26 localhost systemd[1721]: Stopped target Default. Mar 22 16:08:26 localhost systemd[1721]: Stopped target Basic System. Mar 22 16:08:26 localhost systemd[1721]: Stopped target Paths. Mar 22 16:08:26 localhost systemd[1721]: Stopped target Sockets. Mar 22 16:08:26 localhost systemd[1721]: Stopped target Timers. Mar 22 16:08:26 localhost systemd[1721]: Received SIGRTMIN+24 from PID 1737 (kill). Mar 22 16:08:26 localhost systemd[1]: Stopped User Manager for UID 1000. Mar 22 16:08:26 localhost systemd[1]: Removed slice User Slice of qa. Mar 22 16:08:26 localhost systemd[1]: Created slice User Slice of qa. Mar 22 16:08:26 localhost systemd[1]: Starting User Manager for UID 1000... Mar 22 16:08:27 localhost systemd[1]: Started Session 2 of user qa. Mar 22 16:08:27 localhost systemd[1749]: Reached target Timers. Mar 22 16:08:27 localhost systemd[1749]: Reached target Paths. Mar 22 16:08:27 localhost systemd[1749]: Reached target Sockets. Mar 22 16:08:27 localhost systemd[1749]: Reached target Basic System. Mar 22 16:08:27 localhost systemd[1749]: Reached target Default. Mar 22 16:08:27 localhost systemd[1749]: Startup finished in 629ms. Mar 22 16:08:27 localhost systemd[1]: Started User Manager for UID 1000. Mar 22 16:08:27 localhost systemd[1]: Stopping User Manager for UID 1000... Mar 22 16:08:27 localhost systemd[1749]: Stopped target Default. Mar 22 16:08:27 localhost systemd[1749]: Stopped target Basic System. Mar 22 16:08:27 localhost systemd[1749]: Reached target Shutdown. Mar 22 16:08:27 localhost systemd[1749]: Stopped target Timers. Mar 22 16:08:27 localhost systemd[1749]: Stopped target Paths. Mar 22 16:08:27 localhost systemd[1749]: Starting Exit the Session... Mar 22 16:08:27 localhost systemd[1749]: Stopped target Sockets. Mar 22 16:08:27 localhost systemd[1749]: Received SIGRTMIN+24 from PID 1767 (kill). Mar 22 16:08:27 localhost systemd[1]: Stopped User Manager for UID 1000. Mar 22 16:08:27 localhost systemd[1]: Removed slice User Slice of qa. Mar 22 16:08:28 localhost systemd[1]: Created slice User Slice of qa. Mar 22 16:08:28 localhost systemd[1]: Starting User Manager for UID 1000... Mar 22 16:08:28 localhost systemd[1]: Started Session 3 of user qa. Mar 22 16:08:28 localhost systemd[1776]: Reached target Timers. Mar 22 16:08:28 localhost systemd[1776]: Reached target Sockets. Mar 22 16:08:28 localhost systemd[1776]: Reached target Paths. Mar 22 16:08:28 localhost systemd[1776]: Reached target Basic System. Mar 22 16:08:28 localhost systemd[1776]: Reached target Default. Mar 22 16:08:28 localhost systemd[1776]: Startup finished in 619ms. Mar 22 16:08:28 localhost systemd[1]: Started User Manager for UID 1000. Mar 22 16:17:02 localhost rsyslogd-2007: action 'action 11' suspended, next retry is Wed Mar 22 16:17:32 2017 [v8.16.0 try http://www.rsyslog.com/e/2007 ] Mar 22 16:17:02 localhost CRON[1799]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly) Mar 22 16:17:32 localhost rsyslogd-2007: action 'action 11' suspended, next retry is Wed Mar 22 16:18:02 2017 [v8.16.0 try http://www.rsyslog.com/e/2007 ] Mar 22 16:17:32 localhost systemd[1]: Started Session 5 of user qa. Mar 22 16:18:02 localhost rsyslogd-2007: action 'action 11' suspended, next retry is Wed Mar 22 16:18:32 2017 [v8.16.0 try http://www.rsyslog.com/e/2007 ] 16:17 is when I noticed and logged in to see what was happening.