Formatting an SD card/Linux: Difference between revisions
From Hacks Guide Wiki
More actions
change GNOME Disks to "Disks" |
SDs over 64GB need 64KB cluster size (because 128 sectors * 512-byte sector size), not 32GB |
||
| (5 intermediate revisions by one other user not shown) | |||
| Line 1: | Line 1: | ||
<languages /> | |||
<translate> | <translate> | ||
<!--T:1--> | <!--T:1--> | ||
| Line 6: | Line 8: | ||
This page is for Linux users only. If you are not on Linux, check out the [[Special:MyLanguage/Formatting an SD card/Windows|Windows]] or [[Special:MyLanguage/Formatting an SD card/Mac|Mac]] pages. | This page is for Linux users only. If you are not on Linux, check out the [[Special:MyLanguage/Formatting an SD card/Windows|Windows]] or [[Special:MyLanguage/Formatting an SD card/Mac|Mac]] pages. | ||
== Instructions == <!--T:3--> | ==Instructions== <!--T:3--> | ||
</translate> | </translate> | ||
{{warning|text=<translate><!--T:4--> Before beginning these steps, copy all of your SD card's contents to a folder on your computer.</translate>}} | {{warning|text=<translate><!--T:4--> Before beginning these steps, copy all of your SD card's contents to a folder on your computer.</translate>}} | ||
{{warning|<translate><!--T:5--> The commands in this guide are case-sensitive. Enter them exactly as written, or there may be unintended consequences.</translate>}} | {{warning|<translate><!--T:5--> The commands in this guide are case-sensitive. Enter them exactly as written, or there may be unintended consequences.</translate>}} | ||
<tabber> | <tabber>|-|fdisk= | ||
|-|fdisk= | |||
<span> | <span> | ||
| Line 49: | Line 50: | ||
<li><translate><!--T:21--> If there are no issues, enter <code>w</code> - this will save changes and exit the fdisk prompt</translate></li> | <li><translate><!--T:21--> If there are no issues, enter <code>w</code> - this will save changes and exit the fdisk prompt</translate></li> | ||
<li><translate><!--T:22--> Type <code>sudo mkfs.vfat /dev/<partition name> -s 64</code> to reformat the new partition</translate> | <li><translate><!--T:22--> Type <code>sudo mkfs.vfat /dev/<partition name> -s 64</code> to reformat the new partition</translate> | ||
<ul><li><translate><!--T:23--> If the SD card is over | <ul><li><translate><!--T:23--> If the SD card is over 64GB in size, change <code>64</code> to <code>128</code></translate></li></ul></li> | ||
<li><translate><!--T:24--> Type <code>sudo eject /dev/<device name></code>, then remove and reinsert the SD card</translate></li> | <li><translate><!--T:24--> Type <code>sudo eject /dev/<device name></code>, then remove and reinsert the SD card</translate></li> | ||
<li><translate><!--T:25--> If the SD card had any files and folders on it before the format, copy everything back from your computer, unless you were linked to this by another guide that needs the SD to be formatted and blank</translate></li> | <li><translate><!--T:25--> If the SD card had any files and folders on it before the format, copy everything back from your computer, unless you were linked to this by another guide that needs the SD to be formatted and blank</translate></li> | ||
| Line 76: | Line 77: | ||
<li><translate><!--T:35--> Type <code>sudo parted -a opt /dev/<device name> mkpart primary fat32 0% 100%</code></translate></li> | <li><translate><!--T:35--> Type <code>sudo parted -a opt /dev/<device name> mkpart primary fat32 0% 100%</code></translate></li> | ||
<li><translate><!--T:36--> Type <code>sudo mkfs.vfat /dev/<partition name> -s 64</code> to reformat the new partition</translate> | <li><translate><!--T:36--> Type <code>sudo mkfs.vfat /dev/<partition name> -s 64</code> to reformat the new partition</translate> | ||
<ul><li><translate><!--T:37--> If the SD card is over | <ul><li><translate><!--T:37--> If the SD card is over 64GB in size, change <code>64</code> to <code>128</code></translate></li></ul></li> | ||
<li><translate><!--T:38--> Type <code>sudo eject /dev/<device name></code>, then remove and reinsert the SD card</translate></li> | <li><translate><!--T:38--> Type <code>sudo eject /dev/<device name></code>, then remove and reinsert the SD card</translate></li> | ||
<li><translate><!--T:39--> If the SD card had any files and folders on it before the format, copy everything back from your computer, unless you were linked to this by another guide that needs the SD to be formatted and blank</translate></li> | <li><translate><!--T:39--> If the SD card had any files and folders on it before the format, copy everything back from your computer, unless you were linked to this by another guide that needs the SD to be formatted and blank</translate></li> | ||
| Line 91: | Line 92: | ||
<li><translate><!--T:43--> Insert your SD card and click <code>Refresh Devices</code>. The new device that shows up in the left pane is your SD card</translate></li> | <li><translate><!--T:43--> Insert your SD card and click <code>Refresh Devices</code>. The new device that shows up in the left pane is your SD card</translate></li> | ||
<li><translate><!--T:44--> Click your SD card, then click the <code>New Partition Table</code> button at the top of the window </translate></li> | <li><translate><!--T:44--> Click your SD card, then click the <code>New Partition Table</code> button at the top of the window </translate></li> | ||
<li><translate><!--T:45--> When asked, choose <code>Ms-Dos</code>. Do '''NOT''' use <code>GPT</code></translate><br>[[File:KDE Partition Manager - MBR.png]]</li> | <li><translate><!--T:45--> When asked, choose <code>Ms-Dos</code>. Do '''NOT''' use <code>GPT</code></translate><br><translate><!--T:65--> [[File:KDE Partition Manager - MBR.png]]</translate></li> | ||
<li><translate><!--T:46--> Right click the <code>unallocated</code> space in the right pane and select <code>New</code></translate></li> | <li><translate><!--T:46--> Right click the <code>unallocated</code> space in the right pane and select <code>New</code></translate></li> | ||
<li><translate><!--T:47--> When selecting your filesystem, choose <code>FAT32</code> from the drop-down menu. The window should look like this: </translate><br>[[File:KDE Partition Manager - New Partition.png]]</li> | <li><translate><!--T:47--> When selecting your filesystem, choose <code>FAT32</code> from the drop-down menu. The window should look like this: </translate><br><translate><!--T:66--> [[File:KDE Partition Manager - New Partition.png]]</translate></li> | ||
<li><translate><!--T:48--> Click <code>OK</code>, then click <code>Apply</code>, then <code>Apply Pending Operations</code></translate></li> | <li><translate><!--T:48--> Click <code>OK</code>, then click <code>Apply</code>, then <code>Apply Pending Operations</code></translate></li> | ||
<li><translate><!--T:49--> Eject and reinsert your SD card</translate></li> | <li><translate><!--T:49--> Eject and reinsert your SD card</translate></li> | ||
| Line 100: | Line 101: | ||
</span> | </span> | ||
|-|<translate>Disks (GNOME)</translate>= | |-|<translate><!--T:64--> Disks (GNOME)</translate>= | ||
<span> | <span> | ||
| Line 118: | Line 119: | ||
<li><translate><!--T:63--> Under "Type", select "For use with all systems and devices (FAT)", then click "Create"</translate></li> | <li><translate><!--T:63--> Under "Type", select "For use with all systems and devices (FAT)", then click "Create"</translate></li> | ||
</ol> | </ol> | ||
</span> | </span></tabber> | ||
</tabber> | |||
{{hg imported|Guide_3DS}} | {{hg imported|Guide_3DS}} | ||
[[Category:General guides]] | [[Category:General guides{{#translation:}}]] | ||