UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    How to Get LXD Running on Ubuntu Touch (Focal & Noble)

    Scheduled Pinned Locked Moved General
    5 Posts 2 Posters 190 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • arubislanderA Offline
        arubislander
        last edited by arubislander

        How to Get LXD Running on Ubuntu Touch (Focal & Noble)

        Here's a rough walkthrough on getting LXD running on UT based on my experience.

        If you're on Ubuntu Touch Focal, you’ll need to enable snap support first. Install Snapz0r from the Open Store, run it and initialize snap support. If you're on Noble you can skip this step, since snap support is already enabled.

        Next, install LXD. I used version 5.21 specifically, because newer versions gave me trouble on the JingPad. You can install it like this:

        $ sudo snap install lxd --channel=5.21/stable
        

        Once LXD is installed, initialize it with:

        $ sudo lxd init
        

        Accept all the defaults except for the storage backend. When prompted, choose dir instead of zfs, which tends to be problematic in this environment.

        After that, you need to adjust the default profile to allow nested containers and privileged access:

        $ sudo lxc profile set default security.nesting true
        $ sudo lxc profile set default security.privileged true
        

        Now you can launch your first container. For example, to create one based on Ubuntu Noble:

        $ sudo lxc launch ubuntu:noble noble-1
        

        Wait for the container to boot. You can check its status with:

        $ sudo lxc list
        

        Once it's up, you can enter the container with:

        $ sudo lxc exec noble-1 -- bash
        

        At this point, you should be inside a fully functional Ubuntu container running on Ubuntu Touch.

        πŸ‡¦πŸ‡Ό πŸ‡³πŸ‡± πŸ‡ΊπŸ‡Έ πŸ‡ͺπŸ‡Έ
        Happily running Ubuntu Touch
        Google Pixel 3a (24.04 preview)
        JingPad (24.04 preview)
        PinePhone OG (20.04)
        Meizu Pro 5 (16.04 DEV)

        1 Reply Last reply Reply Quote 2
        • H Offline
          harrisonpatm
          last edited by

          Unfortunately, didn't work for me. Snapz0r ran and rebooted the device, but afterwords snap still wasn't enabled. Mounting root to rw and attempting to install snapd via apt also didn't work, I'm assuming because of dependency issues and/or not enough space on the small root partition. Thanks though.

          arubislanderA 1 Reply Last reply Reply Quote 0
          • arubislanderA Offline
            arubislander @harrisonpatm
            last edited by arubislander

            @harrisonpatm said in How to Get LXD Running on Ubuntu Touch (Focal & Noble):

            Unfortunately, didn't work for me. Snapz0r ran and rebooted the device, but afterwords snap still wasn't enabled.

            This is on your Pixel 3a XL? And you are running an unmodified Focal (i.e. no additional packages installed via apt on the rootfs)?

            πŸ‡¦πŸ‡Ό πŸ‡³πŸ‡± πŸ‡ΊπŸ‡Έ πŸ‡ͺπŸ‡Έ
            Happily running Ubuntu Touch
            Google Pixel 3a (24.04 preview)
            JingPad (24.04 preview)
            PinePhone OG (20.04)
            Meizu Pro 5 (16.04 DEV)

            H 1 Reply Last reply Reply Quote 0
            • H Offline
              harrisonpatm @arubislander
              last edited by

              @arubislander Nope, I have added a few apt packages already. And honestly I'm probably about to reinstall from scratch, so I'm sure I'll give this another try.

              arubislanderA 1 Reply Last reply Reply Quote 0
              • arubislanderA Offline
                arubislander @harrisonpatm
                last edited by

                @harrisonpatm Please do! And let us know how you get on.

                πŸ‡¦πŸ‡Ό πŸ‡³πŸ‡± πŸ‡ΊπŸ‡Έ πŸ‡ͺπŸ‡Έ
                Happily running Ubuntu Touch
                Google Pixel 3a (24.04 preview)
                JingPad (24.04 preview)
                PinePhone OG (20.04)
                Meizu Pro 5 (16.04 DEV)

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post