* [PATCH 0/1] Don't run update-initramfs with enable-fsck
@ 2022-01-21 7:42 Uladzimir Bely
2022-01-21 7:42 ` [PATCH 1/1] enable-fsck: don't run update-initramfs after fstab modification Uladzimir Bely
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Uladzimir Bely @ 2022-01-21 7:42 UTC (permalink / raw)
To: isar-users
The enable-fsck recipe installs into the system the script that sets
'fs_passno' fields for the partitions in fstab. After that, it calls
'update-initramfs -u' that takes several minutes to run.
In CI this sometimes causes fails with 'run_vm' tests while there is
no proper command prompt after expected timeout, especially if CI
server is highly loaded.
Actually, there were several targets checked. All of them had empty
fstab in their generated initramfs images. So, 'update-initramfs -u'
just takes much time but doesn't really change anything and may be
omitted.
Anyway, something could be overlooked during investigations, so if we
really need initramfs update at first run, it would be nice to know
exactly why.
Uladzimir Bely (1):
enable-fsck: don't run update-initramfs after fstab modification
meta/recipes-support/enable-fsck/files/enable-fsck.sh | 2 --
1 file changed, 2 deletions(-)
--
2.20.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/1] enable-fsck: don't run update-initramfs after fstab modification
2022-01-21 7:42 [PATCH 0/1] Don't run update-initramfs with enable-fsck Uladzimir Bely
@ 2022-01-21 7:42 ` Uladzimir Bely
2025-09-05 15:06 ` 'Jan Kiszka' via isar-users
2022-01-25 6:46 ` [PATCH 0/1] Don't run update-initramfs with enable-fsck Jan Kiszka
2022-02-14 10:18 ` Anton Mikanovich
2 siblings, 1 reply; 8+ messages in thread
From: Uladzimir Bely @ 2022-01-21 7:42 UTC (permalink / raw)
To: isar-users
On first machine run, if enable-fsck recipe was enabled, it takes
much time to start because of spending too much time on
the 'update-initramfs -u' call.
Removing it while it really does nothing useful.
Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
---
meta/recipes-support/enable-fsck/files/enable-fsck.sh | 2 --
1 file changed, 2 deletions(-)
diff --git a/meta/recipes-support/enable-fsck/files/enable-fsck.sh b/meta/recipes-support/enable-fsck/files/enable-fsck.sh
index d09e35df..72d6bd78 100644
--- a/meta/recipes-support/enable-fsck/files/enable-fsck.sh
+++ b/meta/recipes-support/enable-fsck/files/enable-fsck.sh
@@ -12,5 +12,3 @@ set -e
ROOT_DEV="$(/bin/findmnt -n -o SOURCE /)"
sed -i -e 's|^/dev/root\([ ]\+.*[ ]\+\)0[ ]\+0|'"$ROOT_DEV"'\10 1|' \
-e 's|^\(/dev/.*[ ]\+\)0[ ]\+0|\10 2|' /etc/fstab
-
-update-initramfs -u
--
2.20.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/1] Don't run update-initramfs with enable-fsck
2022-01-21 7:42 [PATCH 0/1] Don't run update-initramfs with enable-fsck Uladzimir Bely
2022-01-21 7:42 ` [PATCH 1/1] enable-fsck: don't run update-initramfs after fstab modification Uladzimir Bely
@ 2022-01-25 6:46 ` Jan Kiszka
2022-02-14 10:18 ` Anton Mikanovich
2 siblings, 0 replies; 8+ messages in thread
From: Jan Kiszka @ 2022-01-25 6:46 UTC (permalink / raw)
To: Uladzimir Bely, isar-users
On 21.01.22 08:42, Uladzimir Bely wrote:
> The enable-fsck recipe installs into the system the script that sets
> 'fs_passno' fields for the partitions in fstab. After that, it calls
> 'update-initramfs -u' that takes several minutes to run.
>
> In CI this sometimes causes fails with 'run_vm' tests while there is
> no proper command prompt after expected timeout, especially if CI
> server is highly loaded.
>
> Actually, there were several targets checked. All of them had empty
> fstab in their generated initramfs images. So, 'update-initramfs -u'
> just takes much time but doesn't really change anything and may be
> omitted.
>
> Anyway, something could be overlooked during investigations, so if we
> really need initramfs update at first run, it would be nice to know
> exactly why.
>
I don't recall details about this anymore. I would just recommend to
check if there are any differences in buster vs. newer versions. Stretch
is no longer supported, but I think it was the target back then, and
maybe that did something different /wrt the initramfs.
Jan
--
Siemens AG, Technology
Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/1] Don't run update-initramfs with enable-fsck
2022-01-21 7:42 [PATCH 0/1] Don't run update-initramfs with enable-fsck Uladzimir Bely
2022-01-21 7:42 ` [PATCH 1/1] enable-fsck: don't run update-initramfs after fstab modification Uladzimir Bely
2022-01-25 6:46 ` [PATCH 0/1] Don't run update-initramfs with enable-fsck Jan Kiszka
@ 2022-02-14 10:18 ` Anton Mikanovich
2 siblings, 0 replies; 8+ messages in thread
From: Anton Mikanovich @ 2022-02-14 10:18 UTC (permalink / raw)
To: Uladzimir Bely, isar-users
21.01.2022 10:42, Uladzimir Bely wrote:
> The enable-fsck recipe installs into the system the script that sets
> 'fs_passno' fields for the partitions in fstab. After that, it calls
> 'update-initramfs -u' that takes several minutes to run.
>
> In CI this sometimes causes fails with 'run_vm' tests while there is
> no proper command prompt after expected timeout, especially if CI
> server is highly loaded.
>
> Actually, there were several targets checked. All of them had empty
> fstab in their generated initramfs images. So, 'update-initramfs -u'
> just takes much time but doesn't really change anything and may be
> omitted.
>
> Anyway, something could be overlooked during investigations, so if we
> really need initramfs update at first run, it would be nice to know
> exactly why.
>
> Uladzimir Bely (1):
> enable-fsck: don't run update-initramfs after fstab modification
>
> meta/recipes-support/enable-fsck/files/enable-fsck.sh | 2 --
> 1 file changed, 2 deletions(-)
>
Applied to next, thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] enable-fsck: don't run update-initramfs after fstab modification
2022-01-21 7:42 ` [PATCH 1/1] enable-fsck: don't run update-initramfs after fstab modification Uladzimir Bely
@ 2025-09-05 15:06 ` 'Jan Kiszka' via isar-users
2025-09-09 9:18 ` Baurzhan Ismagulov
2025-09-19 12:26 ` Uladzimir Bely
0 siblings, 2 replies; 8+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2025-09-05 15:06 UTC (permalink / raw)
To: Uladzimir Bely, isar-users, Quirin Gylstorff
On 21.01.22 08:42, Uladzimir Bely wrote:
> On first machine run, if enable-fsck recipe was enabled, it takes
> much time to start because of spending too much time on
> the 'update-initramfs -u' call.
>
> Removing it while it really does nothing useful.
>
> Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
> ---
> meta/recipes-support/enable-fsck/files/enable-fsck.sh | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/meta/recipes-support/enable-fsck/files/enable-fsck.sh b/meta/recipes-support/enable-fsck/files/enable-fsck.sh
> index d09e35df..72d6bd78 100644
> --- a/meta/recipes-support/enable-fsck/files/enable-fsck.sh
> +++ b/meta/recipes-support/enable-fsck/files/enable-fsck.sh
> @@ -12,5 +12,3 @@ set -e
> ROOT_DEV="$(/bin/findmnt -n -o SOURCE /)"
> sed -i -e 's|^/dev/root\([ ]\+.*[ ]\+\)0[ ]\+0|'"$ROOT_DEV"'\10 1|' \
> -e 's|^\(/dev/.*[ ]\+\)0[ ]\+0|\10 2|' /etc/fstab
> -
> -update-initramfs -u
This was wrong, unfortunately: The original purpose of this whole recipe
is to generate an initramfs that contains all tools needed to perform
early filesystem checks. As this information is not available at the
time we build the rootfs, only after wic ran, I once decided achieve the
desired effect by recreating the initramfs on first boot.
If anyone has a better idea how to model that more elegantly, I'm all
ears. Otherwise, we need to revert this and address the boot time issue
by reducing the number of targets where it is run.
Jan
--
Siemens AG, Foundational Technologies
Linux Expert Center
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/70095639-d103-4e7f-8c26-1f79b80efe9c%40siemens.com.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] enable-fsck: don't run update-initramfs after fstab modification
2025-09-05 15:06 ` 'Jan Kiszka' via isar-users
@ 2025-09-09 9:18 ` Baurzhan Ismagulov
2025-09-19 12:26 ` Uladzimir Bely
1 sibling, 0 replies; 8+ messages in thread
From: Baurzhan Ismagulov @ 2025-09-09 9:18 UTC (permalink / raw)
To: isar-users; +Cc: Quirin Gylstorff, Jan Kiszka, Natalia Tasci, Zhihang Wei
On 2025-09-05 17:06, 'Jan Kiszka' via isar-users wrote:
> This was wrong, unfortunately: The original purpose of this whole recipe
> is to generate an initramfs that contains all tools needed to perform
> early filesystem checks. As this information is not available at the
> time we build the rootfs, only after wic ran, I once decided achieve the
> desired effect by recreating the initramfs on first boot.
>
> If anyone has a better idea how to model that more elegantly, I'm all
> ears. Otherwise, we need to revert this and address the boot time issue
> by reducing the number of targets where it is run.
We'll check.
With kind regards,
Baurzhan
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/aL_w98-05IgkmXV5%40abai.de.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] enable-fsck: don't run update-initramfs after fstab modification
2025-09-05 15:06 ` 'Jan Kiszka' via isar-users
2025-09-09 9:18 ` Baurzhan Ismagulov
@ 2025-09-19 12:26 ` Uladzimir Bely
2025-09-19 12:32 ` 'Jan Kiszka' via isar-users
1 sibling, 1 reply; 8+ messages in thread
From: Uladzimir Bely @ 2025-09-19 12:26 UTC (permalink / raw)
To: Jan Kiszka, isar-users, Quirin Gylstorff
On Fri, 2025-09-05 at 17:06 +0200, Jan Kiszka wrote:
> On 21.01.22 08:42, Uladzimir Bely wrote:
> > On first machine run, if enable-fsck recipe was enabled, it takes
> > much time to start because of spending too much time on
> > the 'update-initramfs -u' call.
> >
> > Removing it while it really does nothing useful.
> >
> > Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
> > ---
> > meta/recipes-support/enable-fsck/files/enable-fsck.sh | 2 --
> > 1 file changed, 2 deletions(-)
> >
> > diff --git a/meta/recipes-support/enable-fsck/files/enable-fsck.sh
> > b/meta/recipes-support/enable-fsck/files/enable-fsck.sh
> > index d09e35df..72d6bd78 100644
> > --- a/meta/recipes-support/enable-fsck/files/enable-fsck.sh
> > +++ b/meta/recipes-support/enable-fsck/files/enable-fsck.sh
> > @@ -12,5 +12,3 @@ set -e
> > ROOT_DEV="$(/bin/findmnt -n -o SOURCE /)"
> > sed -i -e
> > 's|^/dev/root\([ ]\+.*[ ]\+\)0[ ]\+0|'"$ROOT_DEV"'\10 1|' \
> > -e
> > 's|^\(/dev/.*[ ]\+\)0[ ]\+0|\10 2|' /etc/fstab
> > -
> > -update-initramfs -u
>
> This was wrong, unfortunately: The original purpose of this whole
> recipe
> is to generate an initramfs that contains all tools needed to perform
> early filesystem checks. As this information is not available at the
> time we build the rootfs, only after wic ran, I once decided achieve
> the
> desired effect by recreating the initramfs on first boot.
>
> If anyone has a better idea how to model that more elegantly, I'm all
> ears. Otherwise, we need to revert this and address the boot time
> issue
> by reducing the number of targets where it is run.
>
> Jan
Hello.
It seems that "enable-fsck" doesn't look like some mandatory for Isar
itself, that's why the patch was applied earlier.
First, the script tries to modify "/dev/root..." line that none of
meta-isar's targets have at all. This probably works only with
downstreams that use `cip-core` with `readonly-roofs.bbclass` or in
some other (which?) cases with "/dev/root..." in fstab.
Second, other "/dev/..." lines in fstab are also uncommon for meta-
isar's targets that are quite simple (e.g., have only rootfs or at most
boot/rootfs).
Third, real benefit from enable-fsck seems to become visible only after
some hardware crashes that require filesystem reparing.
I tried to revert the patch and this brought the following issues
again:
- qemuarm/qemuarmhf machines (at least) take more than 10 minutes to
start when run on quite decent CI server. Default value for
DEF_VM_TO_SEC value in testsuite should be increased to avoid "timeout"
failures.
- generating new initrd on first run requires additional space on
rootfs, otherwise some targets fail. Changes in some WKS files (adding
extra space for root partition) are required.
When both issues are solved, CI seems to pass.
So, if having "update-initramfs" is mandatory for downstreams, we can
propose the following patchset as a solution:
- original patch revered
- increased CI timeout
- extra space added to .WKS/.conf used by failing qemu targets.
If OK, the patchset will be sent after testing in CI.
--
Best regards,
Uladzimir.
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/ec66909ef9307cc07f38bb2b51b52e43fbfc5a31.camel%40ilbers.de.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] enable-fsck: don't run update-initramfs after fstab modification
2025-09-19 12:26 ` Uladzimir Bely
@ 2025-09-19 12:32 ` 'Jan Kiszka' via isar-users
0 siblings, 0 replies; 8+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2025-09-19 12:32 UTC (permalink / raw)
To: Uladzimir Bely, isar-users, Quirin Gylstorff
On 19.09.25 14:26, Uladzimir Bely wrote:
> On Fri, 2025-09-05 at 17:06 +0200, Jan Kiszka wrote:
>> On 21.01.22 08:42, Uladzimir Bely wrote:
>>> On first machine run, if enable-fsck recipe was enabled, it takes
>>> much time to start because of spending too much time on
>>> the 'update-initramfs -u' call.
>>>
>>> Removing it while it really does nothing useful.
>>>
>>> Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
>>> ---
>>> meta/recipes-support/enable-fsck/files/enable-fsck.sh | 2 --
>>> 1 file changed, 2 deletions(-)
>>>
>>> diff --git a/meta/recipes-support/enable-fsck/files/enable-fsck.sh
>>> b/meta/recipes-support/enable-fsck/files/enable-fsck.sh
>>> index d09e35df..72d6bd78 100644
>>> --- a/meta/recipes-support/enable-fsck/files/enable-fsck.sh
>>> +++ b/meta/recipes-support/enable-fsck/files/enable-fsck.sh
>>> @@ -12,5 +12,3 @@ set -e
>>> ROOT_DEV="$(/bin/findmnt -n -o SOURCE /)"
>>> sed -i -e
>>> 's|^/dev/root\([ ]\+.*[ ]\+\)0[ ]\+0|'"$ROOT_DEV"'\10 1|' \
>>> -e
>>> 's|^\(/dev/.*[ ]\+\)0[ ]\+0|\10 2|' /etc/fstab
>>> -
>>> -update-initramfs -u
>>
>> This was wrong, unfortunately: The original purpose of this whole
>> recipe
>> is to generate an initramfs that contains all tools needed to perform
>> early filesystem checks. As this information is not available at the
>> time we build the rootfs, only after wic ran, I once decided achieve
>> the
>> desired effect by recreating the initramfs on first boot.
>>
>> If anyone has a better idea how to model that more elegantly, I'm all
>> ears. Otherwise, we need to revert this and address the boot time
>> issue
>> by reducing the number of targets where it is run.
>>
>> Jan
>
> Hello.
>
> It seems that "enable-fsck" doesn't look like some mandatory for Isar
> itself, that's why the patch was applied earlier.
>
> First, the script tries to modify "/dev/root..." line that none of
> meta-isar's targets have at all. This probably works only with
> downstreams that use `cip-core` with `readonly-roofs.bbclass` or in
> some other (which?) cases with "/dev/root..." in fstab.
>
> Second, other "/dev/..." lines in fstab are also uncommon for meta-
> isar's targets that are quite simple (e.g., have only rootfs or at most
> boot/rootfs).
>
> Third, real benefit from enable-fsck seems to become visible only after
> some hardware crashes that require filesystem reparing.
>
>
> I tried to revert the patch and this brought the following issues
> again:
>
> - qemuarm/qemuarmhf machines (at least) take more than 10 minutes to
> start when run on quite decent CI server. Default value for
> DEF_VM_TO_SEC value in testsuite should be increased to avoid "timeout"
> failures.
Don't test it on emulated platforms - does not add much value.
> - generating new initrd on first run requires additional space on
> rootfs, otherwise some targets fail. Changes in some WKS files (adding
> extra space for root partition) are required.
>
Pick few native targets and ensure that they have enough space.
> When both issues are solved, CI seems to pass.
>
> So, if having "update-initramfs" is mandatory for downstreams, we can
> propose the following patchset as a solution:
>
> - original patch revered
> - increased CI timeout
> - extra space added to .WKS/.conf used by failing qemu targets.
>
> If OK, the patchset will be sent after testing in CI.
>
I'm still open to a suggestion which resolves the underlying issue: Make
sure that fsck is run for writable rootfs, but that already during
offline [initrd] image generation.
Jan
--
Siemens AG, Foundational Technologies
Linux Expert Center
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/8af63a90-dabc-496d-aad9-c2335b283f86%40siemens.com.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-09-19 12:33 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-21 7:42 [PATCH 0/1] Don't run update-initramfs with enable-fsck Uladzimir Bely
2022-01-21 7:42 ` [PATCH 1/1] enable-fsck: don't run update-initramfs after fstab modification Uladzimir Bely
2025-09-05 15:06 ` 'Jan Kiszka' via isar-users
2025-09-09 9:18 ` Baurzhan Ismagulov
2025-09-19 12:26 ` Uladzimir Bely
2025-09-19 12:32 ` 'Jan Kiszka' via isar-users
2022-01-25 6:46 ` [PATCH 0/1] Don't run update-initramfs with enable-fsck Jan Kiszka
2022-02-14 10:18 ` Anton Mikanovich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox