[Bradford] Formatting micro SD for Raspberry Pi

Bernard Czenkusz bernie.skipole at gmail.com
Tue Mar 16 12:11:38 UTC 2021


Hi guys

For what its worth:

With Linux Mint I used the  graphical 'Disks' option, with menu 
description 'Manage Drives and Media' - then within the application I 
highlighted the (unmounted) card and from the utilities hamburger menu 
chose the 'Restore Disk Image..'  option, chose the image file, and it 
loaded the image. From memory, I don't think there was any need to format.

I find the 'Disks' menu calls the command "gnome-disks" which is widely 
available, you may already have it. Though its only applicable if you're 
using a graphical desktop.

Cheers

  Bernard


On 15/03/2021 22:50, Moanin via Bradford wrote:
> Hi John,
>
> That's got me perplexed! Is the 32768 the bs=1M multiple? Each time an 
> SD card is formatted it loses some space. These two are now down to 
> 29.??gb (the older one) and 31.?? (the new one). Which raises the 
> question: do we need to stipulate the size, or, as I suspect, isn't it 
> just as good to let whichever utility supply a default, which should 
> be the end of the disc?
>
> Alternatively, is 32768 the number of blocks in a section? That 
> amounts to 4gb and is the size of the sections which were causing the 
> problems earlier.
>
> Or does 32768 simply state a maximum limit for the dd command?
>
> The original dd command was:
>
> dd if=/dev/zero of=/dev/sdb bs=1M status=progress
> which gave me a constant update of, well, progress.
>
> Now this has popped up in the browser (well I did do a search): 
> https://www.iottechtrends.com/format-sd-card-for-raspberry-pi/
> the implication of which appears to be that the dd command for 
> installing the image will implement the partitioning, too.
>
> That looks attractive, in part because of its simplicity. It also 
> shows me that I neglected to unmount the card before formatting it 
> during the earlier efforts.
>
> But will it work? It implies using dd for the whole process.
>
> TIA,
>
> Mike
>
> On 15/03/2021 22:02, John Robert Hudson wrote:
>> Hi Mike
>>
>>
>> With a 32GB card you should be using something like:
>>
>>
>> dd if=/dev/zero of=/dev/sdb bs=1M count=32768
>>
>>
>> The DOS partition is presumably for /boot/efi and the Ext4 partitions 
>> for / and /home - no swap?
>>
>>
>> I would use Gparted for that.
>>
>>
>> John
>>
>>
>> On Monday, 15 March 2021 21:08:44 GMT Moanin via Bradford wrote:
>>
>>  > Evenin' All,
>>
>>  >
>>
>>  > I have two 32gb micro SD cards, the second because the first one
>>
>>  > appeared to be corrupted. Once loaded with an OS, there were loads of
>>
>>  > 4gb sectors at the beginning and the OS update in the Pi showed not
>>
>>  > enough space left on the card. It needed a few more mb on the 
>> partition.
>>
>>  > But it wasn't the card. This has repeated itself with each attempt to
>>
>>  > fix matters.
>>
>>  >
>>
>>  > Wiping the cards then checking with either lsblk or fdisk -l 
>> showed them
>>
>>  > as clean. So the formatting process came under suspicion and I was 
>> extra
>>
>>  > careful when formatting them. So the OS transfer (using dd) became 
>> the
>>
>>  > main suspect.
>>
>>  >
>>
>>  > They wee cleaned using the command "dd if=/dev/zero of=/dev/sdb 
>> bs=8192"
>>
>>  > (earlier attempts were with bs=1M) and everything shows as 512 bytes
>>
>>  > from fdisk -l /dev/sdb. The result has not changed with the 
>> altering of
>>
>>  > the bs size parameter. It looks OK to me. Is it correct? As we 
>> would expect?
>>
>>  >
>>
>>  > All of the above was using a CentOS 7 for Pi download but it may be
>>
>>  > corrupted (the cause) and no Pi version is available any more. So
>>
>>  > Raspberry Pi OS (Raspbian has been renamed, still Debian based) is 
>> about
>>
>>  > to be downloaded.
>>
>>  >
>>
>>  > Here's the question: what is the best format structure for one of 
>> these
>>
>>  > micro SDs prior to installing it? I really don't want to end up going
>>
>>  > round in more frustrating and time consuming circles.
>>
>>  >
>>
>>  > The various online docs show a dos partition table with a 512M ext4
>>
>>  > primary partition and another ext4 primary partition for the 
>> remainder
>>
>>  > of the card. I've been using fdisk to do the formatting. Would 
>> Parted do
>>
>>  > a better job, or stick with fdisk?
>>
>>  >
>>
>>  > If fdisk and dos table, is it safe to just hit o (create a new 
>> empty dos
>>
>>  > partition table) to begin with?
>>
>>  >
>>
>>  > TIA,
>>
>>  >
>>
>>  > Mike
>>
>>  >
>>
>>  > --
>>
>>  > Bradford mailing list
>>
>>  > Bradford at mailman.lug.org.uk
>>
>>  > https://mailman.lug.org.uk/mailman/listinfo/bradford
>>
>>
>>
>



More information about the Bradford mailing list