Can't write to my USB thumb drive

I’ve got a Sandisk USB drive (4GB) that I used to install openSuSE 12.1 KDE from. I’ve since moved to tumbleweed, but whenever I mount the drive it won’t let me write to it. I’ve formatted the drive many times. I’ve formatted it as ext3, FAT32, NTFS, nothing will let me write to it. Whenever I plug it in, Dolphin mounts it as “Sandisk Cruzer Micro” and also as “openSuSE Live CD KDE”. I can’t understand why it wants to mount it as the Live CD even though I’ve removed entire partitions, recreated partitions tables, I’ve tried almost everything I can think of. I even tried to force it to mount it as /media/USB through the yast partition tool. Any ideas, guys?

This is because there’s a hybrid file system on it. It can be recovered, by completely wiping the device. First find out which /dev/sdX entry the device is, where X is an alphabetic character. The first hdd in your machine is /dev/sda, if you have only one hdd the USB device will be /dev/sdb, but you have to make sure for yourself, f.e. by


su -c 'fdisk -l'

Once you’re sure, do this, replace X by the character you found


su -c 'dd if=/dev/zero of=/dev/sdX'
(enter rootpassword)

After this, the entire content of the USB device will be removed, incl. partition tables. Then use Yast to create a new setup for the device.Be very careful, using a character for X of another existing disk will erase that disk completely.

Thanks for the help. When I run the second command, I get, “dd: unrecognized operand of' Try dd --help’ for more information.” So I tried finding the dd program and it’s not in any of the repositories

Also, what’s the -c do after the SU command? I’ve never used that before.

Like Knurpht is offering you a command to execute between CODE tags, you should like wise trport by vopy/paste of what you did and what you get (an error message in this case) between CODE tags: http://forums.opensuse.org/english/information-new-users/advanced-how-faq-read-only/451526-posting-code-tags-guide.html](http://forums.opensuse.org/english/information-new-users/advanced-how-faq-read-only/451526-posting-code-tags-guide.html)
When you do like this we all can see that if you executed the correct statement.

Also the fact that dd gives you an error means that the program dd exists and is executed. And when it suggests to do

dd --help

it just means that and not to look if it is in a repository.

BTW, you can find where it is with

henk@boven:~> which dd
/bin/dd
henk@boven:~>

which is not very inetersting for your problem, but it shows how to post computer in-/output from a terminal.

Reading your first post here I have some remarks.

  1. I see a relationship (at least where the system sees not only a mass storage evice, but also a CD) with this thread: http://forums.opensuse.org/english/other-forums/community-fun/general-chit-chat/471430-how-can-i-get-rid-encryption-external-harddrive.html

  2. when you “reformatted” (I read this as: making a file system on it) the mass storage part of the device, you of course write to it. That means that the systems does recocnise it and that a device file (like /dev/sd.) are created for it and used by you to write to it.

  3. when you nevertheless say you can not write to it, that is contrary to 2) above. But you may mean you can not write to it at the file system level (creating files). But can you access it at all e.g. by listing the contents of it’s “root” directory?

  4. did you check if (and of course where) it is mounted (probably in coordination with KDE). Thus show show what

mount

says.

You can use the following command to help determine the /dev/sdX where X is replaced with a letter above that used by your internal drives:

grep -Ff <(hwinfo --disk --short) <(hwinfo --usb --short) | grep "/dev/"

You then need use the correct /dev/sdX as determined from the above command. Make sure you are not trying to format any internal hard drive. On my PC, the flash drive is called: ** /dev/sdk Generic Flash Disk**

/bin/dd if=/dev/zero of=/dev/sdX'

If you know you are using the correct drive, but can’t get it to work, you might need to add sudo in front, but make sure you know which drive you are trying to clear out. All data will be erased. Once this operation is complete, you need to run a partitioning application to recreate the partition you want to use. Most Flash drives are formatted using FAT and only FAT will work with Windows and Linux and BIOS updates on most machines.

Thank You,

On 2012-01-29 19:46, jdmcdaniel3 wrote:
> Most Flash drives are formatted
> using FAT and only FAT will work with Windows and Linux and BIOS updates
> on most machines.

You can also use NTFS.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

I see what I did wrong. I went back on the command I entered and saw I was missing an equals sign after “of”. I was able to get it formatted and now it works. Thanks a bunch for the help. Any idea why there’s no right-click format option from within KDE or Dolphin or even Yast?

dd is installed by default. No need to look for it in the repos. Unrecognized operand means there’s something wrong with the things following the dd command, otherwise you would have seen:

 
If 'dd' is not a typo you can use command-not-found to lookup the package that contains it, like this:
    cnf dd

The error message tells me that you did not understand or read what I wrote about the X, and copied the command just like that. You have to replace the X in the command by the character found. Open a terminal window and do


su -c 'fdisk -l'

and post output here. I’ll give you the appropriate, complete “dd” command.

On “su -c”: a plain “su” or “su -” changes to user root, “su -c” does this only for the command following the su -c. To concatenate a command string to a single command you have to put single quotes around the command following su -c.

