How to clear a flash drive of Xubuntu? [SOLVED]

What works, and doesn't, for you. Be specific, and please include Puppy version.
Message
Author
User avatar
Sky Aisling
Posts: 1368
Joined: Sat 27 Jun 2009, 23:02
Location: Port Townsend, WA. USA

How to clear a flash drive of Xubuntu?

#16 Post by Sky Aisling »

Question:
Unetbootin works to install an iso on a flash drive.
Can it also be used to reformat a drive?
https://unetbootin.github.io/#distros

Thank you,

Sky

User avatar
perdido
Posts: 1528
Joined: Mon 09 Dec 2013, 16:29
Location: ¿Altair IV , Just north of Eeyore Junction.?

#17 Post by perdido »

Hello Sky,
If you are still running into that obstacle you may wish to try the following.

Forum member saintless described a way to wipe a flash drive in the following post.
http://www.murga-linux.com/puppy/viewto ... 026#849026

Here is the info from that post that applies.(its a long post)
Make sure you have the drive identified as this will wipe the drive.
The top line is the command you type, then hit enter. dd if=/dev/zero of=/dev/sdb bs=1k count=2048
Change sdb (in red) to your drive ID (sdb, sdc, sdd, etc.)
It should return similar info as saintless' example after running.
Plugin the flash drive and wipe it: In my example it is /dev/sdb. Be careful to type the correct drive if it is different for you.

Code: Select all

dd if=/dev/zero of=/dev/sdb bs=1k count=2048 
2048+0 records in
2048+0 records out
2097152 bytes (2.1 MB) copied, 5.07566 s, 413 kB/s
I have used this numerous times, make sure you aim at the correct drive if you use it because it wipes the drive.

Have fun!

Edit:
I just noticed that forum member pcplague2 already suggested this method.

.

User avatar
Sky Aisling
Posts: 1368
Joined: Sat 27 Jun 2009, 23:02
Location: Port Townsend, WA. USA

How to clear a flash drive of Xubuntu?

#18 Post by Sky Aisling »

pcplague2, perdido


I think I fried the flash drive.


Sky

PS -That's ok. Worst things could happen. lol
Attachments
Dev Zero SDB.png
(64.3 KiB) Downloaded 32 times
No Partition Table Found.png
(45.81 KiB) Downloaded 132 times
Unrecognized Disk Label.png
(59.56 KiB) Downloaded 132 times

User avatar
perdido
Posts: 1528
Joined: Mon 09 Dec 2013, 16:29
Location: ¿Altair IV , Just north of Eeyore Junction.?

Re: How to clear a flash drive of Xubuntu?

#19 Post by perdido »

Sky Aisling wrote:pcplague2, perdido


I think I fried the flash drive.


Sky

PS -That's ok. Worst things could happen. lol
Hi Sky,
Don't throw it away yet! :)
Screen caps look normal, now proceed to the following.

Try making an msdos partition table using gparted
Device-->Create Partition Table (msdos should be default choice in window)

Then format the drive, voila! (I hope)

.

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#20 Post by bigpup »

Any drive has to have two things.
First, a partition table.
Second, at least one partition, formatted in some format.

Whatever you did, probably deleted the partition table.
With no partition table, there cannot be any partitions.

First make a partition table.
Than make a partition(s) and format the partition(s).
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
Sky Aisling
Posts: 1368
Joined: Sat 27 Jun 2009, 23:02
Location: Port Townsend, WA. USA

How to clear a flash drive of Xubuntu? [SOLVED]

#21 Post by Sky Aisling »

OK, you all...
I dug it back out of the waste paper basket.
And, ...
Attachments
Viola Saved The Drive.png
(171.59 KiB) Downloaded 39 times

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#22 Post by Mike Walsh »

I had to do the same stuff earlier on today, to a 64 GB USB 3.0 SanDisk Cruzer 'Ultra' Fit nano-sized thumb drive.

I'd been playing around with a particular, specialist Linux multimedia distro, a few months back (been in my odds & ends drawer for the last couple of months) - I forget what it was called now - but it did lots of weird stuff to the drive; creating 3 partitions, 2 of which weren't visible to gParted, and the icing on the cake was that it formatted the drive to ISO 9660. That's what optical discs use, and it is the biggest PITA you can imagine to recover a drive afterwards. ISO 9660 is 'read-only', y'see, so the only way to overwrite it is at the machine-code level.....gParted won't touch it, and gives all sorts of errors (including the famous libparted one).

Every time I've had this happen - you'd be amazed at the number of distros that seem to use this setup for flash-drive installs - the only solution is to wipe the entire drive with

Code: Select all

dd if=/dev/zero of=/dev/sdX bs=1M
.....followed by perdido's suggestion to first create a partition table, then creating your partitions as normal. It's the only way to reliably recover any drive from this sort of 'intentional' balls-up. Re-creating the partition table is necessary after using dd for this one, because it sets every single memory 'cell' in the flash memory to the same '0' value.

My view is that usage of the ISO 9660 file-system, intentional or otherwise, is indicative of "lazy" developers.They're literally copying the entire ISO over, without doing a proper re-format in the interim; the fact that it works is neither here nor there......it's not being done correctly.


Mike. :wink:

User avatar
Sky Aisling
Posts: 1368
Joined: Sat 27 Jun 2009, 23:02
Location: Port Townsend, WA. USA

How to clear a flash drive of Xubuntu? [SOLVED]

#23 Post by Sky Aisling »

What a lot of work for one tiny flash drive!
However, what's a Puppyteer to do when she's on lock down for another month and there's no business in town open that sells flash drives?
Thank you everyone, that was fun once I got past the annoyance of failure.

The reason why I had put an Xubuntu on the drive was that a friend who lives in another state calls me frequently to help her with her 'Linux' issues. She runs Xubuntu Bionic Beaver v 18.something. So, I made the drive in order to see what she is seeing on her screen. Xubuntu as a flash drive demo was awkward at best to navigate. I switched from Xubuntu to Puppy years ago. I prefer the quick, light-footed response of a Puppy iso. Plus I like the versatility of running it via various media and the fact that it runs and loads into RAM.

And, see what interesting people I meet on this forum?

Mike you write:
Re-creating the partition table is necessary after using dd for this one, because it sets every single memory 'cell' in the flash memory to the same '0' value.
I wondered about that when I saw that it appeared to be only clearing a portion of the drive. Setting any file back to zero is old fashsion legacy theory which apparently still applies to modern files.

Dry Falls
Posts: 616
Joined: Tue 16 Dec 2014, 23:37
Location: Upper Columbia

#24 Post by Dry Falls »

Mike Walsh wrote:Every time I've had this happen - you'd be amazed at the number of distros that seem to use this setup for flash-drive installs - the only solution is to wipe the entire drive with

Code: Select all

dd if=/dev/zero of=/dev/sdX bs=1M
Hi Mike. This method is probably easiest, but for the last five or so years I've had no problem with gparted (Right click; "delete") to wipe a 4G sandisc cruzer formatted ISO 9660 and then "create Partition Table" from the menu. The stick is still going strong.

df

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#25 Post by bigpup »

A drive formatted ISO 9660 does not use a partition table.
Basically, it is formatted like a CD.
An ISO 9660 file system is a standard CD-ROM file system that allows you to read the same CD-ROM whether you're on a PC, Mac, or other major computer platform.
To make partitions.
The drive has to first have a partition table.

Using Gparted.
Making the partition table, usually deletes everything on drive.
Especially on a drive that had a partition table.

But that dd command does it for sure.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

Post Reply