# Raspberry firmware on micro sd card; file system format

https://github.com/raspberrypi/firmware

and I would like to know, what are the steps to burn the firmware on the micro SD card? Unfortunately, there is no description available in the wiki.

When I insert the pre built SD Card that came with the Raspberry hardware, it shows me two paritions: boot and kernel.

Can anyone tell me the file system format and which files go to which partition? Basically I want to start every thing from scratch.

• Though it covers NOOBS and not plain Raspbian without NOOBS, NOOBS Partitioning Explained is a useful overview of how a Pi boot partition works. There's also some more detailed information on booting in general in the bootmodes documentation. – Curt J. Sampson Apr 16 '17 at 18:00

After some digging, I realised that I can use a current Raspberry to see the format.

Disk /dev/mmcblk0: 7969 MB, 7969177600 bytes
4 heads, 16      sectors/track,     243200 cylinders, total 15564800 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
Disk identifier: 0x000c45c9

Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1            8192      122879       57344    c  W95 FAT32 (LBA)
/dev/mmcblk0p2          122880     6399999     3138560   83  Linux


lsblk gives me the following:

NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
mmcblk0     179:0    0   7.4G  0 disk
|-mmcblk0p1 179:1    0    56M  0 part /boot
-mmcblk0p2 179:2    0     3G  0 part /


So, it means 56M is reserved for boot partition and should be the first parition formatted in FAT32 and 3G is formatted in File system Linux ( I guess ext4 ).

I just need to copy the bootcode.bin, kernel.img and other stuffs ( still to find out the minimum requirement to boot ) in the boot parition and the Linux parition contains the rest of the linux directory tree - usr, lib etc.

• you are almost correct, but the boot partition is FAT32, with the other partition containing usr lib etc. on the latest distros this is usually ext3 or ext4, easiest way to get latest firmware is to just boot it and run rpi-update as per @Ricardo answer, but if you insist on doing it manually then put card into another machine and drop the files into the boot partition – James Kent Mar 22 '17 at 16:26
• Oh yes sorry. I completely reversed Linux and FAT32. Updating my post to write the correct answer. – infoclogged Mar 22 '17 at 16:39

You could simply download the latest Raspbian image and burn it on the SD Card using Win32DiskImager as recommended by the Foundation.

Then at your own risk, you could update the Firmware using rpi-update.

• But I wanted to do something from scratch, learning every process on the way. Apart from that I am a linux user. – infoclogged Mar 21 '17 at 8:59