automatic reboot fails with zero size kernel

Bug #1467553 reported by Federico Gimenez on 2015-06-22
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Steps to reproduce:

Begin with an upgradable image

$ sudo ubuntu-device-flash --revision=-1 core rollling --channel edge -o snappy.img --developer-mode


$ kvm -m 768 -redir :8022::22 ./snappy.img


$ ssh -p 8022 ubuntu@localhost
$ sudo snappy update

Remove the kernel in the other partition and create a zero size file:

$ sudo mount -o remount,rw /writable/cache/system
$ sudo rm /writable/cache/system/vmlinuz-3.19.0-22-generic
$ sudo touch /writable/cache/system/vmlinuz-3.19.0-22-generic


Steve Langasek (vorlon) wrote :

I am unsure why you are reporting this as a bug. If you corrupt the filesystem, it will fail to boot. After it fails to boot, powering the system off and powering it on again should fall back to the other partition. How is this different from what you are expecting to happen?

Federico Gimenez (fgimenez) wrote :

In the steps above, if instead of the vmlinuz file you remove the initrd file in the new partition, when you try to reboot to apply the update the system detects the kernel panic and is able to automatically reboot into the good partition by itself.

It would be very useful if the system could autoreboot in case of a bad or empty kernel, especially for unattended devices, now it gets stuck and you need to power cycle the device to boot into the previous partition again, as you mentioned. More taking into account that now the update process download and application is automatic by default (managed by snappy-autopilot)

Michael Vogt (mvo) wrote :

Adding Paolo to get a expert opinion on what the bootloader can do for us here (if anything).

Changed in snappy:
status: New → Triaged
importance: Undecided → High
Paolo Pisati (p-pisati) wrote :

Sorry, but i'm not a grub expert but what you are describing here is a watchdog - no idea if grub supports it and no idea if the qemu platform you are emulating has one.

Michael Vogt (mvo) on 2015-08-26
tags: added: snappy-robustness
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers