BeagleBone Black images keep getting corrupted
Michael Vogt
mvo at ubuntu.com
Wed Apr 29 13:43:47 UTC 2015
On Wed, Apr 29, 2015 at 11:30:09AM +0200, Víctor Mayoral Vilches wrote:
> Greetings,
Hello,
> Using the latest BBB image from the snappy developers site:
>
> *(BeagleBoneBlack)ubuntu at localhost:/etc$ sudo cat fstab |grep boot*
>
> */dev/mmcblk0p1 /boot/uboot auto sync 0 2*
>
> *(BeagleBoneBlack)ubuntu at localhost:/etc$ mount|grep boot*
>
> */dev/mmcblk0p1 on /boot/uboot type vfat
> (rw,relatime,sync,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)*
I tried really hard to break the system by pulling the power at random
times and rebooting and could not reproduce the failure (so far) that
you are seeing. So either I did not try often enough or the "sync"
option does indeed fix the issues.
> However in our images (we change the kernel to provide support for capemgr
> kernel module) we are unable to get the "sync".
>
> Tried modifying "/etc/fstab" manually but everytime we reboot it returns to:
> */dev/mmcblk0p1 /boot/uboot auto defaults 0 0*
>
> Any suggestion on how to include "sync"?
The fstab is auto-generated in the initramfs, could you please check if
your initramfs contains the latest scripts/ubuntu-core-rootfs script ?
The latest version contains a line like:
echo "$boot_partition $bootdir auto sync 0 2" >> "$fstab"
Cheers,
Michael
> Thanks,
>
> *Víctor Mayoral Vilches*
> CTO & Co-Founder
>
>
>
> *Erle Robotics*
> erlerobotics.com | victor at erlerobot.com
> +34 616151561
> *skype*: v.mayoral
>
>
> 2015-04-29 0:27 GMT+02:00 Steve Langasek <steve.langasek at canonical.com>:
>
> > Hi Gábor,
> >
> > On Tue, Apr 28, 2015 at 10:47:48PM +0200, Gábor Paller wrote:
> > > Why is the boot partition mounted writable to start with?
> >
> > Because this is the place where we have a writable space shared between the
> > OS and the bootloader that we can use to tell whether a boot was
> > successful.
> > Without this, it's impossible to implement automatic fallback on failed
> > boot
> > because there's no way to know that a boot was attempted but failed.
> >
> > With a recent image, /boot should certainly be mounted 'sync' as mentioned.
> > If you're using the current 15.04 image and it's not, it's a bug. If it is
> > mounted 'sync' and you're still seeing corruption, that's a different bug.
> >
> > --
> > Steve Langasek Give me a lever long enough and a Free OS
> > Debian Developer to set it on, and I can move the world.
> > Ubuntu Developer http://www.debian.org/
> > slangasek at ubuntu.com vorlon at debian.org
> >
> > > On Tue, Apr 28, 2015 at 10:46 PM, John Lenton <john.lenton at canonical.com
> > >
> > > wrote:
> > >
> > > > “defaults,sync” would do the same :) but what I meant was that AFAIK
> > we've
> > > > switched to have the boot partitions be like that now. The people who
> > > > actually did this or would know without a doubt are in a week-long
> > sprint
> > > > so hard to reach right now though.
> > > >
> > > > On 28 April 2015 at 21:43, Gábor Paller <gaborpaller at gmail.com> wrote:
> > > >
> > > >> John, is it enough to sync the boot partition? E.g. in /etc/fstab:
> > > >>
> > > >> Before:
> > > >> /dev/mmcblk0p1 /boot/uboot auto defaults 0 2
> > > >> After:
> > > >> /dev/mmcblk0p1 /boot/uboot auto rw,suid,dev,exec,auto,nouser,sync 0 2
> > > >>
> > > >> Is this what you have in mind?
> > > >>
> > > >>
> > > >> On Tue, Apr 28, 2015 at 9:56 PM, John Lenton <
> > john.lenton at canonical.com>
> > > >> wrote:
> > > >>
> > > >>> Víctor, are you still seeing this with the images that mount boot
> > with
> > > >>> the "sync" option?
> > > >>>
> > > >>> On 28 April 2015 at 19:31, Gábor Paller <gaborpaller at gmail.com>
> > wrote:
> > > >>>
> > > >>>> it also happened to me many times. ever since i started shutting
> > down
> > > >>>> the system properly (shutdown -h now), the problem disappeared. it
> > seems to
> > > >>>> be related to switching off the power unexpectedly (unexpectedly
> > for the
> > > >>>> system).
> > > >>>>
> > > >>>> regards,
> > > >>>> gabor
> > > >>>> On 28 Apr 2015 8:26 pm, "Víctor Mayoral Vilches" <
> > victor at erlerobot.com>
> > > >>>> wrote:
> > > >>>>
> > > >>>>> Hi there,
> > > >>>>>
> > > >>>>> At Erle Robotics we've been doing quite a bit of testing with
> > Snappy
> > > >>>>> and we honestly love it.
> > > >>>>>
> > > >>>>> Unfortunately the images get corrupted from time to time and that
> > > >>>>> makes it really troublesome. The reason seems to be related to a
> > bad
> > > >>>>> shutdown process where some files in the *system-boot* partition
> > get
> > > >>>>> corrupted (if not the whole partition itself). When dealing with
> > drones we
> > > >>>>> connect and disconnect the batteries as needed thereby we
> > constantly
> > > >>>>> reproduce this problem.
> > > >>>>>
> > > >>>>> After the image goes wrong the only noticeable change is that the
> > > >>>>> *system-boot* partition seems wrong. When booting with a corrupted
> > > >>>>> image we get this behavior
> > > >>>>> <https://gist.github.com/anonymous/ad19776c93eccd2d1d43> (it ends
> > up
> > > >>>>> switching into eMMC)
> > > >>>>>
> > > >>>>> When inspecting the system-boot partition:
> > > >>>>>
> > > >>>>> *cat snappy-system.txt *
> > > >>>>> *cat: snappy-system.txt: Input/output error*
> > > >>>>>
> > > >>>>> And for some reason, the whole system-boot partition seems wrong
> > since
> > > >>>>> there's no way to edit it (complains about permissions and
> > read-only file
> > > >>>>> system, tested with root and tried also repairing the partition
> > but it did
> > > >>>>> not help).
> > > >>>>>
> > > >>>>> This is an issue that appeared a while ago and we hoped it'll get
> > > >>>>> solved eventually but keeps coming in newer images and many users
> > might
> > > >>>>> have experienced it.
> > > >>>>>
> > > >>>>> Has anyone looked into this? Help would be much appreciated.
> > > >>>>> Kind regards,
> > > >>>>>
> > > >>>>> *Víctor Mayoral Vilches*
> > > >>>>> CTO & Co-Founder
> > > >>>>>
> > > >>>>>
> > > >>>>>
> > > >>>>> *Erle Robotics*
> > > >>>>> erlerobotics.com | victor at erlerobot.com
> > > >>>>> +34 616151561
> > > >>>>> *skype*: v.mayoral
> > > >>>>>
> > > >>>>>
> > > >>>>> --
> > > >>>>> snappy-devel mailing list
> > > >>>>> snappy-devel at lists.ubuntu.com
> > > >>>>> Modify settings or unsubscribe at:
> > > >>>>> https://lists.ubuntu.com/mailman/listinfo/snappy-devel
> > > >>>>>
> > > >>>>>
> > > >>>> --
> > > >>>> snappy-devel mailing list
> > > >>>> snappy-devel at lists.ubuntu.com
> > > >>>> Modify settings or unsubscribe at:
> > > >>>> https://lists.ubuntu.com/mailman/listinfo/snappy-devel
> > > >>>>
> > > >>>>
> > > >>>
> > > >>
> > > >
> >
> > > --
> > > snappy-devel mailing list
> > > snappy-devel at lists.ubuntu.com
> > > Modify settings or unsubscribe at:
> > https://lists.ubuntu.com/mailman/listinfo/snappy-devel
> >
> >
> > --
> > snappy-devel mailing list
> > snappy-devel at lists.ubuntu.com
> > Modify settings or unsubscribe at:
> > https://lists.ubuntu.com/mailman/listinfo/snappy-devel
> >
> >
> --
> snappy-devel mailing list
> snappy-devel at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snappy-devel
More information about the snappy-devel
mailing list