images should not be largely bigger than the actual content
Bug #1619362 reported by
Oliver Grawert
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Image |
Fix Released
|
High
|
Unassigned |
Bug Description
currently building a raspberry pi image results in a 4GB file for about < 300MB content ... since we resize the writable partition to full disk size on first boot this is a lot of wasted space and makes dd take enormously long to just write zeros to the SD card.
ubuntu-image should check the actual requirements for the content that gets added to the image and probably add 10-100MB wiggle room so we dont end up with gigantic empty images.
Changed in ubuntu-image: | |
status: | Triaged → Fix Released |
To post a comment you must log in.
The image is created as a sparse file, so does not occupy 4G on disk. We use xz for compression everywhere, so the sparseness is preserved when decompressing. What is the use case for which the pre expanded filesystem causes a problem? Note that even dd has sparse handling, though this was unfamiliar to me until recently, so it's possible even to ensure efficiency when writing out to an sd card.
I'm not saying we can't make this change, if first boot resizing is preferred; I'd just like to be sure we understand what is actually impacted.