Page 1 of 2

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

Posted: Thu 14 May 2020, 17:47
by Sky Aisling
Hello, :)
I placed an Xubuntu distro on a flash drive to try out.
I now want to clean the drive off and reset to the original Fat32 partition.
Apparently, Xubuntu created two partitions on the drive.
Gparted cleared one partition but not the partition that has Xubuntu files.
Gparted gives a 'libparted' error.

The drive is a Sandisk Cruzer 4GB.
The Xubuntu iso was installed by YAPI.
My working distro is Dpup Stretch run from a flash drive sda1.

How do I clean this drive back to original configuration?

Thank you in advance for any suggestions.

Sky

Posted: Thu 14 May 2020, 20:00
by pcplague2
You have to unmount before or do it on other pc

How to clear a flash drive of Xubuntu?

Posted: Thu 14 May 2020, 21:26
by Sky Aisling
pcplague2 writes:
You have to unmount before or do it on other pc
Thank you, pcplague2, however that doesn't work.

Sky

Posted: Thu 14 May 2020, 21:42
by O.F.I.N.S.I.S.
Probably removing/deleting all files from sdb4 will help?
After this delete all partitions and create new ones will do the job?

How to clear a flash drive of Xubuntu?

Posted: Thu 14 May 2020, 21:59
by Sky Aisling

O.F.I.N.S.I.S.
writes:
Probably removing/deleting all files from sdb4 will help?
After this delete all partitions and create new ones will do the job?
Thanks O.F.I.N.S.I.S., all the files shown are 'Read Only' restricted files, no deleting.

Sky

Posted: Thu 14 May 2020, 22:04
by pcplague2
Found this

Backup all your data from that drive, we will overwrite it.

Find the device using blkid

It will be like /dev/sdd.

Now run:

dd if=/dev/zero of=/dev/sdd bs=4M count=10
This will overwrite the partition table and the first 40MB. After doing this, just create the partitioning the way you want it.

Posted: Thu 14 May 2020, 22:23
by Terry H
Have you tried creating a new partition table? GParted > Device > Create new partition table. This should erase all data on the drive.

Posted: Thu 14 May 2020, 22:24
by O.F.I.N.S.I.S.
If the none of the above solutions won't work, try to format it using Windows - if somehow possible.

Windows will see ext formatted flash drives as not formatted.

Don't use quick format then.

How to clear a flash drive of Xubuntu?

Posted: Thu 14 May 2020, 22:46
by Sky Aisling
Terry H writes:
Have you tried creating a new partition table? GParted > Device > Create new partition table. This should erase all data on the drive.
Thanks, Terry H

Gparted won't let new partitioning happen in this case.

Terry
, my apologies...I was looking at 'Partition' drop down not 'Device' drop down. Looking at 'Device' drop down would have helped solve the issue. :oops:

How to clear a flash drive of Xubuntu?

Posted: Thu 14 May 2020, 22:55
by Sky Aisling
Hi, pcplague2, O.F.I.N.S.I.S., Terry H
Thank you all for your suggestions.

Actually, I think there is a better place to post this question.

I created the Xubuntu flash stick here:

How to use Puppy to install a non-puppy .iso to flash drive?
http://murga-linux.com/puppy/viewtopic. ... 1768062989

I'm going to see if I can contact Flash and switch this thread as a post to http://murga-linux.com/puppy/viewtopic. ... 1768062989 so that some more of the background can be seen.

Sky

Posted: Thu 14 May 2020, 23:00
by Semme
I'd say you have to boot Stretch, or your working OS here -- LIVE!

Posted: Thu 14 May 2020, 23:04
by Gordie
I run into this problem all the time. Somehow when writing an iso to a USB decides to make more than one partition so as to include a boot directory for EUFI boot it creates problems with flash drives. I have no trouble with "legacy boot only" isos but now, with EUFI can expect less than 10 uses before my thumb drives are toast (smoked,nuked beyond repair).
My best results have been with using Windows to format them however even that has it's limitations.

Buy lots of them and buy em for as cheap as you possibly can because you are going to need a bushel of them

Posted: Thu 14 May 2020, 23:14
by Semme

How to clear a flash drive of Xubuntu?

Posted: Fri 15 May 2020, 01:24
by Sky Aisling
Semme writes:
Thanks Semme. That looks like the answer. I remember having this same issue years ago when UEFI firmware came into play.

Sky

Posted: Fri 15 May 2020, 11:46
by Semme
When you give yourself the go-ahead, I've built a *systemd-less* lvm2 pkg that inlcudes the binaries you'll need.

How to clear a flash drive of Xubuntu?

Posted: Fri 15 May 2020, 15:31
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

Posted: Fri 15 May 2020, 16:47
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.

.

How to clear a flash drive of Xubuntu?

Posted: Sat 16 May 2020, 01:54
by Sky Aisling
pcplague2, perdido


I think I fried the flash drive.


Sky

PS -That's ok. Worst things could happen. lol

Re: How to clear a flash drive of Xubuntu?

Posted: Sat 16 May 2020, 04:13
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)

.

Posted: Sat 16 May 2020, 05:25
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).