AntiX 19 – unplugdrive.sh required sudo

Forum Forums New users New Users and General Questions AntiX 19 – unplugdrive.sh required sudo

  • This topic has 10 replies, 3 voices, and was last updated Oct 2-6:57 pm by blur13.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #89994
    Member
    Mad Daimond

      When I click to the unplugdrive.sh icon in toolbar nothing happens, because it required sudo. How I can make it executable without sudo? I am tried to add this line to the sudoers file, but this not help:

      %users ALL= NOPASSWD: /usr/local/bin/unplugdrive.sh

      • This topic was modified 1 year, 9 months ago by Mad Daimond.
      #89996
      Member
      Robin

        Hello Mad Daimond,

        this issue is addressed in several threads in this board already. Please read here, and also this one and that.

        If you miss the translations in unplugdrive after updating to the recommended 0.90 version in antiX 19, please fetch the appropriate .mo locale file for your language from
        Gitlab antiX community contributions, rename it to unplugdrive.sh.mo and copy it into the /usr/share/locale/<your_language_ID_here>/LC_MESSAGES folder. Even when these are the translation files for the antiX 21 version of unplugdrive (which is 0.93b) they will work with the 0.90 version on antiX 19 all the same. The 0.90 version provides all bugfixes and mostly the equal functionallity as 0.93 already, and the very same design also.

        Please be aware the 0.93 versions of unplugdrive can’t run properly on antiX 19, even when it tells you success.

        Obviously the needed environment changes, and the update to the highly recomended most recent antiX 19 version of this script, which is 0.90, along with the fitting language files, didn’t make it into the isos and repos of antiX 19. So you’ll need to manually fix this issue. Apologises for inconveniece.

        @anticapitalista : Please, could you have a look at it and fix this issue in the repos so after apt-upgrading people stop running into this constantly? You’ll need to fix some settings as described to make it work. Let me know if you want me to help you populate the 19.x branch of antiX-goodies with these urgently needed updates and fixes, so not each user will have to fix it on its own any longer.
        And please note, antiX 21 lacks of the updated locale files as it seems, even when present on your gitlab for 10 months already, see Wallons posting + followups. And please remove its outdated .mo file from »es_ES« language, since this stops the recent »es« translation from being applied properly for people from Spain.

        Windows is like a submarine. Open a window and serious problems will start.

        #90002
        Member
        Mad Daimond

          recommended 0.90 version

          When I download the proper 0.90 version, what the right command to give the script all needed permissions? I have made:
          sudo chmod a+x /usr/local/bin/unplugdrive.sh
          the script runs, but all of the content in the script window is grey and non-active.

          #90004
          Member
          Robin

            Please, let us see a screenshot.

            Basically: Whether the script shows greyed out entries or not depends whether there exists a nested mount on this drive, which means: A file (e.g. iso or e.g. linuxfs, homfs or rootfs in antiX live) living on this drive is mounted itself to a mountpoint, so the base drive can’t be unmounted as long these nested mount is not unmounted before.
            This is one of the many bugfixes present in this version. All the other unplugdrive versions before didn’t care for this issue, allowing the user selecting drives which technically can’t get unmounted for some reason.
            So it should not be greyed out for drives other than e.g. the antiX live USB boot medium.

            Permissions should be the same as all other files in the /usr/local/bin folder, which is 755. So your command was probably fine. Owner should be root:root, just like all the other files living there.

            Windows is like a submarine. Open a window and serious problems will start.

            #90005
            Member
            Mad Daimond

              When I work with usual flash drive, then unplugdrive.sh works normal, but when I use the bootable USB drive, this happens:

              Attachments:
              #90011
              Member
              Robin

                Please let me see the output of the commands

                lsblk
                mount

                when typing them into a console window (e.g. roxterm). You can either attach as text file or paste as code directly. In which way did you create the USB Live Stick? Is it the one you boot from, or does it come up this way for you also when a bootable stick is plugged later without using it for boot? I wonder why there are that many mountpoints for this decvice listed, and why your device is named “block” instead of hdx, sdx or nvme0 or whatever. Is there something special in your system setup?
                In the attached screenshot below you can see what it is expected to look like, when a default antiX USB boot stick is present.
                I’ve tested this on a most recently apt-upgraded antiX 19 (32 bit) right now, to make sure no recent update of some helper program has broken the unplugdrive code.
                Btw, you could also run unplugdrive from command line, using the command
                sudo unplugdrive.sh --debug
                and attach here the complete console output it produces on your system.
                Then we will probably find out what is the reason for this strange behaviour you face.

                Windows is like a submarine. Open a window and serious problems will start.

                #90032
                Member
                Mad Daimond

                  Robin, Thank you very much, I think this is not an important problem for me, since there is no needs to put bootable sticks in this laptop. However, there is a much bigger problem for me now https://www.antixforum.com/forums/topic/antix-19-exfat-usb-drives-not-working/

                  #90044
                  Member
                  Robin

                    Well, in case this device named “block” was used for live booting and thus has base files for nested mounts on it, the information you get displayed is correct, in this case it can’t get unmounted simply. You can’t unmount a drive which contains files still mounted to somewhere, that’s why such a drive is greyed out on purpose, and the mount command reveals this.

                    Please let me know whether this is the case here, or whether there was a nested mount detected erroneously (false positiv), then we’d need to trace down and fix this issue. I have never come across this during the extensive testing before.

                    — How does it look like when you plug a second or third USB drive? Are these also greyed out for you?
                    — Try “toram” boot option to see whether the display changes.

                    Windows is like a submarine. Open a window and serious problems will start.

                    #90054
                    Member
                    blur13

                      “Please be aware the 0.93 versions of unplugdrive can’t run properly on antiX 19, even when it tells you success.”

                      Just out of interest, what exactly is it about 0.93b version, run with sudo, that wont work on antix 19? I was using 0.93b for a long time and it seemed to work just fine with USB flash drives. I’m now using 0.90 as you recommend.

                      #90061
                      Member
                      Robin

                        Hello Blur13

                        This is easyly answered:
                        Historically unplugdrive used the pumount tool for executing the unmounting. While systematically bugfixing the script last year, it turned out pumount was unreliable and caused issues when multiple mount points or true spinning drives were involved (Told it was safe to unplug while partitions were still mounted, or while spinning devices were still spinning full speed). Unfortunately all reliable alternative tools require sudo, that is why all the versions from 0.82c up to 0.90 of unplugdrive need sudo.

                        The 0.90 version was originally meant for antiX 21. While discussing the sudo thing, Xecure has found a workaround by creating a special version of the pumount tool to be included in antiX 21. So it was possible to make run the script unsudoed again, but only whith this specially crafted pumount you can run the unplugdrive script safely unsudoed. If this special version is not present, unplugdrive 0.93 series will tell you everything is fine, while actually possibly nothing was done.

                        In antiX 19 there doesn’t exist this special pumount version, so this is why you should not use 0.93 series here.

                        Technically the 0.90 and 0.93b version work identically, following the very same processing flow. Xecure has ported my old-school script code (0.90) to a more modern programming style (0.93) using functions internally instead of loops and branches, without changing functionallity and design. While 0.90 was extensively tested for several months, 0.93 has been knitted with hot needles during few days in order to make it into antiX 21.

                        Single actual difference from perspective of users: 0.93b is able to handle fully luks encrypted drives, while 0.90 can only handle luks encrypted partitions on a drive. The additional code for this is located within Xecures specially crafted pumount version. And as said before, 0.93 can run unudoed and sudoed both, while 0.90 needs sudo. When running sudoed, 0.93b uses the very alternative tools as in 0.90 version, while when running unsudoed it uses pumount again, relying silently on the properly crafted version being present on the system.

                        That’s the whole story.

                        Robin

                        P.S.: When making sure to run 0.93 only and always sudoed it could be possibly fine also on antiX 19, but this was never tested.

                        Windows is like a submarine. Open a window and serious problems will start.

                        #90074
                        Member
                        blur13

                          Thank you for that thorough explanation Robin!

                          I’ve been running 0.93b version in antiX 19, always as sudo, for quite some time, and from my experience it works flawlessly with USB flash drives. So thats at least one data point with regard to testing.

                        Viewing 11 posts - 1 through 11 (of 11 total)
                        • You must be logged in to reply to this topic.