From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-embedded+bounces-4308-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 669381381F3 for <garchives@archives.gentoo.org>; Thu, 17 Oct 2013 01:46:38 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B29DFE0999; Thu, 17 Oct 2013 01:46:35 +0000 (UTC) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com [209.85.215.44]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E236FE0996 for <gentoo-embedded@lists.gentoo.org>; Thu, 17 Oct 2013 01:46:34 +0000 (UTC) Received: by mail-la0-f44.google.com with SMTP id ep20so1036744lab.31 for <gentoo-embedded@lists.gentoo.org>; Wed, 16 Oct 2013 18:46:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=sZlQAyLCoaJMDhXOkdYSHroNBe9SHCjT7E4OnbaOLXk=; b=HDBSqXIMbMaPkYjxLDcUomObnIrCqdI6AbjSMlqoY3Mf9nxeHlF1ZxLiUNhuCwaVkr cQV3ZydXG7G1v3KOCrzClugrj986bMYKaCWk+w9l4kYn4Phj5L8Y1NKegPadvvovJIT9 ntqjFQhHHUR/DPinFHTD8doFTtpgphuUYxnyF0dk17pMA8v97aJCIClvSF3TWo7i8J6u Woq3jRueJvfBm5eaDFVLoPD+UcZul3QWuw4eXZij7+OnrJsSw8phau3Zh1EgTsBqG6NB UYGUsi9NTkPn3xXhweM46RctJ4Q/k0LPulWhktN75S2y0LuFddB4V8nJ4UXr3q+qBidr bCQg== Precedence: bulk List-Post: <mailto:gentoo-embedded@lists.gentoo.org> List-Help: <mailto:gentoo-embedded+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-embedded+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-embedded+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-embedded.gentoo.org> X-BeenThere: gentoo-embedded@lists.gentoo.org Reply-to: gentoo-embedded@lists.gentoo.org MIME-Version: 1.0 X-Received: by 10.112.59.134 with SMTP id z6mr2802493lbq.28.1381974393156; Wed, 16 Oct 2013 18:46:33 -0700 (PDT) Received: by 10.112.20.6 with HTTP; Wed, 16 Oct 2013 18:46:33 -0700 (PDT) In-Reply-To: <CAHH9eM5jsLjzif8FWhgqKmfH3WFC8Te4D3J6-ELmfp1kx1Pguw@mail.gmail.com> References: <CAHH9eM5jsLjzif8FWhgqKmfH3WFC8Te4D3J6-ELmfp1kx1Pguw@mail.gmail.com> Date: Thu, 17 Oct 2013 03:46:33 +0200 Message-ID: <CAMwbjeVAE7d7sfvvrh-8+HTOn90dDjocJNcjs2Sc2DhzafCP4w@mail.gmail.com> Subject: Re: [gentoo-embedded] planning a flash DOM x86 embedded system From: Grzegorz Borowiak <gborowiak@gmail.com> To: gentoo-embedded@lists.gentoo.org Content-Type: multipart/alternative; boundary=e89a8fb1f748caf9b704e8e5fcef X-Archives-Salt: 2d4389cc-5e26-477e-8294-e8bd8d9212ca X-Archives-Hash: c8da2d829eb0727df6a544785770b554 --e89a8fb1f748caf9b704e8e5fcef Content-Type: text/plain; charset=ISO-8859-1 Every directory, which needs to be writable and persistent, needs to be mounted as unionfs or AUFS, with one branch in read-only partition, and the second one somewhere in /var. It's good to mount /etc that way and place the factory defaults in the read-only branch of this. An alternative is to allow only several files in /etc to be writable and move them to someplace in /var (e.g. /var/etc) and leave symlinks in /etc (e.g. /etc/resolv.conf -> /var/etc/resolv.conf). On Wed, Oct 16, 2013 at 2:48 PM, Francisco Ares <frares@gmail.com> wrote: > Hi. > > I am planning to build a system to be deployed in a SATA flash disk, and > most of the file system will be read-only. There will be a tempfs on /temp > and a read-write partition for /var (perhaps a unionfs with the static part > of /var and that read-write partition) > > Is there any resources on how to do this using Gentoo? > > There is already a development system with everything working as expected > on the final system. But when I put it to a squashfs, the system boots with > several errors, like when trying to write to /etc and /var. > > Looking on the new issue regarding /usr and / being on a different > partitions, I have found the file in /etc/initramfs.mounts. I have added > the needed fstab entries to be mounted before the system switches to the > real-root, (as the comments on top of this file claims) but there are > still errors during boot. > > Thanks > Francisco > --e89a8fb1f748caf9b704e8e5fcef Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Every directory, which needs to be writable and persistent= , needs to be mounted as unionfs or AUFS, with one branch in read-only part= ition, and the second one somewhere in /var. It's good to mount /etc th= at way and place the factory defaults in the read-only branch of this. An a= lternative is to allow only several files in /etc to be writable and move t= hem to someplace in /var (e.g. /var/etc) and leave symlinks in /etc (e.g. /= etc/resolv.conf -> /var/etc/resolv.conf).<br> </div><div class=3D"gmail_extra"><br><br><div class=3D"gmail_quote">On Wed,= Oct 16, 2013 at 2:48 PM, Francisco Ares <span dir=3D"ltr"><<a href=3D"m= ailto:frares@gmail.com" target=3D"_blank">frares@gmail.com</a>></span> w= rote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div><div><div><div>Hi.<br>= <br></div>I am planning to build a system to be deployed in a SATA flash di= sk, and most of the file system will be read-only. There will be a tempfs o= n /temp and a read-write partition for /var (perhaps a unionfs with the sta= tic part of /var and that read-write partition)<br> <br></div>Is there any resources on how to do this using Gentoo?<br><br></d= iv>There is already a development system with everything working as expecte= d on the final system. But when I put it to a squashfs, the system boots wi= th several errors, like when trying to write to /etc and /var.<br> <br></div><div>Looking on the new issue regarding /usr and / being on a dif= ferent partitions, I have found the file in /etc/initramfs.mounts. I have a= dded the needed fstab entries to be mounted before the system switches to t= he real-root, (as the comments on top of this file claims)=A0 but there are= still errors during boot.<br> </div><div><br></div>Thanks<span class=3D"HOEnZb"><font color=3D"#888888"><= br>Francisco<br></font></span></div> </blockquote></div><br></div> --e89a8fb1f748caf9b704e8e5fcef--