Pi image need to be shrink down....


I used to use same mark of micro sd card, but recently for a copy to different mark but same size sd card, I met big trouble.

I used to use win32 disk image writer, to read out .img file from a BBB or Pi micro sdcard.
I usually use sandisk 8G C4, same one for the new ones.

This time, when I wish to write a img file that I read out from a 16GB micro SD card to a sandisk ultra 16GB, I got error that new card does not have enough space. a little bit short. the sd is shown about 14.6GB

search on net, there are problem like this. some say, it's because card maker use 1000 for K, but computing system use 1024 as K. I believe this is so so stupid.

there is some way to shrink down the image, so that you can cross this stupid thing. But none can work in windows. it has to be done in linux.

Since I don't have linux PC on hand, the easier way: I go for a kingstone Class4 16GB, once I put it in the windows, the capacity is slightly higher than sandisk ultra 16GB, about 15GB.

With this card, win32disk image writer works fine.

I'm not sure if the higher speed card need a larger address table, but this finding, solved my problem, for now.

Next time, I need to learn how to shrink down the image size, before or after read out in linux,





Device         Boot  Start     End Sectors  Size Id Type
/dev/mmcblk1p1 *      2048  198655  196608   96M  e W95 FAT16 (LBA)
/dev/mmcblk1p2      198656 7667711 7469056  3.6G 83 Linux

Disk /dev/mmcblk1boot1: 1 MiB, 1048576 bytes, 2048 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 /dev/mmcblk1boot0: 1 MiB, 1048576 bytes, 2048 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 /dev/sda: 14.9 GiB, 15931539456 bytes, 31116288 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: 0xe2b2c50b

Device     Boot Start      End  Sectors  Size Id Type
/dev/sda1        8192    92159    83968   41M  c W95 FAT32 (LBA)
/dev/sda2       92160 30898175 30806016 14.7G 83 Linux

留言

這個網誌中的熱門文章

Heltec ESP32+OLED+Lora, hardware testing

micro SD card for ESP32, on lolin32 with OLED and heltec 32 lora oled

Install Network Time Protocol(NTP) on BeagleBone with Angstrom linux and set local time zone