From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Thu, 02 Mar 2023 17:09:30 +0100 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pXlUo-006dT5-07 for lore@lore.pengutronix.de; Thu, 02 Mar 2023 17:09:30 +0100 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1pXlUn-00079I-KO; Thu, 02 Mar 2023 17:09:29 +0100 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pXlUg-00078p-6b; Thu, 02 Mar 2023 17:09:22 +0100 Received: from mol by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1pXlUf-0006ZT-Vw; Thu, 02 Mar 2023 17:09:21 +0100 Date: Thu, 2 Mar 2023 17:09:21 +0100 From: Michael Olbrich To: Jan =?iso-8859-1?Q?L=FCbbe?= Message-ID: <20230302160921.GS11792@pengutronix.de> Mail-Followup-To: Jan =?iso-8859-1?Q?L=FCbbe?= , Roland Hieber , distrokit@pengutronix.de References: <20230212221449.1644628-1-rhi@pengutronix.de> <20230212221449.1644628-8-rhi@pengutronix.de> <506f7f01d15bfa3835e351566ba126e7f63b33ed.camel@pengutronix.de> <20230302094152.mp3gf3g2j3v4gtrn@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [DistroKit] [PATCH 7/8] rauc: add initial support X-BeenThere: distrokit@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: DistroKit Mailinglist List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: distrokit@pengutronix.de, Roland Hieber Sender: "DistroKit" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: distrokit-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false Hi, On Thu, Mar 02, 2023 at 11:34:53AM +0100, Jan Lübbe wrote: > On Thu, 2023-03-02 at 10:41 +0100, Roland Hieber wrote: > > On Mon, Feb 13, 2023 at 08:37:25AM +0100, Jan Lübbe wrote: > > > On Sun, 2023-02-12 at 23:14 +0100, Roland Hieber wrote: > > > > +++ b/projectroot/etc/rauc/system.conf > > > > @@ -0,0 +1,16 @@ > > > > +[system] > > > > +compatible=@RAUC_BUNDLE_COMPATIBLE@ > > > > +bootloader=barebox > > > > + > > > > > > Please disable support for plain bundles. > > > > ACK. > > > > > Also, add a rauc data directory on the data partition so that we can use > > > adaptive updates and keep a global slot status file. > > > > Okay, this turned out to be a bit more involved, because although there > > is a data partition, it currently not mounted, because there is no mount > > unit for it and also no fstab entry, and it also there's no file system > > on it because systemd-autoformat@mmcblk3.service fails to run because > > mkfs cannot find the partition because after the previous steps which > > resize the partition to fill the maximum space on the SD card result in > > the partition table needing to be re-read by the kernel, which fails > > because the rootfs from the same block device is already mounted. > > > > And that is my current yak shaving status… I think the 'correct' way to > > do this would be using systemd-repart [1] before the rootfs is mounted > > (but maybe we need an initrd for that…? not sure…), or simply use the > > existing 512 MB data partition generated by genimage and let the user > > resize it manually when needed. > > > > [1]: https://www.freedesktop.org/software/systemd/man/systemd-repart.html > > On the LXA TAC we currently use systemd-repart for this: > https://github.com/linux-automation/meta-lxatac/tree/langdale/meta-lxatac-bsp/recipes-core/lxatac-repart > > We use it from the running system (not initramfs). Userspace can change the partition layout manually. systemd-repart does this internally via fdisk_reread_changes(). That in turn calls the BLKPG ioctl. So with the right tool you can resize a partition at runtime even if it's on the same device as the root partition. Michael -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |