Is it possible to detect if ubuntu core system is running its first boot?

Hi , I want to do a certain process only during its first boot. How i can detect that it is the first boot?

is it from snapd changes?

There’s a few options available if you’re using a custom gadget snap:

  1. Add a prepare-device hook to your gadget.
  2. Add a cloud.conf file to your gadget with content something like:
    datasource_list: [NoCloud]
      - /snap/mygadget/current/
    This would then run a script bundled as part of the gadget snap on init.
1 Like