failed to rollback from 15.04 alpha #4 to #3

Bug #1474126 reported by Leo Arias
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Snappy
Fix Released
Critical
Oliver Grawert

Bug Description

I flashed snappy 15.04 alpha #3 in my beaglebone black. Today there's a new image on that channel, so I updated.
I rebooted and got into alpha #4. Then I tried to rollback to #3, but after the reboot, it fails to boot and I end up in #4 again. So it's no possible for me to rollback.

My test log with the steps to reproduce: http://paste.ubuntu.com/11873826/
This is the serial console after the reboot: http://paste.ubuntu.com/11873742/

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

(BeagleBoneBlack)ubuntu@localhost:/boot/uboot$ ls -l a/
total 19616
drwxr-xr-x 2 root root 512 Jul 13 16:02 dtbs
-rwxr-xr-x 1 root root 114 Jul 13 16:02 hardware.yaml
-rwxr-xr-x 1 root root 13574238 Jul 13 16:02 initrd.img
-rwxr-xr-x 1 root root 6510264 Jul 13 16:02 vmlinuz

(BeagleBoneBlack)ubuntu@localhost:/boot/uboot$ md5sum a/vmlinuz
baae473daca1d9fa2c2e998aab1c0bcc a/vmlinuz
(BeagleBoneBlack)ubuntu@localhost:/boot/uboot$ md5sum a/initrd.img
c42761096016a6a8813a3f718b24f777 a/initrd.img
(BeagleBoneBlack)ubuntu@localhost:/boot/uboot$ sudo md5sum /boot/vmlinuz-3.19.0-18-generic
baae473daca1d9fa2c2e998aab1c0bcc /boot/vmlinuz-3.19.0-18-generic
(BeagleBoneBlack)ubuntu@localhost:/boot/uboot$ md5sum /boot/initrd.img-3.19.0-18-generic
c42761096016a6a8813a3f718b24f777 /boot/initrd.img-3.19.0-18-generic

After updating to image 4 and booting again:
(BeagleBoneBlack)ubuntu@localhost:/boot/uboot$ ls -l a/
total 19616
drwxr-xr-x 2 root root 512 Jul 13 16:02 DTBS
-rwxr-xr-x 1 root root 114 Jul 13 16:02 HARDWA~1.YAM
-rwxr-xr-x 1 root root 13574238 Jul 13 16:02 INITRD.IMG
-rwxr-xr-x 1 root root 6510264 Jul 13 16:02 VMLINUZ
(BeagleBoneBlack)ubuntu@localhost:/boot/uboot$ md5sum a/VMLINUZ
26e74d8bbae82f6eb9055ffde9c9c5ec a/VMLINUZ
(BeagleBoneBlack)ubuntu@localhost:/boot/uboot$ md5sum a/INITRD.IMG
f52e6affb21728251d6de9ab520635af a/INITRD.IMG

So it did end up modifying the kernel (maybe via fsck?).

Changed in snappy:
status: New → Confirmed
importance: Undecided → Critical
Revision history for this message
Ricardo Salveti (rsalveti) wrote :

(BeagleBoneBlack)ubuntu@localhost:~$ sudo snappy rollback ubuntu-core 3
Setting ubuntu-core to version 3
Name Date Version Developer
ubuntu-core 2015-06-10 3 ubuntu!
Reboot to use the new ubuntu-core.

(BeagleBoneBlack)ubuntu@localhost:/boot/uboot/a$ sudo md5sum /writable/cache/system/boot/vmlinuz-3.19.0-18-generic
baae473daca1d9fa2c2e998aab1c0bcc /writable/cache/system/boot/vmlinuz-3.19.0-18-generic
(BeagleBoneBlack)ubuntu@localhost:/boot/uboot/a$ sudo md5sum /writable/cache/system/boot/initrd.img-3.19.0-18-generic
c42761096016a6a8813a3f718b24f777 /writable/cache/system/boot/initrd.img-3.19.0-18-generic
(BeagleBoneBlack)ubuntu@localhost:/boot/uboot/a$ sudo cp /writable/cache/system/boot/vmlinuz-3.19.0-18-generic VMLINUZ
(BeagleBoneBlack)ubuntu@localhost:/boot/uboot/a$ sudo cp /writable/cache/system/boot/initrd.img-3.19.0-18-generic INITRD.IMG
(BeagleBoneBlack)ubuntu@localhost:/boot/uboot/a$ sync
(BeagleBoneBlack)ubuntu@localhost:~$ sync
(BeagleBoneBlack)ubuntu@localhost:~$ sudo reboot

Then I was able to successfully boot image 3 again (partition a), which clearly shows that the kernel and initrd were indeed corrupted.

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

Now the question is why the vfat partition is getting into this weird/broken state, maybe not unmounted properly during reboot?

Revision history for this message
Oliver Grawert (ogra) wrote :

probably fatwrite does something to it when it re-writes the snappy stamp file during first boot after update ...

Changed in snappy:
milestone: none → 15.04.2
assignee: nobody → Oliver Grawert (ogra)
Revision history for this message
Michael Vogt (mvo) wrote :

We are almost ready to replace the broken fatwrite with using a uboot environment file for the state handling.

Changed in snappy:
status: Confirmed → In Progress
Changed in snappy:
status: In Progress → Fix Committed
Changed in snappy:
status: Fix Committed → 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.