Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I recently installed Fedora 9 on a 16GB Flash Drive to try it and now want to remove it. I am trying to remove the linux partition on my USB drive. The linux partition has no drive letter so windows doesn't recognize it. my drive shows that there is about 197MB free space out of 198MB total on drive F. So can someone please help my regain all 16GB of my drive.
Thanks
I normally wipe my flash drives when cleaning them up. Seeing as you have Xandros, run fdisk -l command as root with the pen drive plugged in to see which device it is. Let's say it is /dev/sdb, now use dd to wipe it of all data, partitions, and MBR information with command: dd if=/dev/zero of=/dev/sdb.
When it's done in half hour or so, boot into Windows and plug it in, it should show up as a drive but when you try to access it Windows will say it is not formatted and asks if you want to format it, go ahead and do it, give it a name in the label field. After formatting you will be left with a 16GB pen drive (minus space used for formatting) clean and ready to go.
I normally wipe my flash drives when cleaning them up. Seeing as you have Xandros, run fdisk -l command as root with the pen drive plugged in to see which device it is. Let's say it is /dev/sdb, now use dd to wipe it of all data, partitions, and MBR information with command: dd if=/dev/zero of=/dev/sdb.
When it's done in half hour or so, boot into Windows and plug it in, it should show up as a drive but when you try to access it Windows will say it is not formatted and asks if you want to format it, go ahead and do it, give it a name in the label field. After formatting you will be left with a 16GB pen drive (minus space used for formatting) clean and ready to go.
FYI using the dd command as described will wipe out the partition table. You will need to create a new partition and format it.
Yup, apparently there is something wrong with it as it appears to only be a few megs and it should be 16GB. So a new one needs to be created. I'm guessing it's a Volume group thing since Fedora was installed on it, and all that appears is a /boot partition.
Just plug the zeroed drive in Windows and one or two clicks later you have one clean, formatted, 16GB (a little less) partition and a good partition table. Which is what we're after.
Quote:
That's one write per sector - an awful lot to waste on a USB. I might be inclined to limit it to a couple of hundred or so.
I agree, but I'm being lazy here, trying save on typing. I usually have dcfldd installed and issue that same command starting with dcfldd which defaults to block/cluster size rather than one sector which is dd's default. (If that's what you're implying). I guess one could run an extra command to find the block size and use that for a bs value, blame it on the laziness.
Quote:
Well, I did it but had no luck...
That's odd...can you elaborate?
I hope you checked with fdisk -l command first to find which is the USB flash drive. If you used my example without checking, you may have got a null response or wiped your second hard drive.
My mother always sends me power point presentations with nice pictures and asks me to extract the pictures individually. Since I have all the data recovery tools in my VM Debian, I wipe my 128MB flash drive this way, recreate and format the partition (same amount of time in Windows whether there is an existing partition or not), copy and paste the power point presentation in it and run foremost to extract the .jpg photos. And I don't have to sift through tons of .jpg photos from residual data because I cleaned it off first.
I once extracted them with gimp or open office impress (forget which one), but don't install them anymore.
I do this at least once a month average.
.. defaults to block/cluster size rather than one sector which is dd's default. (If that's what you're implying).
Sorta - the underlying blocksize is basically irrelevant when using /dev/zero as a source. I use a count of a couple of hundred to ensure the "important" bits are blatted, but I haven't found a real need to over-write the entire device.
As usual, YMMV (general statement, not specifically directed at Junior Hacker)
but I haven't found a real need to over-write the entire device.
You probably haven't done any data recovery, I do. Oh! the stories I can tell about the contents of the drives I came across, which is why I adopted this "clean it up is a good thing" approach.
I don't have to meet the owner to tell you what they look like, where they come from, where their going, their habits, desires, fetishes, children's names, vital personal information, etc. are. And based on my experience, the majority of computer users are very complacent in this area.
I guess, for some users, just overwriting the MBR would suffice: dd if=/dev/zero of=/dev/sdb bs=512 count=1
But I recommend taking a bath once and a while.
It was the OP's own USB key - he probably already knows what secrets lurk there. Anything sufficiently secret would justify physical destruction of a key; even 16 Gig.
And one sector is never enough - I've found you need (at least) to scrub the first couple of "cylinders" at a minimum.
I found the device and ran dd if=/dev/zero of=/dev/sdb1. It took some time then when done I went into windows to format it and under capacity it was still 198mb.
Well, there was a spark when I just read that.
I remember a similar situation in an older thread where there were encrypted or locked partitions on a USB pen drive that someone got from his/her boss or something that were giving them issues like this. And offhand, I'm not sure what became of that particular thread at the moment. There might be some brain activity in the future, I'll report back if so.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.