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

    Idea: overlayfs for user terminal

    Scheduled Pinned Locked Moved OS
    9 Posts 4 Posters 78 Views 3 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.
      • pparentP Offline
        pparent
        last edited by pparent

        Hi,

        I think that not being able to install packages with apt in terminal can be frustrating for many new users who expect to escape a locked-down environment like Android, and find complete freedom in Ubuntu Touch. And somehow the first thing we tell them is that they should not do apt commands, it can be frustrating for newcomers and give the impression that it's actually another locked-down system. And we may loose users that way.

        The read-only filesystem is a very valid strategy to avoid breaking the system with a few commands.

        I would like to propose an idea to keep the main filesystem read only, while allowing the user to play freely in the terminal without risking to break the rest of the system:

        Why not mount an overlayfs over "/" and pivot_root in the environment of the user terminal? Like this the user could do whatever they want in their terminal without any risk of breaking the rest of the system (the overlay would not apply outside of the user terminal). On top of that it would reduce the tendency of advanced users (or not so advanced) to remount rw the filesystem to install small utilities with apt. It would also allow for more experimentation on the system with the possibility of a reset at any moment. And it could allow to install deb with less restriction on partition size as the overlay could use more space than the original system partition.

        D 1 Reply Last reply Reply Quote 0
        • D Offline
          domubpkm @pparent
          last edited by

          @pparent Any idea is good to study.
          Non-specialist question:
          How would this differ from the Libertine environment?
          This would be more secure and less resource consumer ?

          pparentP 1 Reply Last reply Reply Quote 0
          • pparentP Offline
            pparent @domubpkm
            last edited by pparent

            @domubpkm said in Idea: overlayfs for user terminal:

            How would this differ from the Libertine environment?

            To be honest I don't know much about Libertine. But it differs in that you would be able to simply open the terminal and start apt without more overhead, and needing to get used to new concepts like libertine containers.

            And for a newcomer it makes the whole difference. You would not need to explain them first why then can't do apt install, and why they need to do complicated things with libertine, with many chances to get them frustrated in the way. If you look at videos of people discovering Ubuntu Touch, more often than not, when they see the terminal the first thing they want to do is apt install

            Even I that use the system for more than 6 years, and develop applications for it, never use Libertine, cos it's just too much headache.

            G 1 Reply Last reply Reply Quote 0
            • pparentP Offline
              pparent
              last edited by pparent

              For example Openwrt (Linux distributions for routers) uses this concept of overlayfs to allow the user to modify the image while keeping the original filesystem intact so that we can reset the router at any moment. It works extremely well.

              Although what I propose would be slightly different as the overlay would only apply to the user terminal context, and would not affect the system outside of this terminal scope. (And possibly remote access to the terminal via adb/ssh)

              D 1 Reply Last reply Reply Quote 0
              • D Offline
                domubpkm @pparent
                last edited by

                @pparent Thanks. your idea is surely worth asking and developing in the next Q&A.

                1 Reply Last reply Reply Quote 0
                • G Online
                  gpatel-fr @pparent
                  last edited by

                  @pparent said in Idea: overlayfs for user terminal:

                  to do complicated things with libertine

                  if the goal is installing small utilities, and you know about apt update and apt install, all that is needed is to learn to do things like

                  libertine-container-manager install-package -p ncdu
                  libertine-container-manager install-package -p fdisk
                  libertine-container-manager install-package -p apt-file

                  and then

                  libertine-launch -i noble bash

                  to actually use the installed packages.

                  ikozI pparentP 2 Replies Last reply Reply Quote 0
                  • ikozI Offline
                    ikoz @gpatel-fr
                    last edited by

                    @gpatel-fr These small utilities can installed with nix or just copy the executable from the .deb to .local/bin.

                    May the source be with you

                    G 1 Reply Last reply Reply Quote 0
                    • G Online
                      gpatel-fr @ikoz
                      last edited by gpatel-fr

                      @ikoz said in Idea: overlayfs for user terminal:

                      just copy the executable from the .deb to .local/

                      actually even an utility like ncdu requires a library, unless one downloads a self contained executable from the author's site, but that's not the case for the Ubuntu generated binary. Fiddling with LD_LOAD is more complicated than libertine-container-manager IMO.

                      Edit: I forgot to say that your approach requires also to apt-download, mkdir, dpkg --extract, cp. It's pushing a bit far the hate of new technology (new as of 2008 in the case of containers).

                      1 Reply Last reply Reply Quote 0
                      • pparentP Offline
                        pparent @gpatel-fr
                        last edited by pparent

                        @gpatel-fr said in Idea: overlayfs for user terminal:

                        @pparent said in Idea: overlayfs for user terminal:

                        to do complicated things with libertine

                        if the goal is installing small utilities, and you know about apt update and apt install, all that is needed is to learn to do things like

                        libertine-container-manager install-package -p ncdu
                        libertine-container-manager install-package -p fdisk
                        libertine-container-manager install-package -p apt-file

                        and then

                        libertine-launch -i noble bash

                        to actually use the installed packages.

                        I'm sorry but this is way too complicated for a newcomer that just wants to feel at home by using apt, and that first needs to understand the concept that they can't apt and the concept of Libertine before running these commands. Same applies for "just copy the executable from the .deb to .local/" .

                        By the way the review from @theprivacydad mentions this complexity for a new user of geting used to new concepts and viarous software sources ( Libretine, Waydroid, snap, openstore)

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