Am 29.01.2012 20:56, schrieb DupermanDave:
>
> I see what I did wrong. I went back on the command I entered and saw I
> was missing an equals sign after “of”. I was able to get it formatted
> and now it works. Thanks a bunch for the help. Any idea why there’s no
> right-click format option from within KDE or Dolphin or even Yast?
>
>
This is a bit off topic to the rest of the thread but let me share that
here, I do not know if you like it or not but you can give it a try:

I use the package quick-usb-formatter for this tasks, it is available in
the KDE:Extra repository.
Since I do not like to run a program as root just to format an USB
device I made the following changes.
I added myself to the disk group in yast (do not forget to login and
logout) and I had to create a special desktop entry for the program
which contains (USB Quickformat.desktop)


[Desktop Entry]
Comment[de]=
Comment=
Exec=PATH=$PATH:/sbin quickusbformatter
GenericName[de]=USB Quickformat
GenericName=USB Quickformat
Icon=drive-removable-media-usb-pendrive
MimeType=
Name[de]=USB Quickformat
Name=USB Quickformat
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=
X-SuSE-translate=true

the PATH=$PATH:/sbin part in the Exec tag is needed because otherwise
the program will not find the mkfs.* programs it needs when creating a
new file system on the stick.

I dragged that desktop entry into my KDE panel so that I have easy
access to it.


PC: oS 11.4 (dual boot 12.1) 64 bit | Intel Core i7-2600@3.40GHz | KDE
4.6.0 | GeForce GT 420 | 16GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.8.0 |
nVidia ION | 3GB Ram

On 2012-01-29 20:56, DupermanDave wrote:

> Any idea why there’s no
> right-click format option from within KDE or Dolphin or even Yast?

For the type of operation you had to do, no, no right click. Unless
somebody writes a bugzilla and complains about having to dd the usb stick
and having no instructions for this in the iso to usb installation page.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

How can you loose an = sign with copy/paste?

Also I do not understand what you say about a “right click”. You can use YaST > System > System Partitioner for creating/changing partition tables and/or creating file systems. You can of course also use CLI commands like fdisk and mkfs for those purposes.

What is against using ext. (or any other native Linux fs). I allways put Linux fs on my USB storage devices, except for one, which I use for the seldom case that I want to exchange something with a Windows system.

Neato. Thanks a bunch for that. Im going to do that next time I’m logged in (windows now. Game time.)

I don’t know, but I managed to do it lol! By “right-click” I was just equating it to the old fashioned Windows way where you just right click on a drive and you have the option to format it right there in the menu.

There really is a problem with USB devices used for installing, made from LiveCD’s. I tried all options I could find, but have had this issue with every USB stick I used as a USB-Live install medium. AFAU the problem is caused by the hybrid filesystem. Even if I remove the partition table using fdisk, after reinserting the device notifiers on both KDE and GNOME report a LiveCD. I also found out this is the same for Ubuntu users. Gladly I knew the dd command and it’s power to completely erase a disk, so I know how to solve the matter, but a solution through a desktop program would be nice. BTW Yast simply tellls me the partitioning of those devices cannot be changed.

Is this hybrid system caused by the method SuSE uses to create the live CD? The fact that it requires a proprietary application to generate a USB drive? SuSE and Fedora are the only 2 distros I know of that have special apps to create a bootable drive. Everyone else works with unetbootin and pendrivelinux.

Am 29.01.2012 22:16, schrieb DupermanDave:
>
> The fact that it requires a proprietary application to generate a
> USB drive?
Just as a side note you do not need any proprietary application. I
create all openSUSE live USBs with a simple dd command. But I agree that
compatibility with unetbootin would be really nice.


PC: oS 11.4 (dual boot 12.1) 64 bit | Intel Core i7-2600@3.40GHz | KDE
4.6.0 | GeForce GT 420 | 16GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.8.0 |
nVidia ION | 3GB Ram

Hi
Proprietary application? imagewriter is GPL?
https://build.opensuse.org/package/view_file?file=imagewriter.spec&package=imagewriter&project=openSUSE%3A12.1&rev=2436f0dfad28527169545ffdea7e40de
http://wiki.geteasypeasy.com/Hybrid_ISO/IMG_format


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.1 (x86_64) Kernel 3.1.0-1.2-desktop
up 1 day 17:44, 6 users, load average: 0.24, 0.13, 0.08
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

By proprietary I meant something Novell (or OpenSuSE?) created specifically to get the job done to meet its own needs rather than using something already on the market, like Unetbootin or Pendrive linux. I didn’t mean proprietary in a literal monetary sense.

On 2012-01-29 21:46, hcvv wrote:
>
> robin_listas;2435293 Wrote:

> What is against using ext. (or any other native Linux fs). I allways
> put Linux fs on my USB storage devices, except for one, which I use for
> the seldom case that I want to exchange something with a Windows system.

Nothing, except that you can not share it with Windows. If it is your
computer you can install the driver, but if it is not yours you can not.

And it takes time to install the ext driver in Windows if you just want to
share the 12.1 DVD ISO, which you can not carry on a FAT stick. It doesn’t
look neat you having to browse internet trying to find the driver for an
unfamiliar os :stuck_out_tongue:


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)