Announcement

Collapse
No announcement yet.

USB screw ups

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

  • Snowhog
    replied
    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?

    Leave a comment:


  • GregM
    replied
    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$

    Leave a comment:


  • GregM
    replied
    I just copied and pasted you command and am rebooting now

    Leave a comment:


  • Snowhog
    replied
    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.

    Leave a comment:


  • GregM
    replied
    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?

    Leave a comment:


  • Snowhog
    replied
    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)?

    Leave a comment:


  • GregM
    replied
    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:~$

    Leave a comment:


  • oshunluvr
    replied
    With no USB devices inserted, what is the output of

    ll -R /media

    Leave a comment:


  • GregM
    replied
    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

    Leave a comment:


  • Snowhog
    replied
    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.

    Leave a comment:


  • GregM
    replied
    I guess I'm not doing something right.
    I copied the command # touch /forcefsck in to the terminal.
    Rebooted and nothing seemed to happen.
    Then to check I copied # ls /forcefsck in to the terminal and it returned nothing.

    What did I do wrong?

    Leave a comment:


  • GregM
    replied
    Perfect.
    Thanks
    I have my clone made (I'm om it now) and I will give the Force fsck Upon System Boot a whirl.

    Leave a comment:


  • Snowhog
    replied
    Originally posted by GregM View Post
    It seems like running fsck would be the easiest upon system boot.

    A question they don't answer...

    "After your system boots, check if the file still exists:"
    "If it does, you may want to remove it in order to avoid fsck on every system boot."


    What would be the command to remove it?
    IF it exists, then from a konsole: sudo rm /forcefsck

    Leave a comment:


  • Snowhog
    replied
    Remove it "IF" you created it. If you didn't follow the steps under Force fsck Upon System Boot, then nothing to remove.

    Leave a comment:


  • GregM
    replied
    I certainly won't argue with you but it does say to remove it...

    Click image for larger version

Name:	Screenshot-14.jpg
Views:	1
Size:	56.8 KB
ID:	644069

    Leave a comment:

Users Viewing This Topic

Collapse

There are 0 users viewing this topic.

Working...
X