From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: Re: [PATCH] Core Update 169: Regenerate initrds and save space on ARM Date: Tue, 12 Jul 2022 12:35:48 +0200 Message-ID: <30DC4452-39ED-4B09-A6B2-F40A617AC21C@ipfire.org> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8867797759421436170==" List-Id: --===============8867797759421436170== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello, > On 10 Jul 2022, at 12:13, Peter M=C3=BCller wr= ote: >=20 > Hello Jon, >=20 > thanks for your reply. >=20 >> Peter / Michael, >>=20 >>=20 >>> * It is not entirely error-proof (out of disk space, out of memory, syste= m being rebooted too early) >>=20 >> Is it possible to add a Disk Space check before doing an upgrade? >=20 > Um, I thought we do that in the update.sh of every Core Update that involve= s a kernel update? >=20 >> I=E2=80=99ve been bit twice by running out of disk space mid-upgrade. I wa= s remotely upgrading a family member's system from CU 163 to CU 167 and got s= tuck =C2=BD way. >=20 > When multiple Core Updates are available, Pakfire will currently download t= hem all before applying > them sequentially. On systems with very tight disk space, this can indeed c= ause trouble, since the > more Core Updates they lag behind, the greater is the amount of disk space = necessary for upgrading. >=20 > I guess it makes sense to raise this issue and the general question whether= we should ship initial > ramdisks or generate them on the target systems (the former has quite some = impact on Core Update > sizes) in the August telephone conference. >=20 > Any thoughts? I can live with both: Shipping or building locally. But I would want to only do one. Never mix and match. Whatever we do, we will= go with it. Since we are tight on space, why don=E2=80=99t we generate them? >=20 > Thanks, and best regards, > Peter M=C3=BCller >=20 >>=20 >> Here is my recent oops: >>=20 >> ``` >> Message from syslogd(a)ipfire4 at Fri May 13 14:59:33 2022 ... >> ipfire4 ipfire: core-update-164: ERROR cannot update because not enough fr= ee space on root. >> May 13 14:59:33 ipfire4 pakfire: PAKFIRE ERROR: Returncode: 2. Sorry. Plea= se search our forum to find a solution for this problem. >> May 13 14:59:55 ipfire4 sshd[31097]: Received signal 15; terminating. >> ``` >>=20 >> Jon >>=20 >>=20 >>=20 >>=20 >>=20 >>> On Jul 7, 2022, at 8:19 AM, Michael Tremer > wrote: >>>=20 >>> 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, syste= m being rebooted too early) >>>=20 >>> I do not really have much of a preference. The only thing I want to say i= s that ARM needs to get their shit together and being able to load a regular = image 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 > wrote: >>>>=20 >>>> Hello *, >>>>=20 >>>> to my understanding, we do not need to ship "linux-initrd" if we can eas= ily >>>> rebuild those on the systems anyway. I would prefer the latter, since th= at >>>> keeps the update smaller. >>>>=20 >>>> This was also raised somewhere in the community a while ago, but I am un= able >>>> to find the correspondent thread at the moment. >>>>=20 >>>> How do we proceed here? >>>>=20 >>>> Thanks, and best regards, >>>> Peter M=C3=BCller >>>>=20 >>>>=20 >>>>> https://community.ipfire.org/t/again-with-the-file-system-full-core-169= /8186 >>>>>=20 >>>>> Signed-off-by: Peter M=C3=BCller >>>>> --- >>>>> config/rootfiles/core/169/update.sh | 13 +++++++++++++ >>>>> 1 file changed, 13 insertions(+) >>>>>=20 >>>>> diff --git a/config/rootfiles/core/169/update.sh b/config/rootfiles/cor= e/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 >>>>>=20 >>>>> +# Regenerate all initrds >>>>> +dracut --regenerate-all --force >>>>> +case "$(uname -m)" in >>>>> + armv*) >>>>> + mkimage -A arm -T ramdisk -C lzma -d /boot/initramfs-${KVER}-ipfire.= img /boot/uInit-${KVER}-ipfire >>>>> + rm /boot/initramfs-${KVER}-ipfire.img >>>>> + ;; >>>>> + aarch64) >>>>> + mkimage -A arm64 -T ramdisk -C lzma -d /boot/initramfs-${KVER}-ipfir= e.img /boot/uInit-${KVER}-ipfire >>>>> + # dont remove initramfs because grub need this to boot. >>>>> + ;; >>>>> +esac >>>>> + >>>>> # Start services >>>>> telinit u >>>>> /etc/init.d/firewall restart --===============8867797759421436170==--