Please use os.truncate() instead of dd when creating the file
Bug #1619351 reported by
Michael Vogt
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Image |
Invalid
|
Undecided
|
Unassigned |
Bug Description
The current use of "dd" to create the image means that a real 4gb file is created. The previous ubuntu-device-flash would use a sparse file for this. This is important for the snappy project because we take the image, load it into ram and write it to a test machine to do the testing of the actual machine. However this only works if the file fits in ram. with a sparse file it does, with a real 4gb file it does not.
I started working on this but got stuck in mkfs.ext4 not creating a partition apparently.
To post a comment you must log in.
We should switch to native Python operations wherever feasible, but I can't see the problem you're describing. I've tested the sparseness at every stage and while ls shows a 4GB image, du consistently shows it occupying 300M on disk. What are you seeing that suggests this is not sparse?