# Does anyone know how  repair the USB/SD flash memory  with FreeBSD?



## teo (Dec 23, 2017)

Hello community!

 I'm testing FreeBSD on this main machine, and I need to repair those devices as USB memory flash and SD memory card with the FreeBSD  system, in linux is usually done those little details.


----------



## getopt (Dec 23, 2017)

Applied "anything goes" sometimes creates beautiful "this & those" prose. Thank you for sharing your artwork.


----------



## ronaldlees (Dec 25, 2017)

??

To the OP:  I'd not use such a utility (even on Linux) unless it came from the manufacturer (rare).


----------



## ralphbsz (Dec 25, 2017)

You need to explain what you mean by "repair".  It could be anything from normal user-space file administration (deleting older files when the file system gets full) to hardware maintenance (resoldering loose surface-mount connections).  The OP probably means something in the middle.


----------



## teo (Dec 26, 2017)

ralphbsz said:
			
		

> You need to explain what you mean by "repair".  It could be anything from normal user-space file administration (deleting older files when the file system gets full) to hardware maintenance (resoldering loose surface-mount connections).  The OP probably means something in the middle.


What when a USB memory  is defective? It is repaired by commands in the terminal to make it look as if it were new, at least that is done in linux easily, translate and  read this link as it is done in linux.

https://usuariodebian.blogspot.com.es/search?q=reparar+usb


----------



## herrbischoff (Dec 26, 2017)

So you expect us to somehow understand a Spanish blog post in an English language forum and cannot even precisely specify/summarize what exactly it is you want to achieve? This place is rapidly becoming more similar to Stack Overflow.

fdisk is available on FreeBSD as well. Have you even tried applying the steps to FreeBSD and adapting by reading the manpages?


----------



## ralphbsz (Dec 26, 2017)

Fortunately, I can actually read Spanish (my mother tongue is Portuguese).  So you have a problem with the NTFS (serious, not FAT!) file system on a USB stick.  What you call "repair" is actually running the existing Linux utility ntfsfix, which is part of the ntfsprogs package on various Linux distributions, or using fdisk and friends to completely reformat the USB stick.  By the way, the same ntfsprogs package exists for FreeBSD, you can download the port, and run it.  So in this respect there is no difference between Linux and FreeBSD (assuming absence of bugs, and I haven't personally checked).

The real issue is that your posts continue to be unclear.  You are talking about "USB memory defective", and repairing it.  The problem is *not* the USB memory: both the USB interface and the memory cells (the individual bytes) are likely perfectly fine.  The problem in your case is that the file system has become corrupted.  The reason for that might theoretically be a hardware problem, but much more likely it is a software problem in the various NTFS implementations used here: the various NTFS emulators on Unix-based operating systems are all famously buggy.  Your original post should have asked about how to repair NTFS file systems.


----------

