Announcement

Collapse
No announcement yet.

USB Flash drive now has gibberish as a name? [tentative fix]

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

    USB Flash drive now has gibberish as a name? [tentative fix]

    Somewhere along the way, just hours before I reinstalled Kubuntu 10.04 (was 64 bit, decided I wanted 32 bit this time), I was using a 16 Gig Sandisk Cruzer for file backup. I issued a shutdown command while the flash was still mounted. I did this: the shutdown sound had played, then the screen flickers (KDE quitting and handing off the display?), the blue Kubuntu screen flashed for half second, then I had dark screen. I pulled the flash drive out, but the system had not completed shutting down. I saw no error messages, system turned off.

    Next day, I booted the system and later I go to use the flash drive, and instead of the normal "15.9 GiB Removable Media" message in the USB system tray Device Notifier, I get "Yr`F_%0F%15Bb%0Aj".

    In Dolphin, I have the bash prompt open at the bottom; when I mount that flash drive, this translates into:
    Code:
    Bb        
    j-2'
    clear
    mmmmna@mmmmna-desktop:/media/Yr`F_Bbj-2$ Bb
    Bb: command not found
    mmmmna@mmmmna-desktop:/media/Yr`F_Bbj-2$ j-2'
    > clear
    > ^C
    mmmmna@mmmmna-desktop:/media/Yr`F_Bbj-2$ cd /
    mmmmna@mmmmna-desktop:/$ Bb
    As the name causes the bash prompt to respond the way it does, I'm not real happy about what harm that name could cause.

    The bad name shows up on 2 systems, and is part of the device since the system had the same name after Kubuntu 10.04 reinstallation.


    To try to solve the name issue, I did the following:
    Code:
    mmmmna@mmmmna-desktop:~$ mount
    /dev/sde3 on / type ext3 (rw,errors=remount-ro)
    ...
    none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
    /dev/sdg on /media/Yr`F_Bb
    j-2 type vfat (rw,nosuid,nodev,uhelper=hal,uid=1000,utf8,shortname=mixed,flush)
    mmmmna@mmmmna-desktop:~$
    That tells me the Flash drive will be available at /dev/sdg after it gets dismounted by Device Notifier.

    As root (yes, as root; don't ask), I'm looking for where the Flash drive gets that string:
    Code:
    root@mmmmna-desktop:/home/mmmmna# fdisk /dev/sdg
    
    WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').
    
    Command (m for help): p
    
    Disk /dev/sdg: 16.0 GB, 16026435072 bytes
    64 heads, 32 sectors/track, 15283 cylinders
    Units = cylinders of 2048 * 512 = 1048576 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00000000
    
      Device Boot   Start     End   Blocks  Id System
    
    Command (m for help):
    CFDISK reports no label as well.

    Then I tried this trick (after I dismounted the Flash drive):
    Code:
    root@mmmmna-desktop:/home/mmmmna# mkdosfs -I -n 16\ G /dev/sdg
    mkdosfs 3.0.7 (24 Dec 2009)
    root@mmmmna-desktop:/home/mmmmna#
    I then pulled the Flash drive out of he USB connection on my system, I waited 10 seconds, then reinserted the Flash drive and the new name is "16 G".

    Ok, that seems to solve the problem, but that isn't a real solution since there is a space in the device name. Yes, I could simply enter a single word, yes, I get that, but my point isn't shown there.

    I then tried a reformat but without a name variable:
    Code:
    root@mmmmna-desktop:/home/mmmmna# mkdosfs -I /dev/sdg
    mkdosfs 3.0.7 (24 Dec 2009)
    root@mmmmna-desktop:/home/mmmmna#
    Guess which name reappeared? Yup. the same gibberish from before the reformat.

    So, I have to conclude that the name presented in KDE is associated to some identifier on the Flash drive.

    Where do I edit this data to remove the bad name? I searched for a couple terms that I thought might get me answers, but nothing was a match.

    #2
    Re: USB Flash drive now has gibberish as a name?

    An interesting trick I just discovered which might not be related to my problem:
    root@mmmmna-desktop:/home/mmmmna# more /etc/fstab
    # /etc/fstab: static file system information.
    #
    # Use 'blkid -o value -s UUID' to print the universally unique identifier
    # for a device; this may be used with UUID= as a more robust way to name
    # devices that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point> <type> <options> <dump> <pass>
    proc /proc proc nodev,noexec,nosuid 0 0
    # / was on /dev/sde3 during installation
    UUID=4987ca82-91f0-498b-abd1-1665f51f247c / ext3 errors=remount-ro 0 1
    # swap was on /dev/sde2 during installation
    UUID=bff36ab5-3b40-4dbb-9d40-388630b16dbd none swap sw 0 0
    root@mmmmna-desktop:/home/mmmmna#
    root@mmmmna-desktop:/home/mmmmna# blkid -o value -s UUID
    5660F2C160F2A6C1
    bff36ab5-3b40-4dbb-9d40-388630b16dbd
    10984e86-1f69-4bab-8b9a-996ecd875cac
    4987ca82-91f0-498b-abd1-1665f51f247c
    28BD-8853
    root@mmmmna-desktop:/home/mmmmna# blkid -o value -s UUID
    5660F2C160F2A6C1
    bff36ab5-3b40-4dbb-9d40-388630b16dbd
    10984e86-1f69-4bab-8b9a-996ecd875cac
    4987ca82-91f0-498b-abd1-1665f51f247c
    root@mmmmna-desktop:/home/mmmmna#
    The trick was that the first time I typed blkid -o value -s UUID, I had the unmounted Flash device still in the USB connector, then I pulled it out and ran the command the second time.

    I suspect that the blkid command shows me a UUID that is quite a bit shorter for the Flash drive versus my other drives.

    HTH.

    Comment


      #3
      Re: USB Flash drive now has gibberish as a name?

      I've got 5 Sandisk USB sticks, all different models. You probably have one with a hidden "U3" firmware bit.

      http://en.wikipedia.org/wiki/U3

      There is a removal method, but my experience indicates it does not always work:

      http://kb.sandisk.com/app/answers/detail/a_id/2550

      You can "dd" it -- that's what I normally do to mine. But, of my 5 sticks, one of them cannot even be freed of the U3 junk with "dd":

      dd if=/dev/zero of=/dev/sdX bs=1 count=512

      where "X" is the ID of your stick, as given by the output of fdisk -lu.

      Comment


        #4
        Re: USB Flash drive now has gibberish as a name?

        Hummm interesting .......I happen to have one of those ...but have never tried to modify it .....just use it as is ..........mite see what Gparted will do with it latter .

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

        Comment


          #5
          Re: USB Flash drive now has gibberish as a name?

          Originally posted by dibl
          I've got 5 Sandisk USB sticks, all different models. You probably have one with a hidden "U3" firmware bit.
          U3 was removed many reformats ago, I use the official U3 removal tool when I boot XP, I always remove the U3 junk. This drive has been partitioned and reformatted a few times since the U3 was removed.

          Was helpful to learn the fdisk -lu option, might save some mounting and unmounting steps.

          root@mmmmna-desktop:/home/mmmmna# dd if=/dev/random of=/dev/sdg bs=1 count=512
          512+0 records in
          512+0 records out
          512 bytes (512 B) copied, 34.381 s, 0.0 kB/s
          root@mmmmna-desktop:/home/mmmmna#
          A quick disconnect and reconnect of the flash drive and... nothing.
          Device Notifier doesn't notify me when I insert it, but it used to.

          So I ran the fdisk command again, and there now is an error on that drive:
          root@mmmmna-desktop:/home/mmmmna# fdisk -lu

          Disk /dev/sde: 120.0 GB, 120034123776 bytes
          ...
          Disk /dev/sdg: 16.0 GB, 16026435072 bytes
          64 heads, 32 sectors/track, 15283 cylinders, total 31301631 sectors
          Units = sectors of 1 * 512 = 512 bytes
          Sector size (logical/physical): 512 bytes / 512 bytes
          I/O size (minimum/optimal): 512 bytes / 512 bytes
          Disk identifier: 0x584ca2a3

          Disk /dev/sdg doesn't contain a valid partition table
          root@mmmmna-desktop:
          Next, because the error says no partition table, I believe need a simple DOS format:
          root@mmmmna-desktop:/home/mmmmna# mkdosfs -I /dev/sdg
          mkdosfs 3.0.7 (24 Dec 2009)
          root@mmmmna-desktop:/home/mmmmna#
          A quick disconnect and reconnect, the bad name returns!!

          I wonder if there is a table somewhere in my KDE that matches a human recognizable name to a device or disk identifier, and that table is putting the odd characters into the system name.

          Comment


            #6
            Re: USB Flash drive now has gibberish as a name?

            Right -- dd zeroizes the entire media including the partition table. So, after you nuke it with dd, you can use fdisk or one of the partitioning tools like Gparted or partitionmanager to make a new MS-DOS type partition table, and then to format it.

            Comment


              #7
              Re: USB Flash drive now has gibberish as a name?

              Originally posted by dibl
              Right -- dd zeroizes the entire media including the partition table. So, after you nuke it with dd, you can use fdisk or one of the partitioning tools like Gparted or partitionmanager to make a new MS-DOS type partition table, and then to format it.
              Thanks for the assistance.

              I did the dd command verbatim, then formatted it without making any partition, format was not a failure (see quote in my prior message). And the bad name returned when I mounted the device using the KDE device notifier

              After checking the drive in cfdisk AND fdisk, there is no label, the bad name is not shown under the xpert nor the normal commands of fdisk, and there is no label added to the flash drive as per cfdisk. I just popped it into Windows XP, the bad name displays there as well, and this was after the dd operation (so the drive name was not nuked by dd).

              Problem remains, is not related to the OS storing the bad string, it is provided on the flash drive and is not removed by dd and not removed by formatting.

              Comment


                #8
                Re: USB Flash drive now has gibberish as a name? [tentative fix]

                Well, I'm not sure if this is fixed, but I'll offer that I cannot seem to get the bad string to return as of now.
                What I have done since my last post was a few steps.
                1] created a maximised partition of type b using fdisk (w95 FAT32)
                toggled boot flag to read bootable and wrote that table to the flash device at /dev/sdf.
                quit fdisk
                mkdosfs -I /dev/sdf, no error.
                2] launched cfdisk at /dev/sdf
                yes, the partition was present.
                deleted the partition
                wrote the change to the /dev/sdf
                3] removed the flash drive from the USB connector, reinserted the flash drive into the USB connector, bad name remained as far as I remember, so I mounted the device. As root, issued the mount command, saw the device was still using /dev/sdf. Safely removed the flash drive but left it in the USB connector.
                4] using apt-get install, I installed parted, selected /dev/sdf, did a check, learned that this was deprecated, cancelled the check, quit the parted.
                5] using Synaptic, I installed gparted, created a partition type fat32, added a label "TT", applied that, no error. Still in gparted, I deleted the partition, and applied that, no error. quit gparted.
                6] back to Konsole, as root, I issued mkdosfs -I /dev/sdf, no error.
                7] uninserted the device, reinserted the device, in KDE device manager I mounted it, no more bad name.

                I honestly believe that the solution was really effected only at step 5, using gparted to write a label to the partition, and then deleting the partition. Problem is, I deliberately made certain that during step 5, I did not use KDE device manager to mount the device (I am still not totally sure the bad name string was only stored on the device, I think the bad string got rewritten to the device before I popped it into WinXP64).

                Until some unforeseen time in the future, this seems to be fixed.

                Now I gotta go and remove those 5 8 mount points that still have the bad names.

                EDIT: as root, rmdir /media/Y* removed the 8 mount points which had the same bad name.

                Comment

                Working...
                X