Approver
354
edits
(the shuffle ;D + minor style "improvement"(I think it is one)) |
StarlitSkies (talk | contribs) m (forgot to add a sudo for fdisk) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
This is an add-on section for completely recreating an SD card's filesystem using | This is an add-on section for completely recreating an SD card's filesystem using fdisk and mkfs. This should only be done if formatting does not fix your issue or is not possible for some reason. | ||
This page is for Linux users only. If you are not on Linux, see the [[SD Clean/Windows|Windows]] and/or [[SD Clean/Mac|Mac]] pages instead. | This page is for Linux users only. If you are not on Linux, see the [[SD Clean/Windows|Windows]] and/or [[SD Clean/Mac|Mac]] pages instead. | ||
Line 6: | Line 6: | ||
{{warning|Before beginning these steps, copy all of your SD card's contents to a folder on your computer.}} | {{warning|Before beginning these steps, copy all of your SD card's contents to a folder on your computer.}} | ||
{{warning|The commands in this guide are case-sensitive. Enter them exactly as written, or there may be unintended consequences.}} | {{warning|The commands in this guide are case-sensitive. Enter them exactly as written, or there may be unintended consequences.}} | ||
Line 37: | Line 21: | ||
# For each partition of the disk, type <code>umount /dev/<device name>i</code>. | # For each partition of the disk, type <code>umount /dev/<device name>i</code>. | ||
#* Replace <code>i</code> with the partition number you are unmounting. | #* Replace <code>i</code> with the partition number you are unmounting. | ||
# Type <code>fdisk /dev/<device name></code>. | # Type <code>sudo fdisk /dev/<device name></code>. | ||
# | # Enter <code>o</code>, then enter <code>n</code> and go through all the resulting prompts without changing settings. | ||
#* If it asks whether to remove a VFAT signature, choose to remove it. | #* If it asks whether to remove a VFAT signature, choose to remove it. | ||
# Once you are back at fdisk's main menu, | # Once you are back at fdisk's main menu, enter <code>t</code> and then enter <code>0c</code> | ||
# | # Enter <code>a</code> and then <code>p</code> - observe the output, and make sure the device is now formatted correctly. | ||
# If there are no issues, | # If there are no issues, enter <code>w</code> - this will save changes and exit the fdisk prompt. | ||
# Type <code>sudo mkfs.vfat /dev/ | # Type <code>sudo mkfs.vfat /dev/<device name> -s 64</code> to reformat the new partition. | ||
#* If the SD card is over 32GB in size, change </code>64</code> to <code>128</code> | #* If the SD card is over 32GB in size, change </code>64</code> to <code>128</code> | ||
# Type <code>sudo eject /dev/ | # Type <code>sudo eject /dev/<device name></code>, then remove and reinsert the SD card. | ||
# Copy your data back onto the SD card. | # Copy your data back onto the SD card. |