Broken cache partition can render the device unflashable

Bug #1563342 reported by Michał Sawicz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical System Image
Confirmed
Undecided
Unassigned
lxc-android-config (Ubuntu)
New
Undecided
Unassigned

Bug Description

This is not a common issue, but if the cache partition gets corrupted (it's writeable after all), you won't be able to flash your device.

It's been reported by renato and ondra said he's seen that, too. We need to make sure we can recover from such a state by auto-formatting the cache partition on boot if it's found corrupt, or at the very least have options in recovery to wipe/format the cache partition, as android has.

The problem is that the cache partition is mounted read-only:

/dev/mmcblk0p15 on /android/cache type ext4 (ro,nosuid,nodev,noatime,noauto_da_alloc,data=ordered)
/dev/mmcblk0p15 on /var/lib/lxc/android/rootfs/cache type ext4 (ro,nosuid,nodev,noatime,noauto_da_alloc,data=ordered)

And so flashing fails:

failed to copy '~/.cache/ubuntuimages/ubuntu-touch/rc-proposed/meizu.en/arale/version-289.tar.xz' to '/cache/recovery//version-289.tar.xz': Read-only file system

Revision history for this message
John McAleely (john.mcaleely) wrote :

Note that krillin & vegetahd both have a 'format cache partition' option in their recovery.

This menu is available with the vol-up key.

Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

temporary solution for that:

Arale:
1 - download recovery image:
   wget http://people.canonical.com/~plars/touch/recovery-arale.img

2 - Reboot the device on bootloader:
  adb reboot bootloader

3 - Push image into the device:
  fastboot boot recovery-arale.img

5 - Access the device:
  adb shell

4 - Umount cache partition:
  umount /cache

5 - format cache partition
  make.ext4fs /dev/block/platform/mtk-msdc.0/by-name/cache

6 - Reboot the device

Changed in canonical-devices-system-image:
assignee: John McAleely (john.mcaleely) → nobody
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.