Hi Friends,
I have a lot of Sd card and usually nowadays find it difficult to either formate or manage SD cards to write a new image for RaspberryPi. Anyone else also struggle to do that? Do you have any recommendations for tools?
Be sure to click 'more' and select 'suggest as answer'!
If you're the thread creator, be sure to click 'more' then 'Verify as Answer'!
Hi Friends,
I have a lot of Sd card and usually nowadays find it difficult to either formate or manage SD cards to write a new image for RaspberryPi. Anyone else also struggle to do that? Do you have any recommendations for tools?
Linux:
A couple of steps here that catch you out typically:
To expand on some of these points:
Most desktop Linux distros will offer the option to extract a compressed file when you right click on it without needing to add any programs.
I know Debian, Devuan, Linux Mint, and I believe Raspbian will because I've used them all to do so (it's been a while with Raspbian).
To find out which /dev the SD card is using you can also use (using sudo or as root:):
fdisk -l
Disk /dev/sda: 29.8 GiB, 32010928128 bytes, 62521344 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: 0xaeedd120
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 62521343 62519296 29.8G 83 Linux
As long as you know the size of the SD card, 29.8 GiB for a 32 GB SD card on the first line in the response, then it is easy to know which
device (/dev/sda also on the first line) it is using. It would be a good idea to properly remove any other SD cards before doing this just to
be sure you find the right one.
I always use dd bs=1M status=progress if=image file of=/dev/sdX (of=/dev/sda from the fdisk command above)
I have probably written 30+ Raspbian image files using this without any problems since the first revision of the Pi was released. I have also
used it for several other SBC OS images with no problems. The --status=progress will display a progress message while the image is being
written although I am still having trouble figuring out exactly what it is displaying. The progress display message also stops well before the next
shell prompt is displayed while waiting for the (SLOW) write to the SD card to finish.
I use a block size of 1M because you can't do much to speed it up other than use a SD card with a faster write data rate because that is what
slows it down the most by far.
To expand on some of these points:
Most desktop Linux distros will offer the option to extract a compressed file when you right click on it without needing to add any programs.
I know Debian, Devuan, Linux Mint, and I believe Raspbian will because I've used them all to do so (it's been a while with Raspbian).
To find out which /dev the SD card is using you can also use (using sudo or as root:):
fdisk -l
Disk /dev/sda: 29.8 GiB, 32010928128 bytes, 62521344 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: 0xaeedd120
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 62521343 62519296 29.8G 83 Linux
As long as you know the size of the SD card, 29.8 GiB for a 32 GB SD card on the first line in the response, then it is easy to know which
device (/dev/sda also on the first line) it is using. It would be a good idea to properly remove any other SD cards before doing this just to
be sure you find the right one.
I always use dd bs=1M status=progress if=image file of=/dev/sdX (of=/dev/sda from the fdisk command above)
I have probably written 30+ Raspbian image files using this without any problems since the first revision of the Pi was released. I have also
used it for several other SBC OS images with no problems. The --status=progress will display a progress message while the image is being
written although I am still having trouble figuring out exactly what it is displaying. The progress display message also stops well before the next
shell prompt is displayed while waiting for the (SLOW) write to the SD card to finish.
I use a block size of 1M because you can't do much to speed it up other than use a SD card with a faster write data rate because that is what
slows it down the most by far.