automatic reboot fails with zero size initrd in bbb

Bug #1480248 reported by Federico Gimenez
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snappy
Fix Released
Critical
Unassigned

Bug Description

Tested on rolling/edge #119 beagleboneblack. Steps to reproduce:

Begin with an upgradable image

$ sudo ubuntu-device-flash --revion -1 core --channel=edge --oem beagleblack --developer-mode -o bbb.img rolling

Put the image in a sd card and boot

$ sudo dd if=./bbb.img of=/dev/<sd-dev> bs=32M

Update

$ ssh ubuntu@<bbb-ip>
$ sudo snappy update

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

$ sudo rm /boot/uboot/b/initrd.img
$ sudo touch /boot/uboot/b/initrd.img

Reboot

Related branches

Revision history for this message
Michael Vogt (mvo) wrote :

I can confirm this, here is the output I see:
"""
reading b/vmlinuz
6517632 bytes read in 382 ms (16.3 MiB/s)
reading b/initrd.img
0 bytes read in 5 ms (0 Bytes/s)
reading b/dtbs/am335x-boneblack.dtb
30025 bytes read in 13 ms (2.2 MiB/s)
Kernel image @ 0x82000000 [ 0x000000 - 0x637380 ]
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Loading Ramdisk to 90000000, end 90000000 ... OK
   Loading Device Tree to 8fff5000, end 8ffff548 ... OK

Starting kernel ...
...
[ 1.664150] sr_init: platform driver register failed for SR
[ 1.675159] ALSA device list:
[ 1.678350] No soundcards found.
[ 1.682530] md: Waiting for all devices to be available before autodetect
[ 1.689717] md: If you don't use raid, use raid=noautodetect
[ 1.696746] md: Autodetecting RAID arrays.
[ 1.701125] md: Scanned 0 and added 0 devices.
[ 1.705791] md: autorun ...
[ 1.708709] md: ... autorun DONE.
[ 1.712487] Waiting for root device /dev/disk/by-label/system-b...
""""
and then it hangs forever.

This looks like a kernel issue to me, i.e. it should error/panic on a invalid initrd.img.

Changed in snappy:
status: New → Triaged
importance: Undecided → Critical
Revision history for this message
Michael Vogt (mvo) wrote :

Added Paolo to get the opinion of a kernel expert.

Revision history for this message
Michael Vogt (mvo) wrote :

Kudos to ogra, removing "mmcrootfstype" from the uboot.env fixes the hang.

Revision history for this message
Leo Arias (elopio) wrote :
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks Leo, good catch!

Michael Vogt (mvo)
tags: added: snappy-robustness
Leo Arias (elopio)
Changed in snappy:
status: Triaged → Fix Released
Revision history for this message
Leo Arias (elopio) wrote :

Confirmed the fix on rev 149, bbb oem 1.12. Thanks!

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.