{"id":30497,"date":"2018-02-28T18:08:52","date_gmt":"2018-02-28T12:38:52","guid":{"rendered":"https:\/\/www.wikitechy.com\/technology\/?p=30497"},"modified":"2018-02-28T18:08:52","modified_gmt":"2018-02-28T12:38:52","slug":"fix-broken-usb-drive-using-linux","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/technology\/fix-broken-usb-drive-using-linux\/","title":{"rendered":"How To Fix A Broken USB Drive Using Linux"},"content":{"rendered":"<h4 id=\"introduction\"><strong>Introduction<\/strong><\/h4>\n<p>Occasionally while people create a linux usb drive they discover that the force seems to come to be unusable.<\/p>\n<p>This manual will show you a way to format the usb pressure again the use of linux so that you can copy files to it and use it as you in the main might.<\/p>\n<p>After you have got followed this guide your usb drive can be usable on any machine capable of analyzing a fat32 partition.<\/p>\n<p>Each person familiar with windows will notice that the fdisk tool used inside linux is just like the diskpart device.<\/p>\n<h4 id=\"delete-the-partitions-the-usage-of-fdisk\"><strong>Delete the partitions the usage of fdisk<\/strong><\/h4>\n<p>Open a terminal window and sort the subsequent command:<\/p>\n<p>Sudo fdisk -l<\/p>\n<p>This could tell you which of them drives are available and it additionally gives you info of the walls at the drives.<\/p>\n<p>In windows a power is distinguished through its drive letter or inside the case of the diskpart device every drive has various.<\/p>\n<p>In linux a power is a device and a device is dealt with similar to any other file. Therefore the drives are named \/dev\/sda, \/dev\/sdb, \/dev\/sdc and so on.<\/p>\n<p>Look for the pressure which has the identical ability as your usb force. As an example on an eight gigabyte drive it is going to be reported as 7.5 gigabytes.<\/p>\n<p>If you have the proper pressure type the following command:<\/p>\n<p>Sudo fdisk \/dev\/sdx<\/p>\n<p>Replace the x with the precise drive letter.<\/p>\n<p>This will open a new activate referred to as \u201ccommand\u201d. The \u201cm\u201d key may be very helpful with this device but basically you want to recognise 2 of the commands.<\/p>\n<p>The first is delete.<\/p>\n<p>Enter \u201cd\u201d and press the go back key.<\/p>\n<p>If your usb pressure has a couple of partition it\u2019ll ask you to enter quite a number for the partition you want to delete. In case your pressure simplest has one partition then it is going to be marked for deletion.<\/p>\n<p>If you have more than one partitions hold entering \u201cd\u201d after which input partition 1 till there aren\u2019t any walls left to be marked for deletion.<\/p>\n<p>The following step is to write the modifications to the pressure.<\/p>\n<p>Input \u201cw\u201d and press go back.<\/p>\n<p>You now have a usb pressure and not using a walls. At this stage it\u2019s miles absolutely unusable.<\/p>\n<h4 id=\"create-a-new-partition\"><strong>Create a new partition<\/strong><\/h4>\n<p>Inside the terminal window open fdisk again as you did before with the aid of specifying the call of the usb device document:<\/p>\n<p>Sudo fdisk \/dev\/sdx<\/p>\n<p>As earlier than replace the x with an appropriate pressure letter.<\/p>\n<p>Enter \u201cn\u201d to create a new partition.<\/p>\n<p>You may be asked to pick out between developing a number one or extended partition. Select \u201cp\u201d.<\/p>\n<p>The following step is to pick out a partition variety. You handiest want to create 1 partition so enter 1 and press return.<\/p>\n<p>Ultimately you need to choose the start and end sector numbers. To apply the complete pressure press go back two times to keep the default options.<\/p>\n<p>Enter \u201cw\u201d and press return.<\/p>\n<h4 id=\"refresh-the-partition-desk\"><strong>Refresh the partition desk<\/strong><\/h4>\n<p>A message might also appear declaring that the kernel continues to be the usage of the old partition table.<\/p>\n<p>Absolutely input the subsequent into the terminal window:<\/p>\n<p>Sudo partprobe<\/p>\n<p>The partprobe device sincerely informs the kernel or partition desk modifications. This saves you having to reboot your computer.<\/p>\n<p>There are multiple switches you may use with it.<\/p>\n<p>Sudo partprobe -d<\/p>\n<p>The minus d switch lets you strive it without it updating the kernel. The d stands for dry run.<\/p>\n<p>This is not overly useful.<\/p>\n<p>Sudo partprobe -s<\/p>\n<p>This presents a summary of the partition table with output just like the following:<\/p>\n<pre>\/dev\/sda: gpt walls 1 2 three four\r\n\r\n\/dev\/sdb: msdos partitions 1<\/pre>\n<h4 id=\"create-a-fat-filesystem\"><strong>Create a FAT filesystem<\/strong><\/h4>\n<p>The final step is to create the fats filesystem.<\/p>\n<p>Input the subsequent command into the terminal window:<\/p>\n<p>Sudo mkfs.Vfat -f 32 \/dev\/sdx1<\/p>\n<p>Replace the x with the letter to your usb pressure.<\/p>\n<h4 id=\"mount-the-force\"><strong>Mount the force<\/strong><\/h4>\n<p>To mount the drive run the following commands:<\/p>\n<p>Sudo mkdir \/mnt\/sdx1<\/p>\n<p>Sudo mount \/dev\/sdx1 \/mnt\/sdx1<\/p>\n<p>As before update the x with the proper power letter.<\/p>\n<h4 id=\"summary\"><strong>summary<\/strong><\/h4>\n<p>You have to now be able to use the usb power on any laptop and replica documents to and from the force as regular.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This manual will show you a way to format the usb pressure again the use of linux so that you can copy files to it and use it as you in the main might.<\/p>\n","protected":false},"author":2,"featured_media":30500,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1699],"tags":[84459,84465,84458,84462,84464,84463,84461,84460],"class_list":["post-30497","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-fix-partition-table-usb-drive-linux","tag-fix-usb-pen-drive-linux","tag-how-to-fix-a-corrupted-flash-drive-linux","tag-how-to-fix-unmounted-usb","tag-how-to-format-raw-pen-drive-in-linux","tag-how-to-repair-a-memory-stick-in-linux","tag-linux-usb-no-medium-found","tag-ubuntu-repair-usb"],"_links":{"self":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/30497","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/comments?post=30497"}],"version-history":[{"count":0,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/30497\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/media\/30500"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/media?parent=30497"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/categories?post=30497"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/tags?post=30497"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}