Update fails on lack of space, after factory reset still won't update

Bug #1454457 reported by Quentin Quaadgras
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu system image
New
Undecided
Barry Warsaw

Bug Description

I tried to update my Ubuntu Bq Aquarius today to r22 but when it restarted to install updates a picture of a chip came up saying that my phone needs to be restored from a PC or supplier, I assume this is because of a lack of space because I was playing around with apt-get not too long ago.
The phone automatically restarted after that and was back to normal but I decided to factory reset it so I could try installing the update again, never the less, after I had done that, my phone says that there are no updates available.
System image CLI on a sry run report:

Device phased percentage: 67%
WeightedScorer path scores:
[ 330] -> 22 (42%)
[ 0] -> 22 (42%)
Already up-to-date

I have version-22.tar.xz in my /android/cache/recovery folder.
What should I do to fix this?

Tags: client
Revision history for this message
Steve Langasek (vorlon) wrote :

No update is presented to you because the update is still being phased to all users. It will become available to you some time over the next 24 hours.

However, the fact that the update was *previously* presented to you (with less than ideal results), but is now *not* presented to you, implies that your system's identifier has changed across reinstalls. My recollection is that the system UUID is intended to be derived from the hardware address, so should not change on reinstall. That much is definitely a bug.

Changed in ubuntu-system-image:
assignee: nobody → Barry Warsaw (barry)
Revision history for this message
Quentin Quaadgras (quentin-d) wrote :

Alright thankyou for the information, I'll wait for the update to appear again :)

Revision history for this message
Ondrej Kubik (ondrak) wrote : Re: [Bug 1454457] Re: Update fails on lack of space, after factory reset still won't update

Can you please check on which channel you phone is at the moment?
$ grep channel /etc/system-image/channel.ini
Checking channel, version 22 became available 12th of May.
Now fact that there is still /android/cache/recovery/version-22.tar.xz means
that recovery failed to complete update process. Normally it should apply
all the changes and then delete all the packages it successfully applied,
it obviously failed in the process and did not get to cleaning stage...

Can you please list here what is content of your /android/cache/recovery?
Also is possible attach any log files from /cache/recovery/ like "log"
"last_install" and "last_log*"
From that we should be able to see what went wrong during OTA update.

Now reason you cannot factory restore using ubuntu-device-flas is simple
I guess your old OTA packages are still in your cache/recovery, occupying
space there. And when ubuntu-device-flash is trying to push there full
factory packages, it eventually fails, since there is not enough space in
cache partition to hold OTA + factory images at the same time.
you can check free space in cache partition with $ df | grep cache

To restore to factory state, simply clean /android/cache/recovery and run
it again, it should succeed.

On Wed, May 13, 2015 at 2:04 AM, Quentin Quaadgras <email address hidden>
wrote:

> Alright thankyou for the information, I'll wait for the update to appear
> again :)
>
> --
> You received this bug notification because you are a member of Ubuntu
> System Image team, which is subscribed to Ubuntu system image.
> https://bugs.launchpad.net/bugs/1454457
>
> Title:
> Update fails on lack of space, after factory reset still won't update
>
> Status in Ubuntu system image (server/client/updater):
> New
>
> Bug description:
> I tried to update my Ubuntu Bq Aquarius today to r22 but when it
> restarted to install updates a picture of a chip came up saying that my
> phone needs to be restored from a PC or supplier, I assume this is because
> of a lack of space because I was playing around with apt-get not too long
> ago.
> The phone automatically restarted after that and was back to normal but
> I decided to factory reset it so I could try installing the update again,
> never the less, after I had done that, my phone says that there are no
> updates available.
> System image CLI on a sry run report:
>
> Device phased percentage: 67%
> WeightedScorer path scores:
> [ 330] -> 22 (42%)
> [ 0] -> 22 (42%)
> Already up-to-date
>
> I have version-22.tar.xz in my /android/cache/recovery folder.
> What should I do to fix this?
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu-system-image/+bug/1454457/+subscriptions
>

Revision history for this message
Quentin Quaadgras (quentin-d) wrote :

Here is the channel:

channel: ubuntu-touch/stable/bq-aquaris.en
channel_target: ubuntu-touch/ubuntu-rtm/14.09

The contents of /android/cache/recovery

custom-37bf52f51cebb1be90d4c0e3289ddfabb0c610612b8eddd8cd41ebd5573bddf7.delta-custom-80897f6b2dbcbc12a01735e0fc965a6cc2cdb346f1da05b919406a7790565523.tar.xz
custom-37bf52f51cebb1be90d4c0e3289ddfabb0c610612b8eddd8cd41ebd5573bddf7.delta-custom-80897f6b2dbcbc12a01735e0fc965a6cc2cdb346f1da05b919406a7790565523.tar.xz.asc
device-b0c948ee156ea49eb8a4c13ebad11d906c4c6bf131a08e372b68e8cacfc8185c.delta-device-0142302186687e3e48e6987283f6caf5d471a4160f98aa6a3cb7658f96471297.tar.xz
device-b0c948ee156ea49eb8a4c13ebad11d906c4c6bf131a08e372b68e8cacfc8185c.delta-device-0142302186687e3e48e6987283f6caf5d471a4160f98aa6a3cb7658f96471297.tar.xz.asc
image-master.tar.xz
image-master.tar.xz.asc
image-signing.tar.xz
image-signing.tar.xz.asc
log
ubuntu-9c7a7516955ff8b2cc7d5a0053d45954e2d8fe0c4cfa97d4c3dca2bc0582405e.delta-ubuntu-d2dfa371c65640e688fd9272b3ede7dbddbfed27f548a0d988c083b1d1c78158.tar.xz
ubuntu-9c7a7516955ff8b2cc7d5a0053d45954e2d8fe0c4cfa97d4c3dca2bc0582405e.delta-ubuntu-d2dfa371c65640e688fd9272b3ede7dbddbfed27f548a0d988c083b1d1c78158.tar.xz.asc
ubuntu_command
version-22.tar.xz
version-22.tar.xz.asc

I did manage to factory reset from the system settings app, no need for the flashing tool.
But this has not appeared to clear the space from the system like I thought, I got the update notification and tried again but this resulted in the same fail, the phone restarts

I have attached the log file, it does appear to be an out of space issue -_-
Here is the end of the log file, the other two didn't exist after the factory reset, I saw them before then (last_install etc)

Applying update: ubuntu-9c7a7516955ff8b2cc7d5a0053d45954e2d8fe0c4cfa97d4c3dca2bc0582405e.delta-ubuntu-d2dfa371c65640e688fd9272b3ede7dbddbfed27f548a0d988c083b1d1c78158.tar.xz
tar: write error: No space left on device
E:Ubuntu update failed
I:no boot messages recovery
I:[1]check the otaupdate is done!
fw_upgrade_finish
I:timed out waiting for key input; rebooting.

Would clearing /android/cache/recovery make the update succeed? or is there something else I can do to restore the space on the partition, I have got to say I didn't realise there was not so much free space on the root filesystem partition. Ive learned my lesson 8) shouldn't be messing with apt-get on the phone.

Revision history for this message
Ondrej Kubik (ondrak) wrote :
Download full text (5.1 KiB)

If you clean /android/cache this will make restore work, lack of space
reported by tool is because it fails to copy all needed packages to cache
partition. Cache partition is used mainly for updates, so it usually does
not affect running system.

