USB Flash Drive with Random Data

Questions about hardware,drivers and peripherals
Forum rules
Before you post please read how to get help
Post Reply
Rutilus
Level 1
Level 1
Posts: 18
Joined: Wed May 09, 2012 10:11 am

USB Flash Drive with Random Data

Post by Rutilus »

In order to erase a USB flash drive before reusing it, I ran the following command which fills the USB Flash Drive with random data (first you run the command "df" to get the "sdf1" part of the command):

Code: Select all

dd if=/dev/urandom of=/dev/sdf1 bs=1M
Unfortunately, my computer now does nothing when I insert my USB Flash Drive, and an hour's browsing hasn't helped me. Please can anyone tell me what to do next?
AlbertP
Level 16
Level 16
Posts: 6714
Joined: Sun Jan 30, 2011 12:38 pm
Location: Utrecht, The Netherlands

Re: USB Flash Drive with Random Data

Post by AlbertP »

There is probably no readable partition anymore on the drive. You would need to format it using "Disks" in the menu.
Registered Linux User #528502
Image
Feel free to correct me if I'm trying to write in Spanish, French or German.
Rutilus
Level 1
Level 1
Posts: 18
Joined: Wed May 09, 2012 10:11 am

Re: USB Flash Drive with Random Data

Post by Rutilus »

That sounds likely but I can't find an option "Disks" under the Menu button. Does the option have a fuller name or is it maybe something that needs to be installed?
trapperjohn
Level 5
Level 5
Posts: 849
Joined: Wed Jul 11, 2012 4:10 pm
Contact:

Re: USB Flash Drive with Random Data

Post by trapperjohn »

gparted is my favorite.

sudo apt-get update
sudo apt-get install gparted

run gparted (menu or ~gparted)

Easy gtk interface, Be carefull; make sure you are partitioning/formating the right disk.
Last edited by trapperjohn on Wed May 08, 2013 7:01 pm, edited 1 time in total.
AlbertP
Level 16
Level 16
Posts: 6714
Joined: Sun Jan 30, 2011 12:38 pm
Location: Utrecht, The Netherlands

Re: USB Flash Drive with Random Data

Post by AlbertP »

GParted is a very good program for more complex tasks indeed. But for simply formatting a flash drive, Disks (Mint 14) or Disk Utility (Mint 13 and before) is an easy to use program that doesn't confuse new users as much. That's why I preferred to use Disks here. But indeed, GParted would be able to format it too.
Registered Linux User #528502
Image
Feel free to correct me if I'm trying to write in Spanish, French or German.
Rutilus
Level 1
Level 1
Posts: 18
Joined: Wed May 09, 2012 10:11 am

Re: USB Flash Drive with Random Data

Post by Rutilus »

Code: Select all

sudo apt-get gparted
gives me the error message:

Code: Select all

E: Invalid operation gparted
How do I install GParted or how do I install the alternative Disks (Mint 14)?
User avatar
karlchen
Level 21
Level 21
Posts: 13495
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: USB Flash Drive with Random Data

Post by karlchen »

Hello, Rutilus.
How do I install GParted or how do I install the alternative Disks (Mint 14)?
The correct commandlines are

Code: Select all

sudo apt-get update
sudo apt-get install gparted
The "Disks" programme should already be present. I can find it by clicking on [Menu] => Accessories => Disk Drives (translated back from German, as I am running a localized Mint 14 32-bit Cinnamon desktop)
If you cannot locate it in the Mint menus, you might try

Code: Select all

gnome-disks
in a terminal window. Should have the same effect.

Kind regards,
Karl
Image
Linux Mint 19.3 64-bit Cinnamon, Total Commander 9.51 64-bit
Haß gleicht einer Krankheit, dem Miserere, wo man vorne herausgibt, was eigentlich hinten wegsollte. (Goethe)
AlbertP
Level 16
Level 16
Posts: 6714
Joined: Sun Jan 30, 2011 12:38 pm
Location: Utrecht, The Netherlands

Re: USB Flash Drive with Random Data

Post by AlbertP »

You do not need to install it through terminal. It's easy to get GParted from Software Manager > Featured category.
Registered Linux User #528502
Image
Feel free to correct me if I'm trying to write in Spanish, French or German.
trapperjohn
Level 5
Level 5
Posts: 849
Joined: Wed Jul 11, 2012 4:10 pm
Contact:

Re: USB Flash Drive with Random Data

Post by trapperjohn »

Sorry,

Corrected in original reply.

sudo apt-get install gparted

The package manager is probably the best entry-level way to get this and other
packages as they are needed.
Rutilus
Level 1
Level 1
Posts: 18
Joined: Wed May 09, 2012 10:11 am

Re: USB Flash Drive with Random Data

Post by Rutilus »

Thanks for all the replies. I did get GParted installed but couldn't get it to do anything. Nor did various command line tries that I read about while browsing work. To summarise and try to be helpful to anyone who reads this thread.

After I filled a USB flash drive with random data using the command line that is in my original post, I found that when I plugged the USB flash drive into my computer, a light came on the USB flash drive but my computer didn't recognise the USB flash drive. Nothing worked for me. I've given up. I'll not be filling a USB flash drive with random data lightly again. Maybe it's a good idea if you're getting rid of the device but if you want to use the device again with all previous data destroyed, be wary.
pfeiffep
Level 2
Level 2
Posts: 92
Joined: Tue Apr 23, 2013 10:32 pm
Location: United States

Re: USB Flash Drive with Random Data

Post by pfeiffep »

Rutilus wrote:Thanks for all the replies. I did get GParted installed but couldn't get it to do anything. Nor did various command line tries that I read about while browsing work. To summarise and try to be helpful to anyone who reads this thread.

After I filled a USB flash drive with random data using the command line that is in my original post, I found that when I plugged the USB flash drive into my computer, a light came on the USB flash drive but my computer didn't recognise the USB flash drive. Nothing worked for me. I've given up. I'll not be filling a USB flash drive with random data lightly again. Maybe it's a good idea if you're getting rid of the device but if you want to use the device again with all previous data destroyed, be wary.
Gparted, when launched, defaults to /dev/sda which is the first drive on you system.

In the upper right hand section of gparted you'll see a selector to choose other devices.
If you have not other hard drives, or hard drive like devices attached to your pc the selector should provide /dev/sdb which will be your 'damaged' flash drive.

You can delete any partitions displayed and then re-partition the thumb drive. If your desire is compatability select fat32.
HP Tower | Intel iCore 7 3.2Ghz | 12 Gb mem | SDD Win7 | HDD Ubuntu 13.04 & Mint 14 Cinnamon | USB HDD Ubuntu 13.10
Dell laptop | Intel celeron 1.5 Ghz | 2 Gb mem | HDD Ubuntu 13.04 | USB HDD Mint 14


Regards, Pete
Lethe
Level 1
Level 1
Posts: 2
Joined: Mon May 13, 2013 6:18 am

Re: USB Flash Drive with Random Data

Post by Lethe »

Hey, don't throw it away.

Follow this thread:

http://www.linuxforums.org/forum/newbie ... drive.html

Nick
Post Reply

Return to “Hardware Support”