Mounting ISO files on AntiX

Forum Forums New users New Users and General Questions Mounting ISO files on AntiX

  • This topic has 9 replies, 2 voices, and was last updated Nov 6-10:43 pm by Anonymous.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #69951
    Anonymous

      Still on AntiX 19.4.

      I was trying to mount an ISO CD/DVD image file as normal user using this command:
      udevil mount /path/to/iso_file ~/mounts
      Got this error:
      udevil: denied 71: '/home/$USER' is not an allowed media directory

      Did a search, found that it’s related to udevil.conf parameter “allowed_media_dirs”. Indeed, $HOME is not listed in this parameter by default. So I tried first mounting in /media/$USER, which is included. Got:
      udevil: denied 71: '/media' is not an allowed media directory
      WTH!? Certainly /media is not included in AntiX version, yet it is in upstream udevil.conf; but if I’m specifying /media/$USER, why is it complaining about /media?

      Worse: I tried using the mounting command, but this time without mounting point parameter at all. Result: it did succeed, by using /dev/loop0 as device, and mounting it in /media/demo/iso_name anyway?

      I fail to understand.
      Could someone help understanding this?

      Thanks beforehand.

      Just additional note.
      I also tried mounting ISO with SpaceFM, by right-click -> mount.
      It does succeed, with some characteristics: uses fuseiso instead, and mounts it in a sub-directory under ~/.cache.
      By taking a look at its command line, it seems it does try first udevil, but I think since it’s default restricted in udevil.conf (see above), it fails and resorts to fuseiso.

      Thanks again.

      #69982
      Member
      Xecure
        Helpful
        Up
        0
        ::

        No problem here on antiX 21

        $ udevil mount '/home/pc/Downloads/void-live-x86_64-20210218.iso' 
        Mounted /home/pc/Downloads/void-live-x86_64-20210218.iso at /media/pc/void-live-x86_64-20210218.iso

        I may have time to test on antiX 19 later today.

        antiX Live system enthusiast.
        General Live Boot Parameters for antiX.

        #70102
        Anonymous
          Helpful
          Up
          0
          ::

          @Xecure:
          That’s exactly what I meant with this:

          Worse: I tried using the mounting command, but this time without mounting point parameter at all. Result: it did succeed, by using /dev/loop0 as device, and mounting it in /media/demo/iso_name anyway?

          Though I may have not explained myself well, as always… sorry

          #70145
          Member
          Xecure
            Helpful
            Up
            0
            ::

            Sorry ctcx. I didn’t read your post properly. I was not paying proper attention and missed you mentioning mounting without a mount point path.

            You are right. Based on /etc/udevil/udevil.conf, the only valid mountpoint directories are:
            allowed_media_dirs = /media/$USER, /run/media/$USER

            If you want to mpunt the ISO in $HOME/mount-point, add /home/$USER as a valid path to this variable above and you should be able to mount the ISO in ~/mounts.

            So I mounted it in ~/mounts after changing the variable above and saving the /etc/udevil/udevil.conf file, getting this result:

            $ udevil mount '/home/pc/Downloads/antiX-21-runit_x64-full.iso' ~/mounts
            Mounted /home/pc/Downloads/antiX-21-runit_x64-full.iso at /home/pc/mounts

            I hope this helps.

            antiX Live system enthusiast.
            General Live Boot Parameters for antiX.

            #70166
            Anonymous
              Helpful
              Up
              0
              ::

              So, also now on AntiX 21.

              I have udevil.conf as default. If /media/$USER is included as valid mount point, why does it complain with /media not being valid? Yes, /media is not directly specified there, but I’m trying using /media/$USER, and on top of this, isn’t it a sub-directory of /media itself?

              Also, why does zzzFM, just like SpaceFM, fail to mount with udevil by default, and has to use fuseiso?

              Thanks.

              #70173
              Member
              Xecure
                Helpful
                Up
                0
                ::

                allowed_media_dirs = /media/$USER, /run/media/$USER
                Meaning you can create mountpoints INSIDE those paths.

                $ udevil mount '/path/to/iso-file.iso' /media/$USER/mount-point
                Nothing above or below. Just a mount point INSIDE the allowed paths.

                Also, why does zzzFM, just like SpaceFM, fail to mount with udevil by default, and has to use fuseiso?

                This is probably related to the configuration to “Mount ISO” inside zzzfm (that it inherited from SpaceFM). The code for “Mount ISO” is:

                # Note: Unmounting of iso files is performed by the fuseiso or udevil device
                # handler, not this file handler.
                
                # Use fuseiso or udevil ?
                fuse="$(which fuseiso)"  # remove this line to use udevil only
                if [[ -z "$fuse" ]]; then
                    udevil="$(which udevil)"
                    if [[ -z "$udevil" ]]; then
                        echo "You must install fuseiso or udevil to mount ISOs with this handler."
                        exit 1
                    fi
                    # use udevil - attempt mount
                    uout="$($udevil mount "$fm_file" 2>&1)"
                    err=$?; echo "$uout"
                    if [ $err -eq 2 ]; then
                        # is file already mounted? (english only)
                        point="${uout#* is already mounted at }"
                        if [ "$point" != "$uout" ]; then
                            point="${point% (*}"
                            if [ -x "$point" ]; then
                                zzzfm -t "$point"
                                exit 0
                            fi
                        fi
                    fi
                    [[ $err -ne 0 ]] && exit 1
                    point="${uout#Mounted }"
                    [[ "$point" = "$uout" ]] && exit 0
                    point="${point##* at }"
                    [[ -d "$point" ]] && zzzfm "$point" &
                    exit 0
                fi
                # use fuseiso - is file already mounted?
                canon="$(readlink -f "$fm_file" 2>/dev/null)"
                if [ -n "$canon" ]; then
                    canon_enc="${canon// /\\040}" # encode spaces for mtab+grep
                    if grep -q "^$canon_enc " ~/.mtab.fuseiso 2>/dev/null; then
                        # file is mounted - get mount point
                        point="$(grep -m 1 "^$canon_enc " ~/.mtab.fuseiso \
                                 | sed 's/.* \(.*\) fuseiso .*/\1/' )"
                    if [ -x "$point" ]; then
                            zzzfm "$point" &
                            exit
                        fi
                    fi
                fi
                # mount & open
                fuseiso %f %a && zzzfm %a &

                You can edit the behavior of Mount ISO by:
                right-click a ISO file, navigate the menu to “Open > Mount ISO” but RIGHT click it instead of left clicking it. It will open a window for you to edit the Mount ISO code.

                Go to the line that says
                fuse="$(which fuseiso)" # remove this line to use udevil only
                and comment it out. Save and try mounting an ISO again. It will default to udevil.

                antiX Live system enthusiast.
                General Live Boot Parameters for antiX.

                #70184
                Anonymous
                  Helpful
                  Up
                  0
                  ::

                  @Xecure:
                  Thanks very much for helping with the “allowed media dirs” issue. That clarified things much better.

                  Regarding zzzFM, I already had seen all of that, including the full code; I think I just failed to 100% understand the code…
                  I better give it a more deep try again.

                  Thanks sir.

                  #70261
                  Anonymous
                    Helpful
                    Up
                    0
                    ::

                    Reviewed script better and did tests on AntiX 21.

                    Overall, script seems to totally favor fuseiso over udevil; udevil only enters when there’s no fuseiso detected, either by commenting/removing the line or other possible reasons. Whole udevil part is contained within a single “if” block.

                    I just have 2 doubts:
                    –Shouldn’t the ‘ echo “$uout” ‘ part make zzzFM display a graphical message as well, or something like that?
                    –The parts comparing “point” and “uout” strings, either equal or not equal, what are they for? Are there actually cases where both of them are equal?

                    Thanks.

                    Oh, I also tried fuseiso, either through zzzFM and standalone command.
                    Unlike udevil, seems to have a strange little effect on zzzFM: plain text files icons look like “executable”, even when they have no +x permission at all.

                    #70398
                    Member
                    Xecure
                      Helpful
                      Up
                      0
                      ::

                      No idea on most of the issues. It would be great if the zzzfm developer could give advice. I just use them and am not really a power user. Sorry for not being able to help more.

                      antiX Live system enthusiast.
                      General Live Boot Parameters for antiX.

                      #70446
                      Anonymous
                        Helpful
                        Up
                        0
                        ::

                        @Xecure:
                        No need to be sorry at all; I didn’t expect you to even bother posting, sorry if I made you do this. You helped a lot already.

                        Regarding the developer, IIRC, wouldn’t that be actually @skidoo ? At least for zzzFM; I know it’s based on SpaceFM…

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