[Bug 2055152] Re: Interrupting the build later than the load_gadget_yaml step creates broken images
Paul Mars
2055152 at bugs.launchpad.net
Thu Apr 25 07:05:35 UTC 2024
** Changed in: ubuntu-image
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to Ubuntu Image.
https://bugs.launchpad.net/bugs/2055152
Title:
Interrupting the build later than the load_gadget_yaml step creates
broken images
Status in Ubuntu Image:
Fix Released
Bug description:
When pausing ubuntu-image with the -u option to i.e. inspect the
populated workdir and then resuming the image build always results in
broken filesystems ...
To reproduce run an image build that stops with the -u option and
define a workdir using the -w option like:
`ubuntu-image snap --debug -w workdir -u generate_disk_info ubuntu-
core-22-arm64+raspi.model-assertion`
then simply restart the build using the -r option:
`ubuntu-image snap --debug -w workdir -r ubuntu-
core-22-arm64+raspi.model-assertion`
results in the following:
```
$ LC_ALL=C sudo partx -av pi.img
partition: none, disk: pi.img, lower: 0, upper: 0
Trying to use '/dev/loop180' for the loop device
/dev/loop180: partition table type 'dos' detected
range recount: max partno=1, lower=0, upper=0
/dev/loop180: partition #1 added
$ LC_ALL=C sudo mount /dev/loop180p1 mnt/
mount: /home/ogra/datengrab/uc22-test/mnt: wrong fs type, bad option, bad superblock on /dev/loop180p1, missing codepage or helper program, or other error
$
```
this is 100% reproducible on amd64 pc builds and arm64 pi builds, it
seems to make no difference if the model assertion is "signed" or
"dangerous"
this is slightly fatal since we have customers that need to inject
certificate files for automatically onboarding their enterprise
network on first boot (and they can not ship that cert in a snap for
obvious reasons), if you want to add this file to the "systems/$DATE"
directory, you can not use the "load_gadget_yaml" step to interrupt,
but need to at least stop at "populate_rootfs_contents" which will
then result in an unbootable image ...
dmesg shows the following (but nothing more):
```
[25292407.714934] loop180: detected capacity change from 0 to 7168000
[25292445.112522] FAT-fs (loop180p1): bogus number of reserved sectors
[25292445.112526] FAT-fs (loop180p1): Can't find a valid FAT filesystem
```
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-image/+bug/2055152/+subscriptions
More information about the foundations-bugs
mailing list