1

I need help understanding how to format and partition and sd card for raspberry pi 4 from linux command line please. I have downloaded an iso image for raspian light (not noobs).

Question: If I am not using noobs do I still need a fat32 partition?

thank you

2

do I still need a fat32 partition

Yes, that is required for booting. The Raspbian card layout is much simpler than the NOOBs one though; there are two partitions, one little vfat one for the boot partition and a much bigger ext4 one which is the root filesystem.

Creating a card from the command-line is dead simple: You do not have to format the card first or anything, as it does not matter what is already on it. If there is anything on it though, and it is currently mounted, you should unmount that first. But to be clear: It doesn't matter what has been done or not done to the card. This process will overwrite everything and create a complete SD card with two partitions.

sudo dd if=raspbian.img of=/dev/sdb bs=4M status=progress

The only trick here is which /dev node to use. First, it obviously has to refer to the card and not your harddrive, etc. Be sure about that. The second issue, which confuses a lot of people, is that it should be for the card as a whole and not partitions on it.

/dev/sdb   <- Refers to the whole card/device.  USE THIS
/dev/sdb1  <- Refers to a partition on the device.

Similarly, mmcblk0 and mmcblk0p1; use the first one. In both cases you want the node without the numerical suffix (other that the 0 in mmcblk0).

If you get that correct, the process is pretty bulletproof. See man dd for details about that tool.

| improve this answer | |
  • the sd card does not have a partition table or files system currently - does the dd command take care of those items or do I need to create those please? I do have the GParted gui app installed on my computer – Dave Sep 6 '19 at 15:15
  • thank you - your solution worked and now I am able to boot - success! – Dave Sep 6 '19 at 15:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.