Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.6 .img improvements (shrink) #86

Open
AlexShmelev opened this issue Aug 27, 2022 · 3 comments
Open

v0.6 .img improvements (shrink) #86

AlexShmelev opened this issue Aug 27, 2022 · 3 comments

Comments

@AlexShmelev
Copy link

Hi, i was wondering, why does image size is 16 GB ?
I looked partable of .img file and file size on partitions and I see

Number  Start   End     Size    Type     File system  Flags
 1      4194kB  273MB   268MB   primary  fat32        lba
 2      277MB   2689MB  2412MB  primary  ext4
 3      2689MB  15,9GB  13,2GB  primary

The third partition is ExFAT (why?), using 13GB and contain files only for 18MB!

/dev/loop29p1              253M   45M  208M  18% /mnt/loop1
/dev/loop29p2              2,2G  1,7G  401M  82% /mnt/loop2
/dev/loop29p3               13G   18M   13G   1% /mnt/loop3

Writing this image to SD card with dd will take "insane" amount of time for writing this empty space.

Why don't just make this partition 100 MB, and resize by script on first boot to end of disk ? (Is this OS limitation where debian can't resize ExFat parts? Why not use FAT32 instead ?)
Why does ExFAT needed ? Can't those file be stored on ext4 in /DroneBridge Folder instead of mounting this ExFAT partition ?

Thanks.

@seeul8er
Copy link
Collaborator

None of the images you can download has 16GBs in size. Not sure what you mean. On the first boot, the image will expand the third partition to the maximum available size just as you suggested.
As far as I remember the third partition is for storing configuration data and the recorded video (not sure that is already implemented in v0.6). That is why it is that big and exFAT. exFAT can be read by all OS and the video recorder does not need to split the files in 4GB junks, as it would be the case with the outdated FAT format.

16GB are a pain in the ass when copying the entire SD card, but other than that it does not have a disadvantage.

@AlexShmelev
Copy link
Author

None of the images you can download has 16GBs in size. Not sure what you mean.

https://github.com/DroneBridge/DroneBridge/releases/tag/v0.6.0
Get the ready to use image for the Raspberry Pi here

Download link on 5GB archive with 16GB .img file in it.

@seeul8er
Copy link
Collaborator

Ah sorry, did not check the content. I must have forgotten to shrink the img file. You can use the truncate command to shrink the third partition. I did that with the prev. releases.
https://raspberrypi.stackexchange.com/questions/7177/image-of-a-16gb-card-containing-unpartitioned-space-at-the-end-truncating-possi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants