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.
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!
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.
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.
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?
The image shows that it says “…, because it is opened read-only”.
You said “It states that the drive is mounted read-only.”
Please do not post your own conclusions/fantasy, but only what the computer says. >:(
==========================
When there is nothing on that device you want to save (but only then), the best thing is to erase the first block. As root:
dd if=/dev/zero of=/dev/sdN count=1
(replace the N with the correct letter, check that twice**!** or you may destroy the contents of the wrong disk).
When this gives an error, please post (and then not your conclusion, but the copied/pasted text from the terminal including the line with the prompt and the command, up to and including the line with the new prompt) between CODE tags (you get the CODE tags by clicking on the button with the # in the toolbar at the top of the post editor).
When this gives writing problems (read-only or otherwise) then your device is broken.
When that succeeds, then use the partitioner of your choice to make a partitioning of your choice and put file system of your choice on those partitions.
In other words, overwrite whatever partition table was present – in this case the first MB of blocks on the given device.
You can also use “dd if=/dev/zero of=/dev/sd? iflag=fullblock bs=1024 count=10 status=progress” to overwrite the first MB with zeros.
It possible that, the USB device has a capacity of around about 2 GB –
Therefore, it doesn’t need exFAT – simple FAT is OK for devices with a capacity of up to and including 32 GB.
[HR][/HR]Extra information for exFAT –
You’ll need to add “exfat” to the file ‘/etc/filesystems
’ to allow “mount” to auto-magically recognise the filesystem and, remember to re-edit that file every time the package “util-linux” changes … - It’s also not a bad idea to execute “modprobe exfat” …
I used the second command to initialize the disk. Next, I formatted with a single FAT partition. Prior to doing this, Dolphin didn’t see it; but it showed up in lsusb and lsblk. After formatting, it could now be seen by Dolphin but would not mount. After a short time, this error appeared
An error occurred while accessing '252.5 MiB Removable Media', the system responded: An unspecified error has occurred: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.