From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-wr0-x22d.google.com ([2a00:1450:400c:c0c::22d]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1fJJua-0000Mg-ES for RAUC@pengutronix.de; Thu, 17 May 2018 16:29:44 +0200 Received: by mail-wr0-x22d.google.com with SMTP id p5-v6so5910605wre.12 for ; Thu, 17 May 2018 07:29:44 -0700 (PDT) Received: from [192.168.100.95] (188-39-213-234.static.enta.net. [188.39.213.234]) by smtp.googlemail.com with ESMTPSA id a10-v6sm7195543wri.10.2018.05.17.07.29.42 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 May 2018 07:29:42 -0700 (PDT) From: Kevin Golding Message-ID: <42727149-5594-a49e-a3cd-f631b462a32d@kgolding.co.uk> Date: Thu, 17 May 2018 15:29:36 +0100 MIME-Version: 1.0 Content-Language: en-GB Subject: [RAUC] Rescue system List-Id: RAUC Project - Discussion List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1004959660==" Errors-To: rauc-bounces@pengutronix.de Sender: "RAUC" To: RAUC@pengutronix.de This is a multi-part message in MIME format. --===============1004959660== Content-Type: multipart/alternative; boundary="------------5BF1253EC8E0FF2BEC250030" Content-Language: en-GB This is a multi-part message in MIME format. --------------5BF1253EC8E0FF2BEC250030 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hello, Am just getting my head around RAUC, and wondered if I'm right in thinking that a rescue system is not included with RAUC? i.e. I would need to find or create a small bootable rescue system that would run the RAUC update command say via say from a file on a USB stick? If I am right, are there any examples of a rescue system available? Regards, -- Kevin Golding --------------5BF1253EC8E0FF2BEC250030 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit

Hello,

Am just getting my head around RAUC, and wondered if I'm right in thinking that a rescue system is not included with RAUC? i.e. I would need to find or create a small bootable rescue system that would run the RAUC update command say via say from a file on a USB stick?

If I am right, are there any examples of a rescue system available?

Regards,

--
Kevin Golding
--------------5BF1253EC8E0FF2BEC250030-- --===============1004959660== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KUkFVQyBtYWls aW5nIGxpc3Q= --===============1004959660==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-wm0-x230.google.com ([2a00:1450:400c:c09::230]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1fJR8g-00057r-Qm for RAUC@pengutronix.de; Fri, 18 May 2018 00:12:47 +0200 Received: by mail-wm0-x230.google.com with SMTP id a137-v6so1158010wme.1 for ; Thu, 17 May 2018 15:12:46 -0700 (PDT) References: <42727149-5594-a49e-a3cd-f631b462a32d@kgolding.co.uk> <521e1223-eba4-5055-150b-fdec89452a1a@pengutronix.de> From: Kevin Golding Message-ID: <4c0455d5-a455-c3bb-b2ac-0a6f4a3b5d04@kgolding.co.uk> Date: Thu, 17 May 2018 23:12:40 +0100 MIME-Version: 1.0 In-Reply-To: <521e1223-eba4-5055-150b-fdec89452a1a@pengutronix.de> Content-Language: en-GB Subject: Re: [RAUC] Rescue system List-Id: RAUC Project - Discussion List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0878816380==" Errors-To: rauc-bounces@pengutronix.de Sender: "RAUC" To: Enrico Joerns Cc: RAUC@pengutronix.de This is a multi-part message in MIME format. --===============0878816380== Content-Type: multipart/alternative; boundary="------------E923D08CC0B18EF29363FF64" Content-Language: en-GB This is a multi-part message in MIME format. --------------E923D08CC0B18EF29363FF64 Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Transfer-Encoding: 8bit Hello Enrico, Thank you for your reply, and confirmation of my understanding. Due to limit storage space on our device, we need to use a small update/rescue OS and our much larger main OS. I expect our rescue/update OS may just be a script (to start with) to mount the USB drive and run rauc on a pre-set file name, maybe flashing some of our LEDS as it does its work! Kevin Golding On 17/05/2018 16:22, Enrico Joerns wrote: > Hi Kevin, > > On 05/17/2018 04:29 PM, Kevin Golding wrote: >> Hello, >> >> Am just getting my head around RAUC, and wondered if I'm right in >> thinking that a rescue system is not included with RAUC? i.e. I would >> need to find or create a small bootable rescue system that would run >> the RAUC update command say via say from a file on a USB stick? > > conceptually RAUC is a generic update framework that can run on your > Linux device and handle safe and atomic updates of partitions etc. > It does neither provide any ready-to-use distribution nor depend on > any specific. > > Thus building a system is always a task that should be solved outside > of an update tool. With OE/Yocto, PTXdist and buildroot good build > system exists for this that allow you to generate well defined > customized systems in versioned and reproducible manner. > > RAUC also does not depend on any specific source for its update > artifacts. Neither on the production system nor on any rescue system. > You can fetch your update from USB / network / storage media or > whatever fits your concept or platform. > > Nevertheless, conceptually a rescue system is surely supported. A slot > configuration for your rescue system (and the default ones, too) would > look like > >   [slot.rootfs.0] >   device=/dev/mmcblk0p1 >   ... > >   [slot.rootfs.1] >   device=/dev/mmcblk0p1 >   ... > >   [slot.rescue.0] >   device=/dev/sda1 >   ... > > > This would allow detecting RAUC that it is not running from one of the > normal rootfs partitions but from the rescue partition instead and > that it can safely upate the others. > >> If I am right, are there any examples of a rescue system available? > > No. A rescue system can be as small as only a minimal > kernel+initramfs+dtb with RAUC binary + dependencies which will result > in a few kB. Most of the build systems above provide a minimal rootfs > configuration that you can simply extend with RAUC. > > https://rauc.readthedocs.io/en/latest/integration.html > > > Did that roughly point you in the right direction? > > > Best regards, Enrico > > --------------E923D08CC0B18EF29363FF64 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: 8bit

Hello Enrico,

Thank you for your reply, and confirmation of my understanding. Due to limit storage space on our device, we need to use a small update/rescue OS and our much larger main OS. I expect our rescue/update OS may just be a script (to start with) to mount the USB drive and run rauc on a pre-set file name, maybe flashing some of our LEDS as it does its work!

Kevin Golding


On 17/05/2018 16:22, Enrico Joerns wrote:
Hi Kevin,

On 05/17/2018 04:29 PM, Kevin Golding wrote:
Hello,

Am just getting my head around RAUC, and wondered if I'm right in thinking that a rescue system is not included with RAUC? i.e. I would need to find or create a small bootable rescue system that would run the RAUC update command say via say from a file on a USB stick?

conceptually RAUC is a generic update framework that can run on your Linux device and handle safe and atomic updates of partitions etc.
It does neither provide any ready-to-use distribution nor depend on any specific.

Thus building a system is always a task that should be solved outside of an update tool. With OE/Yocto, PTXdist and buildroot good build system exists for this that allow you to generate well defined customized systems in versioned and reproducible manner.

RAUC also does not depend on any specific source for its update artifacts. Neither on the production system nor on any rescue system. You can fetch your update from USB / network / storage media or whatever fits your concept or platform.

Nevertheless, conceptually a rescue system is surely supported. A slot configuration for your rescue system (and the default ones, too) would look like

  [slot.rootfs.0]
  device=/dev/mmcblk0p1
  ...

  [slot.rootfs.1]
  device=/dev/mmcblk0p1
  ...

  [slot.rescue.0]
  device=/dev/sda1
  ...


This would allow detecting RAUC that it is not running from one of the normal rootfs partitions but from the rescue partition instead and that it can safely upate the others.

If I am right, are there any examples of a rescue system available?

No. A rescue system can be as small as only a minimal kernel+initramfs+dtb with RAUC binary + dependencies which will result in a few kB. Most of the build systems above provide a minimal rootfs configuration that you can simply extend with RAUC.

https://rauc.readthedocs.io/en/latest/integration.html


Did that roughly point you in the right direction?


Best regards, Enrico



--------------E923D08CC0B18EF29363FF64-- --===============0878816380== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KUkFVQyBtYWls aW5nIGxpc3Q= --===============0878816380==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: References: <42727149-5594-a49e-a3cd-f631b462a32d@kgolding.co.uk> From: Enrico Joerns Message-ID: <521e1223-eba4-5055-150b-fdec89452a1a@pengutronix.de> Date: Thu, 17 May 2018 17:22:37 +0200 MIME-Version: 1.0 In-Reply-To: <42727149-5594-a49e-a3cd-f631b462a32d@kgolding.co.uk> Content-Language: en-US Subject: Re: [RAUC] Rescue system List-Id: RAUC Project - Discussion List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: base64 Content-Type: text/plain; charset="utf-8"; Format="flowed" Errors-To: rauc-bounces@pengutronix.de Sender: "RAUC" To: Kevin Golding Cc: RAUC@pengutronix.de SGkgS2V2aW4sCgpPbiAwNS8xNy8yMDE4IDA0OjI5IFBNLCBLZXZpbiBHb2xkaW5nIHdyb3RlOgo+ IEhlbGxvLAo+IAo+IEFtIGp1c3QgZ2V0dGluZyBteSBoZWFkIGFyb3VuZCBSQVVDLCBhbmQgd29u ZGVyZWQgaWYgSSdtIHJpZ2h0IGluIHRoaW5raW5nIHRoYXQgYSByZXNjdWUgc3lzdGVtIGlzIG5v dCBpbmNsdWRlZCB3aXRoIFJBVUM/IGkuZS4gSSB3b3VsZCBuZWVkIHRvIGZpbmQgb3IgY3JlYXRl IGEgc21hbGwgYm9vdGFibGUgcmVzY3VlIHN5c3RlbSB0aGF0IHdvdWxkIHJ1biB0aGUgUkFVQyB1 cGRhdGUgY29tbWFuZCBzYXkgdmlhIHNheSBmcm9tIGEgZmlsZSBvbiBhIFVTQiBzdGljaz8KCmNv bmNlcHR1YWxseSBSQVVDIGlzIGEgZ2VuZXJpYyB1cGRhdGUgZnJhbWV3b3JrIHRoYXQgY2FuIHJ1 biBvbiB5b3VyIExpbnV4IGRldmljZSBhbmQgaGFuZGxlIHNhZmUgYW5kIGF0b21pYyB1cGRhdGVz IG9mIHBhcnRpdGlvbnMgZXRjLgpJdCBkb2VzIG5laXRoZXIgcHJvdmlkZSBhbnkgcmVhZHktdG8t dXNlIGRpc3RyaWJ1dGlvbiBub3IgZGVwZW5kIG9uIGFueSBzcGVjaWZpYy4KClRodXMgYnVpbG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