SD card formatting - FABtotum/fabui-colibri GitHub Wiki
General
To be able to use the new FABUI system you need to use an SD card that is at least 4GB. The SD card has to have one partition that is as big as the SD card and is formatted to FAT32 filesystem.
Connect the SD card to your computer
- If your computer has an SD card slot you can insert the SD card directly into the port.
- If you are using a MicroSD card, you will need an adapter to allow it to fit into standard SD card ports.
- If your computer does not have an SD card port built-in, you can use an external USB card reader that plugs into any USB port on your computer
Select your operating system:
Windows
The standard formatting tools built into Windows are not producing SD cards that work well with RaspberryPi, therefore use a third-party formatting tool such as MiniTool Partition Wizard Free Edition or EaseUS Partition Master Free. EaseUS Partition Master Free has a "home user" versions of fully featured partition editor tools which is not as straightforward to use.
MiniTool Partition Wizard Free Edition
Step 1 - Get the tool
Download latest version here and install it
Step 2 - Delete all partitions
Connect the SD card to your computer and launch MiniTool Partition Wizard Free Edition.
Locate your SD card (Disk 3 in this example, use the right disk number for you in the following steps).
Do a right-click with the mouse on Disk 3 to get a menu, then click on Delete All partitions and confirm by pressing the Yes button.
Wait until the process finishes. Disk 3 should now be (Unallocated).
Step 3 - Format partition to FAT32
Right-click with the mouse on Disk 3 that is now marked as (Unallocated) and in the menu select Create.
A new window will open and here you will configure the partition
- Select FAT32 as File System
- Set BOOT for the partition label
- Unallocated space before must be set to 0.
When you made sure all fields have the right values press OK.
Unallocated space before is a crucial setting because without it partitions will not be properly create when you boot for the first time.
All preparations are done now, only thing left is to press Apply button and confirm the operation with Yes.
Wait for the operations to finish.
Step 5 - Done
Congratulations!!! Your SD card is ready to copy the sdcard_latest.zip content to it.
Mac
From graphical interface
Step 1 - Open Disk Utility
Step 2 - Create one FAT32 partition
Locate your SD card and click Erase
A new window will open. Configure the parameters as follows:
- Set Name to BOOT
- Set Format to MS-DOS (FAT)
- For the Sheme select Master Boot Record
Make sure all parameters are correct and press Erase.
Wait for the operations to finish and click Done.
Step 5 - Done
Congratulations!!! Your SD card is ready to copy the sdcard_latest.zip content to it.
Linux
From graphical interface
Step 1 - Start Disks Utility
You can prepare your SD card from the graphical user interface. Go to your application menu. Under Utilities find Disks and click.
Step 2 - Un-mount partitions
Find your SD card in the list and click on it.
If your SD card already has some content it will be necessary to un-mount all the partitions before continuing. You can do this by clicking the button. Make sure that partition says "Not Mounted".
Repeat this step for all partitions on yur SD card.
Step 3 - Create new partition table
Now we are going to erase all partitions from the SD card. Click on the button and select Format...
A new window will appear. It's important to set Prtitioning to Compatible with all systems and devices (MBR/DOS). Now click Format button. It might be needed to confirm this action once more by clicking on Format. Now wait for the process to finish before continuing with the next step.
Step 4 - Format partition to FAT32
The SD card is almost ready now. Final thing is to create a FAT32 partition over the full SD card size. Click on the + button.
Make sure:
- Partition Size is left to the automatic value
- Type is set to Compatible with all systems and devices (FAT)
- Name is set to BOOT
Now click Create button and wait until the process is finished.
Step 5 - Done
Congratulations!!! Your SD card is ready to copy the sdcard_latest.zip content to it.
From command line
Step 1 - Identify SD card device
First we need to identify which device the SD card is mapped to. Insert your SD card into your computer and run the following command
dmesg | tail -n 15
In the output look for lines that look line the ones below. In this case the SD card device turned out to be sdc. In the following steps we will use this value. If your SD card device is different, replace sdc with the one you have.
[11197.155999] sd 9:0:0:0: [sdc] 15126528 512-byte logical blocks: (7.74 GB/7.21 GiB)
[11197.161799] sdc: sdc1 sdc2 sdc3 sdc4 < sdc5 sdc6 >
Step 2 - Un-mount partitions
As the SD card might have some content on it, there is a big chance the partitions were automatically mounted. Before we make any changes we need to un-mount all the SD card partitions.
This command will look for the mounted SD card partitions and un-mount them all.
mount | grep /dev/sdc | awk '{print $1}' | xargs sudo umount
If you get a umount
usage output it means your SD card partitions were not mount and you can continue to Stap 3.
Step 3 - Create new partition table
To make sure that we have only one partition we need to erase all existing partitions from the SD card and create only one that we are going to use later.
To do this run the following command
sudo fdisk /dev/sdc
Welcome to fdisk (util-linux 2.27.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help):
Now type o and press the ENTER key. This will erase the partition table and create a new MBR/DOS compatible one.
Command (m for help): o
Created a new DOS disklabel with disk identifier 0xa143fda9.
Next we need to create one partition that will span over the whole SD card.
To do this type n and 5x ENTER key
Command (m for help): n
Partition type
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p):
Partition number (1-4, default 1):
First sector (2048-7821311, default 2048):
Last sector, +sectors or +size{K,M,G,T,P} (2048-7821311, default 7821311):
Created a new partition 1 of type 'Linux' and of size 3,7 GiB.
Next we are going to set the partition type to W95 FAT32
Press the t key and ENTER key. Then press b key and ENTER key.
Command (m for help): t
Selected partition 1
Partition type (type L to list all types): b
Changed type of partition 'W95 FAT32' to 'W95 FAT32'.
Let's verify that the steps so far have been successful.
Type p and ENTER to get a list of partitions.
The output should look similar to the one below with only one partition /dev/sdc1 that is of type W95 FAT32.
Command (m for help): p
Disk /dev/sdc: 3,7 GiB, 4004511744 bytes, 7821312 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x8586c54f
Device Boot Start End Sectors Size Id Type
/dev/sdc1 2048 7821311 7819264 3,7G b W95 FAT32
To write the settings to the SD card do the followin.
Type w and press the ENTER key.
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
Step 4 - Format partition to FAT32
Our final step is to format the partition create in Step 3 to FAT32.
To do that run the following command.
sudo mkfs.vfat /dev/sdc1 -n BOOT -F 32
Step 5 - Done
Congratulations!!! You have made it this far. Your SD card is ready to copy the sdcard_latest.zip content to it.