Fail to create GPT backup header when rootfs structure size smaller than actual rootfs contents
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Image |
New
|
Undecided
|
Unassigned |
Bug Description
Fail to create GPT backup header when rootfs structure size smaller than actual rootfs contents
Error message:
[8] populate_
WARNING: rootfs structure size 750 MiB smaller than actual rootfs contents 1.63 GiB
Image built by ubuntu-image 2.x:
004: 000 0000002048 0002459647 0002457600 EFI System
005: 001 0002459648 0005874131 0003414484 writable
Image built by ubuntu-image 1.x:
004: 000 0000002048 0002459647 0002457600 EFI System
005: 001 0002459648 0005874131 0003414484 writable
006: ------- 0005874132 0005874165 0000000034 Unallocated
ubuntu-image 1.x can create GPT backup header even though rootfs structure size smaller than actual rootfs contents. But, the GPT backup header isn't generated when using ubuntu-image 2.x.
tags: | added: originate-from-2043872 |
Hey Ethan,
Actually I was not aware ubuntu-image 1.x was still used!
You probably already thought about that, but did you try ubuntu-image 3.X for this build? (maybe this is one of the builds using flash-kernel and you cannot use u-i 3 yet).
Since our current efforts are directed towards imagecraft, I doubt we will be able to invest time fixing ubuntu-image 2.X.
Anyway, an important thing to note in your gadget YAML where you define the structure of the image: The "size" key is more a "recommended/ desired" value than a enforced one. This is handled by a snapd library so even with ubuntu-image 3.X you may encounter the same problem. But, recently a new "min-size" key was added in the VolumeStructure object, see [0]. I do not know for sure this could solve your problem, but using this and u-i 3.X could be worth a try.
[0] https:/ /github. com/snapcore/ snapd/blob/ 08888455fa5da4f e078b2d57234aec 7f16d38d72/ gadget/ gadget. go#L279