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: Thu, 07 Jul 2022 15:54:53 +0200 Message-ID: In-Reply-To: <1fecd52f-bfd0-39f1-52a6-d063d090495c@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1798792880870395083==" List-Id: --===============1798792880870395083== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Please just send a patch to the list :) > On 7 Jul 2022, at 15:54, Peter M=C3=BCller wro= te: >=20 > Hello Michael, >=20 >> Hello, >>> On 7 Jul 2022, at 15:49, Peter M=C3=BCller w= rote: >>>=20 >>> Hello Michael, >>>=20 >>>> Hello, >>>>> On 7 Jul 2022, at 15:30, Peter M=C3=BCller = wrote: >>>>>=20 >>>>> Hello Michael, >>>>>=20 >>>>> thanks for your reply. >>>>>=20 >>>>>> Hello, >>>>>> Indeed we don=E2=80=99t need to ship them, we can generate them instea= d. >>>>>> But that has of course some downsides, too: >>>>>> * It is slow >>>>>> * It is not entirely error-proof (out of disk space, out of memory, sy= stem being rebooted too early) >>>>>=20 >>>>> 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 n= eed the directives >>>>> for ARM. >>>> Those should be shipped, too. Adding more size to the updater when shipp= ing the same stuff multiple times. >>>>> To my understanding, if dracut fails due to space/memory issues, the up= grade would have >>>>> failed either way. >>>> My point was that extracting the update would consume less memory. Disk = space constraints still apply unless there is not enough temporary space. >>>>> Do you want me to submit a v2 of this patch without the dracut directiv= e? Or should I >>>>> commit this straight to next, and you cherry-pick it into master? >>>> We should either ship everything, or generate everything. I don=E2=80=99= t think a mix is good idea. >>>=20 >>> agreed. >>>=20 >>> Then, this boils down to an "rm" statement on 32-bit ARM, and I will omit= regenerating >>> the initds - that's how Core Update 169 has been thus far, and there were= no complaints >>> whatsoever. >>>=20 >>> I will push this straight to next and get back to you shortly... >> We probably don=E2=80=99t want this in next. That already has c170. >=20 > true, but I cannot push to "master". Is it feasible for you to cherry-pick = 5ead33d796b9537bddbc4e2d5d27029de4df001a? >=20 > Thanks, and best regards, > Peter M=C3=BCller >>>=20 >>> Thanks, and best regards, >>> Peter M=C3=BCller >>>=20 >>>>> Thanks, and best regards, >>>>> Peter M=C3=BCller >>>>>=20 >>>>>> I do not really have much of a preference. The only thing I want to sa= y is that ARM needs to get their shit together and being able to load a regul= ar image instead of asking for extra commands here - or build that into dracu= t. >>>>>> -Michael >>>>>>> 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 = easily >>>>>>> rebuild those on the systems anyway. I would prefer the latter, since= that >>>>>>> keeps the update smaller. >>>>>>>=20 >>>>>>> This was also raised somewhere in the community a while ago, but I am= unable >>>>>>> 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/= 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 >>>>>>>>=20 >>>>>>>> +# Regenerate all initrds >>>>>>>> +dracut --regenerate-all --force >>>>>>>> +case "$(uname -m)" in >>>>>>>> + armv*) >>>>>>>> + mkimage -A arm -T ramdisk -C lzma -d /boot/initramfs-${KVER}-ipfi= re.img /boot/uInit-${KVER}-ipfire >>>>>>>> + rm /boot/initramfs-${KVER}-ipfire.img >>>>>>>> + ;; >>>>>>>> + aarch64) >>>>>>>> + mkimage -A arm64 -T ramdisk -C lzma -d /boot/initramfs-${KVER}-ip= fire.img /boot/uInit-${KVER}-ipfire >>>>>>>> + # dont remove initramfs because grub need this to boot. >>>>>>>> + ;; >>>>>>>> +esac >>>>>>>> + >>>>>>>> # Start services >>>>>>>> telinit u >>>>>>>> /etc/init.d/firewall restart --===============1798792880870395083==--