OTA failing is very likely issue when you managed to fill your phone's
rootfs partition. In this scenario OTA updates are pure gamble. OTA is
calculated as delta between two releases, and does not take in account any
other states or dependencies between packages you installed using apt-get.
It can randomly replace binaries in packages you have previously updated,
and essentially leaving your phone in undefined state. That been said, it's
quite common practice to do so, and if you are aware of inherited risk,
nobody can stop from it :) Plus there is straightforward path how to get
phone back to clean state.
It still leaves question why update fail, since looking to actual OTA
update, it's mainly replacing existing files and required only few extra
MB. So I guess you managed to fill it properly....
Before you do factory restore, can you run $ df and check how much free
space there is in your rootfs?

On Wed, May 13, 2015 at 11:26 AM, Quentin Quaadgras <email address hidden>
wrote:

> Here is the channel:
>
> channel: ubuntu-touch/stable/bq-aquaris.en
> channel_target: ubuntu-touch/ubuntu-rtm/14.09
>
> The contents of /android/cache/recovery
>
>
> custom-37bf52f51cebb1be90d4c0e3289ddfabb0c610612b8eddd8cd41ebd5573bddf7.delta-custom-80897f6b2dbcbc12a01735e0fc965a6cc2cdb346f1da05b919406a7790565523.tar.xz
>
> custom-37bf52f51cebb1be90d4c0e3289ddfabb0c610612b8eddd8cd41ebd5573bddf7.delta-custom-80897f6b2dbcbc12a01735e0fc965a6cc2cdb346f1da05b919406a7790565523.tar.xz.asc
>
> device-b0c948ee156ea49eb8a4c13ebad11d906c4c6bf131a08e372b68e8cacfc8185c.delta-device-0142302186687e3e48e6987283f6caf5d471a4160f98aa6a3cb7658f96471297.tar.xz
>
> device-b0c948ee156ea49eb8a4c13ebad11d906c4c6bf131a08e372b68e8cacfc8185c.delta-device-0142302186687e3e48e6987283f6caf5d471a4160f98aa6a3cb7658f96471297.tar.xz.asc
> image-master.tar.xz
> image-master.tar.xz.asc
> image-signing.tar.xz
> image-signing.tar.xz.asc
> log
>
> ubuntu-9c7a7516955ff8b2cc7d5a0053d45954e2d8fe0c4cfa97d4c3dca2bc0582405e.delta-ubuntu-d2dfa371c65640e688fd9272b3ede7dbddbfed27f548a0d988c083b1d1c78158.tar.xz
>
> ubuntu-9c7a7516955ff8b2cc7d5a0053d45954e2d8fe0c4cfa97d4c3dca2bc0582405e.delta-ubuntu-d2dfa371c65640e688fd9272b3ede7dbddbfed27f548a0d988c083b1d1c78158.tar.xz.asc
> ubuntu_command
> version-22.tar.xz
> version-22.tar.xz.asc
>
> I did manage to factory reset from the system settings app, no need for
> the flashing tool.
> But this has not appeared to clear the space from the system like I
> thought, I got the update notification and tried again but this resulted in
> the same fail, the phone restarts
>
> I have attached the log file, it does appear to be an out of space issue
> -_-
> Here is the end of the log file, the other two didn't exist after the
> factory reset, I saw them before then (last_install etc)
>
> Applying update:
> ubuntu-9c7a7516955ff8b2cc7d5a0053d45954e2d8fe0c4cfa97d4c3dca2bc0582405e.delta-ubuntu-d2dfa371c65640e688fd9272b3ede7dbddbfed27f548a0d...

Read more...

Revision history for this message
Quentin Quaadgras (quentin-d) wrote :

yup it's completely full..
Filesystem 1K-blocks Used Available Use% Mou
/dev/mmcblk0p6 2076276 2076276 0 100% /
udev 489984 4 489980 1% /dev
tmpfs 98392 284 98108 1% /run
/dev/mmcblk0p7 4610128 302340 4073600 7% /home
/dev/loop0 143412 141608 1804 99% /android/system
none 4 0 4 0% /android
tmpfs 98392 284 98108 1% /run
tmpfs 491952 4 491948 1% /etc/fstab
/dev/disk/by-path/platform-mtk-msdc.0-part5 705512 104788 564884 16% /android/cache
none 4 0 4 0% /sys/fs/cgroup
tmpfs 491952 56 491896 1% /tmp
none 5120 0 5120 0% /run/lock
none 491952 100 491852 1% /run/shm
none 102400 28 102372 1% /run/user
tmpfs 491952 0 491952 0% /media
tmpfs 491952 4 491948 1% /var/lib/sudo

