Announcement

Collapse
No announcement yet.

USB screw ups

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

    #16
    The command is from the root prompt (#), not the user prompt ($), so coping and pasting # touch /forcefsck as you did wouldn't do anything.

    In the konsole, type: sudo su -
    You'll be prompted for your pwd; type it and press Enter. Your prompt will change to show the # sign.

    Then type: touch /forcefsck
    and press Enter. You'll now have the file forcefsck in / which you can see by typing: ls -la /forcefsck

    Now exit the root environment you are in by typing: exit and press Enter.

    Close the konsole and logout/reboot.
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #17
      So I think I got it to run by holding down shift while it was booting.
      I got to advanced option and hit it and it showed not one but two recovery mode lines
      Followed the rest of the instructions.
      When I rebooted I ran the dmesg | tail -20 first without a thumb drive and it gave me this


      greg@greg-OptiPlex-990:~$ dmesg | tail -20
      [ 4.413185] scsi 6:0:0:0: Direct-Access Generic STORAGE DEVICE 0551 PQ: 0 ANSI: 5
      [ 4.413409] sd 6:0:0:0: Attached scsi generic sg2 type 0
      [ 4.417212] sd 6:0:0:0: [sdb] Attached SCSI removable disk
      [ 5.128474] audit: type=1400 audit(1543780363.774:2): apparmor="STATUS" operation="profile_load" profile="unconfined" name="libreoffice-senddoc" pid=652 comm="apparmor_parser"
      [ 5.128831] audit: type=1400 audit(1543780363.774:3): apparmor="STATUS" operation="profile_load" profile="unconfined" name="libreoffice-oopslash" pid=651 comm="apparmor_parser"
      [ 5.129193] audit: type=1400 audit(1543780363.774:4): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/bin/man" pid=650 comm="apparmor_parser"
      [ 5.129195] audit: type=1400 audit(1543780363.774:5): apparmor="STATUS" operation="profile_load" profile="unconfined" name="man_filter" pid=650 comm="apparmor_parser"
      [ 5.129196] audit: type=1400 audit(1543780363.774:6): apparmor="STATUS" operation="profile_load" profile="unconfined" name="man_groff" pid=650 comm="apparmor_parser"
      [ 5.132056] audit: type=1400 audit(1543780363.774:7): apparmor="STATUS" operation="profile_load" profile="unconfined" name="libreoffice-xpdfimport" pid=654 comm="apparmor_parser"
      [ 5.134826] audit: type=1400 audit(1543780363.778:8): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/snapd/snap-confine" pid=655 comm="apparmor_parser"
      [ 5.134829] audit: type=1400 audit(1543780363.778:9): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/snapd/snap-confine//mount-namespace-capture-helper" pid=655 comm="apparmor_parser"
      [ 5.136026] audit: type=1400 audit(1543780363.778:10): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/sbin/cups-browsed" pid=656 comm="apparmor_parser"
      [ 5.136252] audit: type=1400 audit(1543780363.782:11): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/sbin/dhclient" pid=648 comm="apparmor_parser"
      [ 5.731339] IPv6: ADDRCONF(NETDEV_UP): eno1: link is not ready
      [ 5.948373] IPv6: ADDRCONF(NETDEV_UP): eno1: link is not ready
      [ 7.506142] e1000e: eno1 NIC Link is Up 100 Mbps Full Duplex, Flow Control: Rx/Tx
      [ 7.506146] e1000e 0000:00:19.0 eno1: 10/100 speed: disabling TSO
      [ 7.506181] IPv6: ADDRCONF(NETDEV_CHANGE): eno1: link becomes ready
      [ 18.072663] random: crng init done
      [ 18.072665] random: 7 urandom warning(s) missed due to ratelimiting
      greg@greg-OptiPlex-990:~$

      Then I stuck in a thumb drive and ran it again and it gave me this


      greg@greg-OptiPlex-990:~$ dmesg | tail -20
      [ 18.072663] random: crng init done
      [ 18.072665] random: 7 urandom warning(s) missed due to ratelimiting
      [ 204.306332] usb 2-1.7: new high-speed USB device number 6 using ehci-pci
      [ 204.913185] usb 2-1.7: New USB device found, idVendor=154b, idProduct=0059
      [ 204.913189] usb 2-1.7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
      [ 204.913191] usb 2-1.7: Product: USB 2.0 FD
      [ 204.913193] usb 2-1.7: Manufacturer: PNY Technologies
      [ 204.913196] usb 2-1.7: SerialNumber: AC88HCC1000000367
      [ 204.913608] usb-storage 2-1.7:1.0: USB Mass Storage device detected
      [ 204.914413] scsi host7: usb-storage 2-1.7:1.0
      [ 206.262352] scsi 7:0:0:0: Direct-Access PNY USB 2.0 FD 4096 PQ: 0 ANSI: 4
      [ 206.262840] sd 7:0:0:0: Attached scsi generic sg3 type 0
      [ 206.263508] sd 7:0:0:0: [sdc] 7913472 512-byte logical blocks: (4.05 GB/3.77 GiB)
      [ 206.264408] sd 7:0:0:0: [sdc] Write Protect is off
      [ 206.264411] sd 7:0:0:0: [sdc] Mode Sense: 43 00 00 00
      [ 206.265252] sd 7:0:0:0: [sdc] No Caching mode page found
      [ 206.265257] sd 7:0:0:0: [sdc] Assuming drive cache: write through
      [ 206.270630] sdc: sdc1
      [ 206.273369] sd 7:0:0:0: [sdc] Attached SCSI removable disk
      [ 206.614665] FAT-fs (sdc1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
      greg@greg-OptiPlex-990:~$

      It still will not allow me to copy files to the thumb drive
      Greg
      W9WD

      Comment


        #18
        With no USB devices inserted, what is the output of

        ll -R /media

        Please Read Me

        Comment


          #19
          greg@greg-OptiPlex-990:~$ ll -R /media
          /media:
          total 44
          drwxr-xr-x 11 root root 4096 Dec 1 10:12 ./
          drwxr-xr-x 24 root root 4096 Dec 2 12:51 ../
          lrwxrwxrwx 1 root root 45 Sep 8 16:07 .directory -> /etc/kubuntu-default-settings/directory-media
          drwxr-x---+ 2 root root 4096 Dec 2 13:33 greg/
          lrwxrwxrwx 1 root root 42 Sep 8 16:07 .hidden -> /etc/kubuntu-default-settings/hidden-media
          lrwxrwxrwx 1 root root 4 Dec 1 10:12 usb -> usb0/
          drwxr-xr-x 2 root root 4096 Dec 1 10:12 usb0/
          drwxr-xr-x 2 root root 4096 Dec 1 10:12 usb1/
          drwxr-xr-x 2 root root 4096 Dec 1 10:12 usb2/
          drwxr-xr-x 2 root root 4096 Dec 1 10:12 usb3/
          drwxr-xr-x 2 root root 4096 Dec 1 10:12 usb4/
          drwxr-xr-x 2 root root 4096 Dec 1 10:12 usb5/
          drwxr-xr-x 2 root root 4096 Dec 1 10:12 usb6/
          drwxr-xr-x 2 root root 4096 Dec 1 10:12 usb7/

          /media/greg:
          total 8
          drwxr-x---+ 2 root root 4096 Dec 2 13:33 ./
          drwxr-xr-x 11 root root 4096 Dec 1 10:12 ../

          /media/usb0:
          total 8
          drwxr-xr-x 2 root root 4096 Dec 1 10:12 ./
          drwxr-xr-x 11 root root 4096 Dec 1 10:12 ../

          /media/usb1:
          total 8
          drwxr-xr-x 2 root root 4096 Dec 1 10:12 ./
          drwxr-xr-x 11 root root 4096 Dec 1 10:12 ../

          /media/usb2:
          total 8
          drwxr-xr-x 2 root root 4096 Dec 1 10:12 ./
          drwxr-xr-x 11 root root 4096 Dec 1 10:12 ../

          /media/usb3:
          total 8
          drwxr-xr-x 2 root root 4096 Dec 1 10:12 ./
          drwxr-xr-x 11 root root 4096 Dec 1 10:12 ../

          /media/usb4:
          total 8
          drwxr-xr-x 2 root root 4096 Dec 1 10:12 ./
          drwxr-xr-x 11 root root 4096 Dec 1 10:12 ../

          /media/usb5:
          total 8
          drwxr-xr-x 2 root root 4096 Dec 1 10:12 ./
          drwxr-xr-x 11 root root 4096 Dec 1 10:12 ../

          /media/usb6:
          total 8
          drwxr-xr-x 2 root root 4096 Dec 1 10:12 ./
          drwxr-xr-x 11 root root 4096 Dec 1 10:12 ../

          /media/usb7:
          total 8
          drwxr-xr-x 2 root root 4096 Dec 1 10:12 ./
          drwxr-xr-x 11 root root 4096 Dec 1 10:12 ../
          greg@greg-OptiPlex-990:~$
          Greg
          W9WD

          Comment


            #20
            If you haven't already, delete (rm) the /forcefsck file (sudo rm /forcefsck).

            Remove the thumb drive and reboot.

            When you are on the Desktop, plug the thumb drive in. You should be prompted to accept opening it with the file manager (Dolphin). Do so. Dolphin should show in the URL window the path assigned to the device. Here, with a thumb drive inserted, it's: /media/paul/81df6332-d437-46d9-a449-7b4ca143ea85/ (yours will be different).

            Open a konsole and type: sudo blkid and press Enter.

            In the listing, your thumb drive should be the last one, and if consistent with your prior dmesg output, should be /dev/sdc1 and the UUID will be the same as what Dolphin shows. Assuming all that to be so (it should be), in the konsole type: cd /media/greg and press Enter. Then type: ls -la and press Enter.

            Do you see the thumb drives directory (it will have the UUID as the directory name). Importantly, is it owned by you (greg greg)?
            Windows no longer obstructs my view.
            Using Kubuntu Linux since March 23, 2007.
            "It is a capital mistake to theorize before one has data." - Sherlock Holmes

            Comment


              #21
              Originally posted by Snowhog View Post
              If you haven't already, delete (rm) the /forcefsck file (sudo rm /forcefsck).

              Remove the thumb drive and reboot.

              When you are on the Desktop, plug the thumb drive in. You should be prompted to accept opening it with the file manager (Dolphin). Do so. Dolphin should show in the URL window the path assigned to the device. Here, with a thumb drive inserted, it's: /media/paul/81df6332-d437-46d9-a449-7b4ca143ea85/ (yours will be different).

              It did not prompt me to accept opening it.
              I clicked on Dolphin and the thumb drive was listed it did show its' properties


              I ran this command and got the following results


              reg@greg-OptiPlex-990:~$ sudo blkid

              [sudo] password for greg:
              /dev/sda1: UUID="34b14e92-e25c-46b5-9a74-ac3d4b1896e9" TYPE="ext4" PARTUUID="f9aa7523-01"
              /dev/sdc1: UUID="3221-4A40" TYPE="vfat" PARTUUID="45a40863-01"

              greg@greg-OptiPlex-990:~$

              The thumb drive is the same as Dolphin
              /dev/sdc1: UUID="3221-4A40" TYPE="vfat" PARTUUID="45a40863-01"

              Then I ran this command and got...


              greg@greg-OptiPlex-990:/media/greg$ ls -la

              total 24
              drwxr-x---+ 3 root root 4096 Dec 2 13:47 .
              drwxr-xr-x 11 root root 4096 Dec 1 10:12 ..
              drwxr-xr-x 2 root root 16384 Dec 31 1969 3221-4A40
              greg@greg-OptiPlex-990:/media/greg$

              Don't see my name anywhere?
              Greg
              W9WD

              Comment


                #22
                You cd'd into /media/greg (greg@greg-OptiPlex-990:/media/greg$)

                The listing (ls -la) shows a single directory:
                drwxr-xr-x 2 root root 16384 Dec 31 1969 3221-4A40 which has the name (3221-4A40) matching that shown by the blkid command (/dev/sdc1: UUID="3221-4A40" TYPE="vfat" PARTUUID="45a40863-01")

                The problem you have been experiencing is that the thumb drive, when mounted, isn't owned by you (greg); it's owned by root (root root). That's why you can't write anything to it once it's mounted. Easy fix.

                With the thumb drive still mounted, and in a konsole, type: sudo chown -R greg:greg /dev/sdc1 and press Enter.
                Warning: Be very careful with this command. The -R means recursively (apply the command to the target and everything below it). Make sure that you get the target (/dev/sdc1) correct. IF say, you typed /dev/sda1 by mistake, it would hose your system.
                Windows no longer obstructs my view.
                Using Kubuntu Linux since March 23, 2007.
                "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                Comment


                  #23
                  I just copied and pasted you command and am rebooting now
                  Greg
                  W9WD

                  Comment


                    #24
                    Did sudo chown -R greg:greg /dev/sdc1 and it still says...

                    greg@greg-OptiPlex-990:/media/greg$ ls -la

                    total 24
                    drwxr-x---+ 3 root root 4096 Dec 2 14:34 .
                    drwxr-xr-x 11 root root 4096 Dec 1 10:12 ..
                    drwxr-xr-x 2 root root 16384 Dec 31 1969 3221-4A40

                    greg@greg-OptiPlex-990:/media/greg$
                    Greg
                    W9WD

                    Comment


                      #25
                      Hmm. Okay, cd into the thumb drive: cd /media/greg/3221-4A40

                      Now list it's contents (if any): ls -la

                      What does it show?
                      Windows no longer obstructs my view.
                      Using Kubuntu Linux since March 23, 2007.
                      "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                      Comment


                        #26
                        greg@greg-OptiPlex-990:~$ cd /media/greg/3221-4A40

                        greg@greg-OptiPlex-990:/media/greg/3221-4A40$ ls -la

                        total 22888
                        drwxr-xr-x 2 root root 16384 Dec 31 1969 .
                        drwxr-x---+ 3 root root 4096 Dec 2 14:34 ..
                        -rwxr-xr-x 1 root root 22708342 Nov 5 13:45 DM_Pro.zip
                        -rwxr-xr-x 1 root root 267995 Nov 26 09:17 'Dove Creek 1.jpg'
                        -rwxr-xr-x 1 root root 244380 Nov 26 09:18 'Dove Creek 2.jpg'
                        -rwxr-xr-x 1 root root 181921 Nov 26 09:19 'Dove Creek 3.jpg'
                        -rwxr-xr-x 1 root root 81 Nov 5 13:51 'Sign in.txt'

                        greg@greg-OptiPlex-990:/media/greg/3221-4A40$
                        Greg
                        W9WD

                        Comment


                          #27
                          Content, and all owned by 'root'.

                          While in this location, type: sudo chown greg:greg * and press Enter.

                          Then type: ls -la and verify that the contents are now owned by you.

                          If they are (should be), type: cd .. and press Enter. You should now be in /media/greg.

                          Now type: sudo chown greg:greg 3221-4A40 and press Enter. Then type: ls -la and see who now owns 32321-4A40; should be you.
                          Windows no longer obstructs my view.
                          Using Kubuntu Linux since March 23, 2007.
                          "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                          Comment


                            #28
                            What a mess

                            greg@greg-OptiPlex-990:~$ cd /media/greg/3221-4A40
                            greg@greg-OptiPlex-990:/media/greg/3221-4A40$ ls -la
                            total 22888
                            drwxr-xr-x 2 root root 16384 Dec 31 1969 .
                            drwxr-x---+ 3 root root 4096 Dec 2 14:34 ..
                            -rwxr-xr-x 1 root root 22708342 Nov 5 13:45 DM_Pro.zip
                            -rwxr-xr-x 1 root root 267995 Nov 26 09:17 'Dove Creek 1.jpg'
                            -rwxr-xr-x 1 root root 244380 Nov 26 09:18 'Dove Creek 2.jpg'
                            -rwxr-xr-x 1 root root 181921 Nov 26 09:19 'Dove Creek 3.jpg'
                            -rwxr-xr-x 1 root root 81 Nov 5 13:51 'Sign in.txt'
                            greg@greg-OptiPlex-990:/media/greg/3221-4A40$ sudo chown greg:greg *
                            [sudo] password for greg:
                            chown: changing ownership of 'DM_Pro.zip': Operation not permitted
                            chown: changing ownership of 'Dove Creek 1.jpg': Operation not permitted
                            chown: changing ownership of 'Dove Creek 2.jpg': Operation not permitted
                            chown: changing ownership of 'Dove Creek 3.jpg': Operation not permitted
                            chown: changing ownership of 'Sign in.txt': Operation not permitted
                            greg@greg-OptiPlex-990:/media/greg/3221-4A40$ ls -la
                            total 22888
                            drwxr-xr-x 2 root root 16384 Dec 31 1969 .
                            drwxr-x---+ 3 root root 4096 Dec 2 14:34 ..
                            -rwxr-xr-x 1 root root 22708342 Nov 5 13:45 DM_Pro.zip
                            -rwxr-xr-x 1 root root 267995 Nov 26 09:17 'Dove Creek 1.jpg'
                            -rwxr-xr-x 1 root root 244380 Nov 26 09:18 'Dove Creek 2.jpg'
                            -rwxr-xr-x 1 root root 181921 Nov 26 09:19 'Dove Creek 3.jpg'
                            -rwxr-xr-x 1 root root 81 Nov 5 13:51 'Sign in.txt'
                            greg@greg-OptiPlex-990:/media/greg/3221-4A40$ cd
                            greg@greg-OptiPlex-990:~$ cd /media/greg/
                            greg@greg-OptiPlex-990:/media/greg$ sudo chown greg:greg 3221-4A40
                            chown: changing ownership of '3221-4A40': Operation not permitted
                            greg@greg-OptiPlex-990:/media/greg$ ls -la
                            total 24
                            drwxr-x---+ 3 root root 4096 Dec 2 14:34 .
                            drwxr-xr-x 11 root root 4096 Dec 1 10:12 ..
                            drwxr-xr-x 2 root root 16384 Dec 31 1969 3221-4A40
                            greg@greg-OptiPlex-990:/media/greg$
                            Greg
                            W9WD

                            Comment


                              #29
                              Hmmm. Well, if the thumb drive is actually mounted in 'read only' mode, that might account for this. Was this drive used on a Windows machine per chance?
                              Windows no longer obstructs my view.
                              Using Kubuntu Linux since March 23, 2007.
                              "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                              Comment


                                #30
                                And BTW, AFAIK, you won't be able to copy anything to any device showing file system errors. That would be a sure way to corrupt your data.

                                There was a lot of confusion back there about running FSCK. You're supposed to run it on the thumb drive, not your system drive. Simply insert the USB drive, check dmesg output to determine the device name (/dev/sdc1 for example), then type:

                                sudo fsck.vfat /dev/sdc1

                                This assumes vfat and sdc1.

                                Please Read Me

                                Comment

                                Working...
                                X