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? [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