So did my last factory restore from the system settings app not succeed? do I need to reflash?
Is there anyway to see what's taking up space on just the rootfs?

I didn't update anything with apt-get, just install some compilers and things. How much free space is there supposed to be?

Revision history for this message
Ondrej Kubik (ondrak) wrote :
Download full text (3.5 KiB)

Yeah you better do full install with ubuntu-device-flash or flash_tool.
Delete everything under /cache/recovery and run
$ ubuntu-device-flash touch --channel ubuntu-touch/stable/bq-aquaris.en

It's hard to say what succeeded and what failed at this stage.
There is about 400MB free I think, but it's going fast once you start
installing development tools.

On Wed, May 13, 2015 at 12:12 PM, Quentin Quaadgras <email address hidden>
wrote:

> yup it's completely full..
> Filesystem 1K-blocks Used Available
> Use% Mou
> /dev/mmcblk0p6 2076276 2076276 0 100% /
> udev 489984 4 489980
> 1% /dev
> tmpfs 98392 284 98108
> 1% /run
> /dev/mmcblk0p7 4610128 302340 4073600
> 7% /home
> /dev/loop0 143412 141608 1804
> 99% /android/system
> none 4 0 4
> 0% /android
> tmpfs 98392 284 98108
> 1% /run
> tmpfs 491952 4 491948
> 1% /etc/fstab
> /dev/disk/by-path/platform-mtk-msdc.0-part5 705512 104788 564884
> 16% /android/cache
> none 4 0 4
> 0% /sys/fs/cgroup
> tmpfs 491952 56 491896
> 1% /tmp
> none 5120 0 5120
> 0% /run/lock
> none 491952 100 491852
> 1% /run/shm
> none 102400 28 102372
> 1% /run/user
> tmpfs 491952 0 491952
> 0% /media
> tmpfs 491952 4 491948
> 1% /var/lib/sudo
>
> So did my last factory restore from the system settings app not succeed?
> do I need to reflash?
> Is there anyway to see what's taking up space on just the rootfs?
>
> I didn't update anything with apt-get, just install some compilers and
> things. How much free space is there supposed to be?
>
> --
> You received this bug notification because you are a member of Ubuntu
> System Image team, which is subscribed to Ubuntu system image.
> https://bugs.launchpad.net/bugs/1454457
>
> Title:
> Update fails on lack of space, after factory reset still won't update
>
> Status in Ubuntu system image (server/client/updater):
> New
>
> Bug description:
> I tried to update my Ubuntu Bq Aquarius today to r22 but when it
> restarted to install updates a picture of a chip came up saying that my
> phone needs to be restored from a PC or supplier, I assume this is because
> of a lack of space because I was playing around with apt-get not too long
> ago.
> The phone automatically restarted after that and was back to normal but
> I decided to factory reset it so I could try installing the update again,
> never the less, after I had done that, my phone says that there are no
> updates available.
> System...

Read more...

Revision history for this message
Quentin Quaadgras (quentin-d) wrote :

Ok managed to update it now by removing some apt-get installed files :) Thankyou for the help

Barry Warsaw (barry)
tags: added: client
Revision history for this message
Barry Warsaw (barry) wrote :

Re: comment #1

In system-image 2.5, the machine id is taken from /var/lib/dbus/machine-id

In system-image 3.0, it still prefers that file, but will fall back to /etc/machine-id if the former is not found.

no longer affects: canonical-devices-system-image
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.