Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: recover usb stick

  1. #1
    Join Date
    Jun 2008
    Location
    USA
    Posts
    1,504

    Default recover usb stick

    I have a usb stick that is not recognized by dolphin but shows up in a terminal with command lsusb. Can I format it from the cli? It shows up like this.
    Code:
    Bus 001 Device 029: ID 058f:6387 Alcor Micro Corp. Flash Drive
    
    Of course, the device number changes but the ID remains 058f:6387. It would be nice to recover it, but it is real close to the trash can!
    Any sufficiently advanced technology is indistinguishable from magic. - Arthur C. Clarke

  2. #2
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    15,985
    Blog Entries
    3

    Default Re: recover usb stick

    When it is plugged in, does:
    Code:
    fdisk -l
    see it. And, for that matter, does
    Code:
    parted -l
    see it. (You will need a root commandline for those commands).
    openSUSE Leap 15.4; KDE Plasma 5.24.4;
    testing Tumbleweed.

  3. #3
    Join Date
    Jun 2008
    Location
    USA
    Posts
    1,504

    Default Re: recover usb stick

    fdisk -l gives me
    Code:
    Disk /dev/sdc: 1.91 GiB, 2055208960 bytes, 4014080 sectors
    Disk model: Flash Disk       
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x4958e456
    
    DeviceBootStart    EndSectors SizeIdType
    /dev/sdc1          63 4014079 4014017  1.9G  7 HPFS/NTFS/exFAT
    
    parted -l gives me
    Code:
    Model: Generic Flash Disk (scsi)
    Disk /dev/sdc: 2055MB
    Sector size (logical/physical): 512B/512B
    Partition Table: msdos
    Disk Flags:  
    
    Number  Start   End     Size    Type     File system  Flags
     1      32.3kB  2055MB  2055MB  primary               type=07
    
    
    Dolphin still does not see it after running these two commands.
    Any sufficiently advanced technology is indistinguishable from magic. - Arthur C. Clarke

  4. #4
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    30,705

    Default Re: recover usb stick

    First, please do not type "<command> gives me" preceding the output within the CODE tags. Simply copy that one line
    with the output and paste it between the CODE tags. How easy can it be?

    And when you leave out parts of your output, then say so. Now we have a listing of a system that can not exist. The presence of sdc implies that there most probably is a sda and a sdb, but we do not see it. How trustworthy is your computer copy/paste when you leave out things without even explaining that you did so?

    Then, sdc is apparently a mass-storage device of ~ 1.9 GiB. It has a partition table of the type DOS (also called MBR). In the partition table is defined one (1) partition that covers the rest of the space (~ 9 GiB). The partion is of type 7 HPFS/NTFS/exFAT, which may point to it being created for having a non-Linux file system (like NTFS) on it.

    These two outputs are just listings of tacts. I do not understand why you suggest that hey should change something by saying "Dolphin still does not see it after running these two commands. "

    Apparently there is no file system on that partition. But of course you can create one. Of your own choice. But when you want to create a Linux file system on it, then please change the partition type accordingly (to Linux data). You can of course use YaST > System > Partitioner to do that. From the command line use fdisk to change to partition type (when needed) or the whole partitioning (when wanted). Use mkfs variants for creating Linux file systems of several types. For NTFS and other non-Linux (read: MS Windows) type of file systems, I would use a MS Windows system (well, in fact I would never do that at all), but it may be that there are tools to do that on your openSUSE system.
    Henk van Velden

  5. #5

    Default Re: recover usb stick

    Quote Originally Posted by hcvv View Post
    For NTFS and other non-Linux (read: MS Windows) type of file systems, I would use a MS Windows system (well, in fact I would never do that at all), but it may be that there are tools to do that on your openSUSE system.
    GParted, KDE Partition Manager. The last creates exFAT.

  6. #6
    Join Date
    Jun 2008
    Location
    USA
    Posts
    1,504

    Default Re: recover usb stick

    I'm resurrecting this old thread because I tried again to make this usb drive work. I must have damaged it by unplugging without unmounting. I've used both the yast partitioner and Gparted. Both say the GPT is corrupted but say the primary partition is ok and ask if I want to continue creating a partition. I say yes but it fails. Gparted shows the whole drive as an unallocated partition. I've tried to format it as both xfs and exFAT, but of course both failed.

    Gparted gave me one bit of info to pursue. It states that the drive is mounted read-only. I don't know how to change this. There is no physical switch. I saw no way in Gparted and I don't know the cli command that might do it. Any suggestions?
    Any sufficiently advanced technology is indistinguishable from magic. - Arthur C. Clarke

  7. #7
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    30,705

    Default Re: recover usb stick

    Does gparted really say it is mounted (read-only). When there is no file system at all, how can it be mounted?
    Henk van Velden

  8. #8
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    4,843

    Default Re: recover usb stick

    Quote Originally Posted by Prexy View Post
    fdisk -l gives me
    It's possibly an exFAT filesystem – “lsblk --fs” would probably have given you the correct answer …
    • You'll need to install the “exfatprogs” package from the main openSUSE Repository.
    • The “fsck.exfat” and, if really needed, “mkfs.exfat” …

    Apart from that, the exFAT drivers have been present in the Linux Kernel for some time now – the Leap 15.3 Kernel has them by default …

  9. #9
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    15,985
    Blog Entries
    3

    Default Re: recover usb stick

    Quote Originally Posted by Prexy View Post
    Both say the GPT is corrupted but ...
    In a similar situation in the past, I was able to use "gdisk". The expert menu includes an option to zap the GPT partition table.

    I have not tried that recently.
    openSUSE Leap 15.4; KDE Plasma 5.24.4;
    testing Tumbleweed.

  10. #10
    Join Date
    Jun 2008
    Location
    USA
    Posts
    1,504

    Default Re: recover usb stick

    Quote Originally Posted by hcvv View Post
    Does gparted really say it is mounted (read-only). When there is no file system at all, how can it be mounted?
    https://paste.opensuse.org/34433332
    Before this, an error message says the GPT is corrupt.
    Any sufficiently advanced technology is indistinguishable from magic. - Arthur C. Clarke

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •