Announcement

Collapse
No announcement yet.

flaky usb behavior

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    btw, if I ever can't find my flash drive to open it, even though it is plugged in, and even though I opened it earlier, I remove it (chances are that it is already unmounted at that point) and re-insert it and almost always it pops up somewhere--usually in the device notifier.
    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

    Comment


      #17
      Originally posted by oldgeek View Post
      The flash drive now mounts when I use GreyGeeks instructions (IOW, it says nothing after I type the instructions). I can't find it in Dolphin, however. But the drive opens when I press the device icon... I did follow all the steps Qqmike described. Do I have to mount the drive with sudo every time I want to use it? I thought that was done automatically.
      Since "root" never needs my USB sticks, after I format them (usually as a Btrfs subvolume) I use chown to make them mine. When I plug them in they mount. BTW, ALWAYS umount your USB sticks BEFORE you pull them out. When I plug a UBS stick in the notifier pops up in the system tray and I usually click to open it in a Dolphine instance. After doing my Dolphin thing I right mouse on the stick in the "Devices" section of the left panel and choose "unmount". It then tells me the stick can be removed and I remove it. I've never had a USB stick get corrupted or lose data in years.
      "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
      – John F. Kennedy, February 26, 1962.

      Comment


        #18
        Since "root" never needs my USB sticks, after I format them ... I use chown to make them mine.
        Interesting. I realize this can be an issue, have seen other posts re such, but strangely I have never encountered the problem: I open gparted, give the root password requested to open gparted, do the work on the flash drive, close out, and go with it ... no problems detecting, owning, or using the flash drive, no need to mount, no need to change ownership. Maybe I can find time to experiment with this.
        An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

        Comment


          #19
          Originally posted by Qqmike View Post
          Interesting. I realize this can be an issue, have seen other posts re such, but strangely I have never encountered the problem: I open gparted, give the root password requested to open gparted, do the work on the flash drive, close out, and go with it ... no problems detecting, owning, or using the flash drive, no need to mount, no need to change ownership. Maybe I can find time to experiment with this.
          Since everything in /dev is owned by root you need root permission to format a storage device. When I plug a USB stick into a USB socket it is mounted by default at /media/jerry/whateverInamedit.

          Both /media and /media/jerry are owned by root, but whateverInamedit is owned by me. I can read and write to it as myself using Dolphin or any other utility, without root permission.

          However, when I format an HD or USB using Btrfs it is formatted as root. I mount it as root to access it for send & receive activity.
          Code:
          :~# mount -t btrfs /dev/disk/by-uuid/00fa8116-00d7-4611-9603-434769265d10 /mnt
          root@jerry-Aspire-V3-771:[FONT=courier new][B]~# vdir /mnt[/B][/FONT]
          total 0
          drwxr-xr-x 1 root root 262 Aug 30 13:47 @
          drwxr-xr-x 1 root root  30 Jul 27 20:00 @home
          drwxr-xr-x 1 root root  88 Aug 29 14:34 snapshots
          
          # [FONT=courier new][B]vdir /mnt/snapshots/[/B][/FONT]
          total 0
          drwxr-xr-x 1 root root 262 Aug 17 12:34 @20180822
          drwxr-xr-x 1 root root 262 Aug 17 12:34 @20180829
          drwxr-xr-x 1 root root  30 Jul 27 20:00 @home20180822
          drwxr-xr-x 1 root root  30 Jul 27 20:00 @home20180829
          /mnt is my <ROOT_FS> . As you can see, both @ and @home are owned by root, but if I browse into @home with Dolphin I can see that @home/jerry and everything under it is owned by me.
          Code:
          # [FONT=courier new][B]vdir /mnt/snapshots/@home20180829[/B][/FONT]
          total 0
          drwxr-xr-x 1 jerry jerry 2550 Aug 29 14:28 jerry
          Last edited by GreyGeek; Sep 01, 2018, 07:23 PM.
          "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
          – John F. Kennedy, February 26, 1962.

          Comment


            #20
            Thanks to all for your help. So how do I get the thumbdrive to mount without my intervention? I've never used chown, so could someone tell me what to do so I can mark this thread as solved?

            Comment


              #21
              Assuming you haven't tried any tricky application or configuration changes then IF you format your USB sticks using MSDOS FAT32 then they should mount for you by merely choosing the "mount with Dolphin" option when the system tray device notifier dialog gives you the opportunity. A FAT32 format will allow you to share them with your WinX using friends. IF you format them with EXT4 my experience has been that I use "sudo -i" to become root and then use "chown -hR jerry:jerry /media/jerry" to change the ownership of my USB EXXT4 stick to me.
              Last edited by GreyGeek; Sep 01, 2018, 09:21 PM.
              "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
              – John F. Kennedy, February 26, 1962.

              Comment


                #22
                This is frustrating. No matter what I do, the USB stick still says it cannot mount. Maybe it's just no good, although it used to work.

                Comment


                  #23
                  Originally posted by oldgeek View Post
                  This is frustrating. No matter what I do, the USB stick still says it cannot mount. Maybe it's just no good, although it used to work.
                  plug in the flash drive .
                  do not try to mount it ,and do
                  Code:
                  sudo parted -l
                  in a konsole , what is the output ?
                  i7 4core HT 8MB L3 2.9GHz
                  16GB RAM
                  Nvidia GTX 860M 4GB RAM 1152 cuda cores

                  Comment


                    #24
                    Originally posted by oldgeek View Post
                    This is frustrating. No matter what I do, the USB stick still says it cannot mount. Maybe it's just no good, although it used to work.
                    It happens. I have to 320Gb USB Passport HD's that refuse to mount. They are just paper weights now.
                    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                    – John F. Kennedy, February 26, 1962.

                    Comment


                      #25
                      This is the out put of the command sudo parted -l:

                      Model: SanDisk Cruzer Blade (scsi)
                      Disk /dev/sdb: 15,7GB
                      Sector size (logical/physical): 512B/512B
                      Partition Table: gpt
                      Disk Flags:

                      Number Start End Size File system Name Flags
                      1 1049kB 15,7GB 15,7GB ext4

                      Anything weird there?

                      Comment


                        #26
                        I'm gonna let Vinny carry on here, but just to say this:
                        Code:
                        Partition Table: gpt
                        In theory, that should work OK. But I would have preferred it be Partition Table: mbr, since this is just a data flash drive. Simplicity.
                        An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                        Comment


                          #27
                          Originally posted by oldgeek View Post
                          This is the out put of the command sudo parted -l:

                          Model: SanDisk Cruzer Blade (scsi)
                          Disk /dev/sdb: 15,7GB
                          Sector size (logical/physical): 512B/512B
                          Partition Table: gpt
                          Disk Flags:

                          Number Start End Size File system Name Flags
                          1 1049kB 15,7GB 15,7GB ext4

                          Anything weird there?
                          no I do not see anything weird ,,,,BUT I would agree with @Qqmike hear , unless you have a reason to use GPT Partition Table and EXT4 file system I would put it back to msdos and FAT32.

                          if you want to try to mount it on the command line and see if we get any errors then do ,
                          Code:
                          sudo mkdir /mnt/flash
                          this will create a directory in /mnt named flash to mount the drive to you can name it anything you like /mnt/whatever .
                          then .
                          Code:
                          sudo mount /dev/sdb1 -t ext4 /mnt/flash
                          if you just get the prompt back then it's probably mounted , or you may get errors , if so post them .
                          if you just get the prompt back then do .

                          Code:
                          findmnt
                          you will get a list of all mounts including system ones , like this

                          Code:
                          vinny@vinny-Bonobo-Extreme:~$ findmnt
                          TARGET                                SOURCE     FSTYPE     OPTIONS
                          /                                     /dev/sda6  ext4       rw,relatime,errors=remount-ro,data=ordered
                          ├─/sys                                sysfs      sysfs      rw,nosuid,nodev,noexec,relatime
                          │ ├─/sys/kernel/security              securityfs securityfs rw,nosuid,nodev,noexec,relatime
                          │ ├─/sys/fs/cgroup                    tmpfs      tmpfs      ro,nosuid,nodev,noexec,mode=755
                          │ │ ├─/sys/fs/cgroup/systemd          cgroup     cgroup     rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd
                          │ │ ├─/sys/fs/cgroup/hugetlb          cgroup     cgroup     rw,nosuid,nodev,noexec,relatime,hugetlb
                          │ │ ├─/sys/fs/cgroup/blkio            cgroup     cgroup     rw,nosuid,nodev,noexec,relatime,blkio
                          │ │ ├─/sys/fs/cgroup/pids             cgroup     cgroup     rw,nosuid,nodev,noexec,relatime,pids
                          │ │ ├─/sys/fs/cgroup/cpu,cpuacct      cgroup     cgroup     rw,nosuid,nodev,noexec,relatime,cpu,cpuacct
                          │ │ ├─/sys/fs/cgroup/devices          cgroup     cgroup     rw,nosuid,nodev,noexec,relatime,devices
                          │ │ ├─/sys/fs/cgroup/net_cls,net_prio cgroup     cgroup     rw,nosuid,nodev,noexec,relatime,net_cls,net_prio
                          │ │ ├─/sys/fs/cgroup/rdma             cgroup     cgroup     rw,nosuid,nodev,noexec,relatime,rdma
                          │ │ ├─/sys/fs/cgroup/perf_event       cgroup     cgroup     rw,nosuid,nodev,noexec,relatime,perf_event
                          │ │ ├─/sys/fs/cgroup/memory           cgroup     cgroup     rw,nosuid,nodev,noexec,relatime,memory
                          │ │ ├─/sys/fs/cgroup/cpuset           cgroup     cgroup     rw,nosuid,nodev,noexec,relatime,cpuset
                          │ │ └─/sys/fs/cgroup/freezer          cgroup     cgroup     rw,nosuid,nodev,noexec,relatime,freezer
                          │ ├─/sys/fs/pstore                    pstore     pstore     rw,nosuid,nodev,noexec,relatime
                          │ ├─/sys/kernel/debug                 debugfs    debugfs    rw,relatime
                          │ ├─/sys/kernel/config                configfs   configfs   rw,relatime
                          │ └─/sys/fs/fuse/connections          fusectl    fusectl    rw,relatime
                          ├─/proc                               proc       proc       rw,nosuid,nodev,noexec,relatime
                          │ └─/proc/sys/fs/binfmt_misc          systemd-1  autofs     rw,relatime,fd=30,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=419
                          ├─/dev                                udev       devtmpfs   rw,nosuid,relatime,size=8157420k,nr_inodes=2039355,mode=755
                          │ ├─/dev/pts                          devpts     devpts     rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000
                          │ ├─/dev/shm                          tmpfs      tmpfs      rw,nosuid,nodev
                          │ ├─/dev/hugepages                    hugetlbfs  hugetlbfs  rw,relatime,pagesize=2M
                          │ └─/dev/mqueue                       mqueue     mqueue     rw,relatime
                          ├─/run                                tmpfs      tmpfs      rw,nosuid,noexec,relatime,size=1637516k,mode=755
                          │ ├─/run/lock                         tmpfs      tmpfs      rw,nosuid,nodev,noexec,relatime,size=5120k
                          │ └─/run/user/1000                    tmpfs      tmpfs      rw,nosuid,nodev,relatime,size=1637516k,mode=700,uid=1000,gid=1000
                          ├─/mnt/btrfs                          /dev/sdb1  btrfs      rw,relatime,compress=lzo,space_cache,subvolid=5,subvol=/
                          └─/mnt/test                           /dev/sdc1  vfat       rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro
                          you should see a line like the last one in this list , if so it's good , you just cant do anything with it yet because root will still be the owner of it with it being ext4 , but lets see how this goes before we go further

                          VINNY
                          i7 4core HT 8MB L3 2.9GHz
                          16GB RAM
                          Nvidia GTX 860M 4GB RAM 1152 cuda cores

                          Comment


                            #28
                            OK, first I changed it back to ms-dos and fat32--still wouldn't mount. Then tried mounting it like you said, but changed one line to sudo mount /dev/sdb1 /mnt/flash as I wasn't using ext4 any more. My last line looks like this after findmnt:

                            /mnt/flash /dev/sdb1 vfat rw,relatime,fmask=0022,dmask=00

                            So I guess it's mounted. It opens in Dolphin when I click on the icon and then the box which appears asking for alternatives (Gwenview photos, Dolphin). So I guess it does work. But not automatically.

                            Just to be complete, I reformatted it with GTP and ext4 and this time followed your code exactly. This is the last line of the findmnt command:

                            /mnt/flash /dev/sdb1 ext4 rw,relatime,data=ordered

                            Looks different.
                            I originally used fat32 and only went to ext4 when fat32 wouldn't mount automatically, by the way. I'm fine with fat32.

                            Comment


                              #29
                              it did mount both times then(as shown by the findmnt) so it's good any way you want it , IE: ext4 or fat32

                              VINNY
                              i7 4core HT 8MB L3 2.9GHz
                              16GB RAM
                              Nvidia GTX 860M 4GB RAM 1152 cuda cores

                              Comment


                                #30
                                I've just thought of something. I tried two other USB sticks and they don't mount automatically either. Is it because I'm using btrfs on my HDD? The usb drives are not btrfs.

                                Comment

                                Working...
                                X