From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter =?utf-8?q?M=C3=BCller?= To: development@lists.ipfire.org Subject: Re: [PATCH] Core Update 169: Regenerate initrds and save space on ARM Date: Thu, 07 Jul 2022 13:30:24 +0000 Message-ID: <80967281-9399-0941-03c7-6283583dc2bd@ipfire.org> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6133106850249547389==" List-Id: --===============6133106850249547389== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello Michael, thanks for your reply. > Hello, >=20 > Indeed we don=E2=80=99t need to ship them, we can generate them instead. >=20 > But that has of course some downsides, too: >=20 > * It is slow > * It is not entirely error-proof (out of disk space, out of memory, system = being rebooted too early) So I guess the first newly introduced line ("dracut --regenerate-all --force"= ) of my patch is obsolete then, as the initrds are already there - we just need th= e directives for ARM. To my understanding, if dracut fails due to space/memory issues, the upgrade = would have failed either way. Do you want me to submit a v2 of this patch without the dracut directive? Or = should I commit this straight to next, and you cherry-pick it into master? Thanks, and best regards, Peter M=C3=BCller >=20 > I do not really have much of a preference. The only thing I want to say is = that ARM needs to get their shit together and being able to load a regular im= age instead of asking for extra commands here - or build that into dracut. >=20 > -Michael >=20 >> On 7 Jul 2022, at 07:48, Peter M=C3=BCller wr= ote: >> >> Hello *, >> >> to my understanding, we do not need to ship "linux-initrd" if we can easily >> rebuild those on the systems anyway. I would prefer the latter, since that >> keeps the update smaller. >> >> This was also raised somewhere in the community a while ago, but I am unab= le >> to find the correspondent thread at the moment. >> >> How do we proceed here? >> >> Thanks, and best regards, >> Peter M=C3=BCller >> >> >>> https://community.ipfire.org/t/again-with-the-file-system-full-core-169/8= 186 >>> >>> Signed-off-by: Peter M=C3=BCller >>> --- >>> config/rootfiles/core/169/update.sh | 13 +++++++++++++ >>> 1 file changed, 13 insertions(+) >>> >>> diff --git a/config/rootfiles/core/169/update.sh b/config/rootfiles/core/= 169/update.sh >>> index 3902e2d45..50f0bd8a4 100644 >>> --- a/config/rootfiles/core/169/update.sh >>> +++ b/config/rootfiles/core/169/update.sh >>> @@ -150,6 +150,19 @@ ldconfig >>> # Apply sysctl changes >>> /etc/init.d/sysctl start >>> >>> +# Regenerate all initrds >>> +dracut --regenerate-all --force >>> +case "$(uname -m)" in >>> + armv*) >>> + mkimage -A arm -T ramdisk -C lzma -d /boot/initramfs-${KVER}-ipfire.im= g /boot/uInit-${KVER}-ipfire >>> + rm /boot/initramfs-${KVER}-ipfire.img >>> + ;; >>> + aarch64) >>> + mkimage -A arm64 -T ramdisk -C lzma -d /boot/initramfs-${KVER}-ipfire.= img /boot/uInit-${KVER}-ipfire >>> + # dont remove initramfs because grub need this to boot. >>> + ;; >>> +esac >>> + >>> # Start services >>> telinit u >>> /etc/init.d/firewall restart >=20 --===============6133106850249547389==--