I am looking at an image file which was created using dd
with an SD card with Raspbian (with Qt 5.7 on it that I compiled a while ago) as input. When invoking
sudo parted raspbian_jessie_qt5.7_all_modules.img unit s print
I get
Error: Can't have a partition outside the disk!
I checked the partitions using fdisk
using
sudo fdisk -lu rasp_jessie_qt5.7.img
with the following output
Disk rasp_jessie_qt5.7.img: 7.8 GiB, 8328838656 bytes, 16267263 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: 0x65a3fac2
Device Boot Start End Sectors Size Id Type
rasp_jessie_qt5.7.img1 8192 131071 122880 60M c W95 FAT32 (LBA)
rasp_jessie_qt5.7.img2 131072 16267263 16136192 7.7G 83 Linux
When I look at this I have 16267263 sectors as the upper limit while the FS where Rasbian resides ends at the 16267263th sector (that is at the edge of the available upper limit). The number of sectors in total is 16136192.
I can use dd
with if=/dev/zeros
to expand the image and then expand the Linux FS in it but 1)I'm not sure if this will fix the problem and 2). I would really like to stick to the size of the original image that is approx. 7.7GB.
Any ideas what I have overlooked and how to fix it?
Note that I have no issues writing the image to the SD card, booting my Rasbian (the SD card is 32GB in total) and working with it.