From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 767F51382C5 for ; Tue, 26 May 2020 18:38:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 21F2CE0970; Tue, 26 May 2020 18:38:29 +0000 (UTC) Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CB6D4E0928 for ; Tue, 26 May 2020 18:38:28 +0000 (UTC) Received: by mail-pg1-f196.google.com with SMTP id 124so4253223pgi.9 for ; Tue, 26 May 2020 11:38:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=KGojxHPi3YEXFg6GFW6HaUyEeYJGiNsUntw4dfnausI=; b=QFJeb4u8jb2VddAsLjYzFurA6b6B50VcLI72Lvhbsa1D3Rf0RD74Di4SukoDvf+2M4 Rv70LJkwevBs1W/sDdMf29/GDT41XMKhKn74GgI3cBaRIOAXRoYoHB5nmmIKfBdzV/ID z52yNf6o5dmhwABtOD1j3qqe8NhFroZcQkZCDAQEiLqLZnjwTZlUQ7YqkBw8pjSn0sY1 PgEQeUKdV8sBqFb6ewIh9gxMYHO8yZXXFznUxG2YElA0PVXB0oukxYr9s4AhQHKC5RSH BnORaAwq2y8TSwPUMXBUtp3/I+k31moZrCTn0uz8m2f7ASku5ZlnG2EFT8aAZxEXyJ4A 3J0A== X-Gm-Message-State: AOAM532DbxxXEELwFLt8vXugHRb2hYVXgv9vhRGEkkePiFw61gJT1nJb HYXXiI5daMZ6bLZr/3AicbSVo98UFV3gbPfTVFSXGfbfGdM= X-Google-Smtp-Source: ABdhPJzdc0J4m/98uaOTpqL5jhBIIv5AI4lqS9BGJ+iC0PAESwxuTZcaH/cj+tOOkKbCXFKnT+2tZsqfNYFZ5TjXYVs= X-Received: by 2002:a65:52c3:: with SMTP id z3mr264219pgp.146.1590518307316; Tue, 26 May 2020 11:38:27 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 References: <276e2f0e-6214-5505-f75d-fc6c365626ab@youngman.org.uk> <20200526192710.43b56cdc@digimed.co.uk> In-Reply-To: <20200526192710.43b56cdc@digimed.co.uk> From: Michael Jones Date: Tue, 26 May 2020 13:38:16 -0500 Message-ID: Subject: Re: [gentoo-user] Re: Gentoo RPi boot to ram or read-only FS? To: gentoo-user@lists.gentoo.org Content-Type: multipart/alternative; boundary="000000000000b77a5905a69166a8" X-Archives-Salt: cf5a81aa-fa47-48bb-b899-74ce59fbb299 X-Archives-Hash: 9f9c1182eaed2a61c398a088cc5f134a --000000000000b77a5905a69166a8 Content-Type: text/plain; charset="UTF-8" On Tue, May 26, 2020 at 1:27 PM Neil Bothwick wrote: > On Tue, 26 May 2020 19:14:18 +0100, antlists wrote: > > > > That's the Gentoo version that I'm using. But I'm looking for a way > > > to make it bullet-proof to having the plug pulled. > > > > Don't use an SD card? Seriously, pulling the power on an SD card has > > been known to corrupt it beyond recovery. BUT. > > Mounting the card with sync will significantly reduce the likelihood of > corruption, at a cost of reduced life. > > > Is the big worry that the home directory will get corrupted etc etc? I > > don't know if you can partition an SD card, but look at doing a > > kiosk-style install with the OS protected and read-only. Then look at > > sticking a loopback device on top of home, so that any changes exist > > only in ram, and are lost on shutdown. Hopefully, that means you now > > have a system that can boot and run off a write-protected SD card :-) > > This will mitigate the reduced life as you are hardly writing to the > card. Booting from a read-only / has caused problems for me in the past, > because of the inability to write to /etc. > Consider a hybrid approach like how many embedded systems do things. E.g. openwrt. /root is actually a read-only squashfs image, and on top of that there's an overlay fs that uses a second partition as it's backing storage. This way, almost all of your system is purely read-only, but you have the ability to store changes to things you need to store changes for. --000000000000b77a5905a69166a8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, May 26, 2020 at 1:27 PM Neil = Bothwick <neil@digimed.co.uk&g= t; wrote:
On Tue= , 26 May 2020 19:14:18 +0100, antlists wrote:

> > That's the Gentoo version that I'm using. But I'm loo= king for a way
> > to make it bullet-proof to having the plug=C2=A0pulled.=C2=A0 >
> Don't use an SD card? Seriously, pulling the power on an SD card h= as
> been known to corrupt it beyond recovery. BUT.

Mounting the card with sync will significantly reduce the likelihood of
corruption, at a cost of reduced life.

> Is the big worry that the home directory will get corrupted etc etc? I=
> don't know if you can partition an SD card, but look at doing a > kiosk-style install with the OS protected and read-only. Then look at =
> sticking a loopback device on top of home, so that any changes exist <= br> > only in ram, and are lost on shutdown. Hopefully, that means you now <= br> > have a system that can boot and run off a write-protected SD card :-)<= br>
This will mitigate the reduced life as you are hardly writing to the
card. Booting from a read-only / has caused problems for me in the past, because of the inability to write to /etc.

<= div>

Consider a hybrid approach like how many = embedded systems do things. E.g. openwrt.

/root is= actually a read-only squashfs image, and on top of that there's an ove= rlay fs that uses a second partition as it's backing storage.

This way, almost all of your system is purely read-only, bu= t you have the ability to store changes to things you need to store changes= for.
--000000000000b77a5905a69166a8--