mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Baruch Siach <baruch@tkos.co.il>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: "barebox@lists.infradead.org" <barebox@lists.infradead.org>,
	Vanalme Filip <F.Vanalme@TELEVIC.com>
Subject: Re: booting kernel(s)
Date: Wed, 23 Feb 2011 11:16:52 +0200	[thread overview]
Message-ID: <20110223091652.GA339@jasper.tkos.co.il> (raw)
In-Reply-To: <20110223090310.GG7381@pengutronix.de>

Hi Sascha, Vanalme,

On Wed, Feb 23, 2011 at 10:03:10AM +0100, Sascha Hauer wrote:
> On Tue, Feb 22, 2011 at 02:15:46PM +0100, Vanalme Filip wrote:
> > I guess, when
> > the first bootm command fails (due to corrupt image), it will execute
> > the second one. If the first command is successful, the Linux kernel
> > takes over and the second command gets never executed. Am I right ?  I
> > think I can do the same thing in my Barebox's boot script, can I ? Or
> > are there other/better solutions to handle this ?
> 
> This fails when the first kernel has a valid checksum but fails to start
> maybe because of a corrupt rootfs. But there are currently no general
> solutions for this.

A partial solution is to use initramfs (see the kernel 
Documentation/filesystems/ramfs-rootfs-initramfs.txt). You can mount your 
rootfs from the /init script of the initramfs. Then, if mount fails because of 
a corrupt rootfs, you can mount your rescue rootfs instead, or just run 
whatever rescue application you want directly from initramfs.

Another partial solution is a to use a hardware watchdog, and a userspace 
watchdog ping process. Then, upon boot you may check whether this is a normal 
power-on reset or a watchdog reset, and load the appropriate kernel.

baruch

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2011-02-23  9:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-22 13:15 Vanalme Filip
2011-02-23  9:03 ` Sascha Hauer
2011-02-23  9:16   ` Baruch Siach [this message]
2011-02-23  9:56     ` Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110223091652.GA339@jasper.tkos.co.il \
    --to=baruch@tkos.co.il \
    --cc=F.Vanalme@TELEVIC.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox