Snappy update fails because of its looking for non existing /writable/cache/assets/vmlinuz

Bug #1477657 reported by Simon Eisenmann
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Snappy
Fix Released
Critical
Unassigned

Bug Description

When updating to test the new uboot.env behavior i encountered another issue which makes the update fail for me. Seems like somewhere a check for vmlinuz file is triggered. The device tarball for odroidc provides a uImage file instead. The configuration for this is device/hardware.yaml (kernel: assets/uImage) and should be used instead of any hardcoded value. If there are checks for the other stuff in hardware.yaml, those should use the values there as well instead of hardcoded ones.

(ODROIDC)root@odroid:~# snappy list -v
Name Date Version Developer
ubuntu-core 2015-07-23 129 ubuntu*
ubuntu-core 2015-07-23 129 ubuntu
odroidc 2015-07-23 0.3 *
(ODROIDC)root@odroid:~# snappy update
Installing ubuntu-core (130)
Starting download of ubuntu-core
Applying update[/]
Apply done
Updating boot files
25.77 MB / 25.77 MB [======================================] 100.00 % 1.06 MB/s
Done
can not find file /writable/cache/assets/vmlinuz

hardware.yaml
kernel: assets/uImage
dtbs: assets/dtbs
initrd: assets/uInitrd
partition-layout: system-AB
bootloader: u-boot

For now i will change my device tree to provide vmlinuz (but it is no vmlinuz).

Related branches

Revision history for this message
Simon Eisenmann (longsleep) wrote :

It did not help that i renamed my kernel to vmlinuz - still the same error.

There is also some other initrd in that folder (not from my device tree)
ls /writable/cache/assets
initrd.img initrd.img-3.19.0.0-23-generic

Revision history for this message
Simon Eisenmann (longsleep) wrote :

Manuall faking update by setting the uboot.env variables boots just fine into the updated system.

(ODROIDC)root@odroid:~# snappy list -v
Name Date Version Developer
ubuntu-core 2015-07-23 129 ubuntu*
ubuntu-core 2015-07-23 129 ubuntu
odroidc 2015-07-23 0.3 *
(ODROIDC)root@odroid:~# snappy update
Installing ubuntu-core (130)
Starting download of ubuntu-core
Applying update[\]
Apply done
Updating boot files
25.77 MB / 25.77 MB [====================================] 100.00 % 932.14 KB/s
Done
can not find file /writable/cache/assets/vmlinuz
(ODROIDC)root@odroid:~# snappy list -v
Name Date Version Developer
ubuntu-core 2015-07-23 129 ubuntu*
ubuntu-core 2015-07-23 130 ubuntu!
odroidc 2015-07-23 0.3 *
Reboot to use the new ubuntu-core.
(ODROIDC)root@odroid:~# fw_setenv snappy_ab b
(ODROIDC)root@odroid:~# fw_setenv snappy_mode try
(ODROIDC)root@odroid:~# reboot

(ODROIDC)root@odroid:~# snappy list -v
Name Date Version Developer
ubuntu-core 2015-07-23 130 ubuntu*
ubuntu-core 2015-07-23 129 ubuntu
odroidc 2015-07-23 0.3 *

(ODROIDC)root@odroid:~# fw_printenv snappy_mode
snappy_mode=regular
(ODROIDC)root@odroid:~# fw_printenv snappy_ab
snappy_ab=b

summary: - Snappy update fails because of hardcoded assets/vmlinuz
+ Snappy update fails because of its looking for non existing
+ /writable/cache/assets/vmlinuz
Revision history for this message
Michael Vogt (mvo) wrote :

I investigated this issue this morning. I can reproduce it by booting into 15.04/alpha on the BBB version r131. Then I set it back to r130 and got the same error message as you did. It appears the delta that got generated is faulty:

The delta from 130 to 131 is:
"""
        {
            "base": 130,
            "description": "ubuntu=20150723.5,raw-device=20150723.5,version=131",
            "files": [
...
                {
                    "checksum": "fbc5f3e27b4f8ad4325b6eca1f2a901adbaf5ffd15d5e813af596e45a06b1269",
                    "order": 1,
                    "path": "/pool/device-e800ea84eba34de0a6d7d05503e8324c40e4fbd56942d331b4acfb5bf1cd3ae0.delta-device-b318f1faee86d202efa9577e757b2769ed0f958a1a44378621ed14528850d1c8.tar.xz",
                    "signature": "/pool/device-e800ea84eba34de0a6d7d05503e8324c40e4fbd56942d331b4acfb5bf1cd3ae0.delta-device-b318f1faee86d202efa9577e757b2769ed0f958a1a44378621ed14528850d1c8.tar.xz.asc",
                    "size": 13594800
                },
...
            ],
            "type": "delta",
            "version": 131,
            "version_detail": "ubuntu=20150723.5,raw-device=20150723.5,version=131"
"""

When I download /pool/device-e800ea84eba34de0a6d7d05503e8324c40e4fbd56942d331b4acfb5bf1cd3ae0.delta-device-b318f1faee86d202efa9577e757b2769ed0f958a1a44378621ed14528850d1c8.tar.xz I see the following in the hardware.yaml:

kernel: assets/vmlinuz
initrd: assets/initrd.img
partition-layout: system-AB
hashes: 73d20f826ae7ec09671950057dee0db8-130377ee7d73559ee88a7279df5716d4
dtbs: assets/dtbs
bootloader: u-boot

but the assets directory does not contain a kernel - only the initrd.img. So this looks like a issue with either the delta generation or with our livecd-rootfs that generates the initrd.

Changed in snappy:
importance: Undecided → Critical
status: New → Confirmed
Revision history for this message
Federico Gimenez (fgimenez) wrote :

I can reproduce it when updating in bbb from r146 to r147:

sudo ubuntu-device-flash core 15.04 -o bbb-1504-1-edge.img --revision=146 --channel edge --oem beagleblack --developer-mode

# dd and ssh

(BeagleBoneBlack)ubuntu@localhost:~$ sudo snappy list -v
Name Date Version Developer
ubuntu-core 2015-09-14 146 ubuntu*
ubuntu-core 2015-09-14 146 ubuntu
beagleblack 2015-09-15 1.12 canonical*
(BeagleBoneBlack)ubuntu@localhost:~$ sudo snappy update
Installing ubuntu-core (147)
Starting download of ubuntu-core
Applying update[/]
Apply done
Updating boot files
15.13 MB / 15.13 MB [=============================================================================================================================] 100.00 % 223.47 KB/s
Done
can not find file /writable/cache/assets/vmlinuz
(BeagleBoneBlack)ubuntu@localhost:~$ snappy list -v
Name Date Version Developer
ubuntu-core 2015-09-14 146 ubuntu*
ubuntu-core 2015-09-15 147 ubuntu!
beagleblack 2015-09-15 1.12 canonical*
Reboot to use the new ubuntu-core.
(BeagleBoneBlack)ubuntu@localhost:~$ ls /writable/cache/assets/
initrd.img initrd.img-3.19.0-28-generic

Reboot seems to work fine and let the system in the b partition with the system updated:

(BeagleBoneBlack)ubuntu@localhost:~$ snappy list -v
Name Date Version Developer
ubuntu-core 2015-09-15 147 ubuntu*
ubuntu-core 2015-09-14 146 ubuntu
beagleblack 2015-09-15 1.12 canonical*

Rollback and update work too from there.

Michael Vogt (mvo)
Changed in snappy:
status: Confirmed → In Progress
Michael Vogt (mvo)
Changed in snappy:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.