Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Bad sectors in flash drive.


07 Aug 2012   #1

windows XP
 
 
Bad sectors in flash drive.

Hi,
I need help in explicitly creating bad sectors in a flash drive. Is making bad sectors possible by repeadly disconnecting flash drive during file write process ??
How can a flash drive develop bad sectors in its memory ??

Thanks,
Anirudh

My System SpecsSystem Spec
.

07 Aug 2012   #2

Windows 7 Professional x64
 
 

Quote   Quote: Originally Posted by anirudhghanta View Post
Hi,
I need help in explicitly creating bad sectors in a flash drive. Is making bad sectors possible by repeadly disconnecting flash drive during file write process ??
How can a flash drive develop bad sectors in its memory ??

Thanks,
Anirudh
It is ill advised to disconnect a drive during the write process because the data can easily be corrupted and create bad sectors. Additionally, a flash drive has a limited number of write cycles and wears down over time, also, causing bad sectors.

HTH
My System SpecsSystem Spec
07 Aug 2012   #3

Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
 
 

Quote   Quote: Originally Posted by anirudhghanta View Post
Hi,
I need help in explicitly creating bad sectors in a flash drive. Is making bad sectors possible by repeadly disconnecting flash drive during file write process ??
How can a flash drive develop bad sectors in its memory ??

Thanks,
Anirudh
Try formatting your flash drive. Then, in future never just disconnect without useing the Windows "Safely remove hardware and eject media" icon!
My System SpecsSystem Spec
.


07 Aug 2012   #4
Microsoft MVP

 

Run a Disk Check on stick.

To get it cleanest, esp if it's been formatted as bootable, wipe the stick first with Diskpart Clean Command then format/
My System SpecsSystem Spec
07 Aug 2012   #5

Windows 7 Home Premium 32 bit
 
 

Quote   Quote: Originally Posted by anirudhghanta View Post
Hi,
I need help in explicitly creating bad sectors in a flash drive. Is making bad sectors possible by repeadly disconnecting flash drive during file write process ??
How can a flash drive develop bad sectors in its memory ??

Thanks,
Anirudh
I am curious to know what exactly is the purpose for creating bad sectors in a flash drive.

When you repeatedly keep writing and deleteing data, the flash drive will definitely age and bad sectors will be created.

One has to keep in mind, irrespective of how much data one writes into the pendrive ( one need not necessarily fill the pendrive) the flash controller tracks it and each time it writes to different sectors. In other words the data is spread uniformly among all sectors as you keep writing and erasing it so that all sectors age more or less uniformly.

The other point to note is that as bad sectors are created these are taken out of service and replaced by sectors reserved specifically for this purpose.. So in actual practice even if you manage to create bad sectors you may not notice it until........all the reserved sectors are exhausted and that point ....... your pendrive will become "write protected" ( The flash controller's safety mechanism will not allow you to write any more data into it. End of life and sudden death to the pendrive.)

So I presume you will never be able to see any bad sectors even if these are intentionally created by trying an accelerated aging process.
My System SpecsSystem Spec
24 Aug 2012   #6

windows XP
 
 

Hi jumanji,

Thanks for the info, what I want to make clear is that - I am trying to write some data onto the usb stick using simple write commands in embedded c giving the write location and size and closing the file,Just to check if the file can be created of a particular size without writing any data into it . I also made it iterative and made it run for a while. Now the USB stick shows some bad sectors. My usb port is also a little malfunctioning.

Now, what i want to know is - Is there any way that my simple write algo went wrong without closing and started a new loop and can this cause bad sectors ??


Thanks and regards,
Anirudh
My System SpecsSystem Spec
24 Aug 2012   #7

Windows 7 Home Premium 32 bit
 
 

1. How have you decided the USB stick shows some bad sectors?

2. What specific malfunction have you noticed in the USB port and how?

Well I am just curious. I am not a programming expert but what all I understand is that you are trying to create a sort of template of a fixed size and perhaps a fixed location ( whether logical or physical I do not know) for your file-writing (embedding). Beyond that it is all greek and latin to me and so I will not enter into it.

However as I had indicated in my previous post, in a flash storage device (e.g. USB stick, SD-Card), the flash controller implements a flash translation layer, so there is no actual correspondence of logical sectors and physical memory sectors. Bad flash sectors should be sorted out by the flash controller and remapped into the reserve sectors. So you will not come to know of the bad sectors in normal usage. And that is why my first question.

As far as the second question is concerned, it is well known that on some computers the files written on flash drives plugged into the front ports may become corrupt due to most probably interference in the cable. So I have been thinking whether this is the one you are referring to or experiencing.

You are doing some experimentation/trial. Then my intuition tells that

1.You should in the first instance use a known-to-be good new pen-drrive ( not an old pendrive that has seen many write/ read cycles and prone to develop bad sectors due to aging)

2. You should rather use the rear ports on the motherboard and not the front ports.

EDIT: Always format your flash drive with SD Formatter. https://www.sdcard.org/downloads/formatter_3/
My System SpecsSystem Spec
Reply

 Bad sectors in flash drive.




Thread Tools



Similar help and support threads for2: Bad sectors in flash drive.
Thread Forum
Imaging/Cloning Drive with Bad Sectors Backup and Restore
How to fix current pending sectors on external drive? Hardware & Devices
Solved Hard Drive With BAD SECTORS HELP! Hardware & Devices
Solved Hard Drive With BAD SECTORS HELP! Backup and Restore
Bad Sectors on Hard Drive, Can no longer boot Windows 7 Hardware & Devices
Hard Drive diagnostics report bad sectors Performance & Maintenance
Removing C drive with Boot Sectors Installation & Setup

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 05:51 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33