#3657 PR merged: arm64: bring initramfs rebuilding on Debian and SUSE¶
Labels: enhancement, fixed / solved / done
svlv opened issue at 2026-10-20 12:06:¶
Pull Request Details:¶
-
Type: Enhancement
-
Impact: Normal
-
Reference to related issue (URL):
-
How was this pull request tested?
ARM64 VMs running Debian 13 and openSUSE Leap 16 were successfully backed up and recovered. -
Description of the changes in this pull request:
Achieve AMD64 parity in initramfs rebuilding on Debian and SUSE.
codacy-production commented at 2026-10-20 12:07:¶
Up to standards ✅¶
🟢 Issues 0 issues
> > > **Results:** > `0` new issues > > [View in > Codacy](https://app.codacy.com/gh/rear/rear/pull-requests/3657/issues) >
NEW Get contextual insights on your PRs based on Codacy's
metrics, along with PR and Jira context, without leaving GitHub. Enable
AI
reviewer
TIP This summary will be updated as you push new changes.
jsmeix commented at 2026-10-20 12:41:¶
@rear/contributors
please have a look here (as time permits).
Perhaps you spot issues that I overlooked?
lzaoral commented at 2026-10-20 12:43:¶
Actually, wouldn't it be simpler to execute the initrd regeneration
regardless of the architecture, i.e. move the script to the default
directory?
svlv commented at 2026-10-20 13:09:¶
Actually, wouldn't it be simpler to execute the initrd regeneration regardless of the architecture, i.e. move the script to the default directory?
I think, it's a good point. Also, it would allow us to remove some
arch-specific dirs that contain only a link to
550_rebuild_initramfs.sh
$ tree usr/share/rear/finalize/SUSE_LINUX/
usr/share/rear/finalize/SUSE_LINUX/
├── arm
│ └── 550_rebuild_initramfs.sh -> ../i386/550_rebuild_initramfs.sh
├── i386
│ ├── 550_rebuild_initramfs.sh
│ └── 675_install_shim.sh
├── ppc64
│ └── 550_rebuild_initramfs.sh -> ../i386/550_rebuild_initramfs.sh
├── ppc64le
│ └── 550_rebuild_initramfs.sh -> ../i386/550_rebuild_initramfs.sh
└── s390
└── 660_install_grub2_and_zipl.sh
$ tree usr/share/rear/finalize/Debian/
usr/share/rear/finalize/Debian/
├── arm
│ └── 550_rebuild_initramfs.sh -> ../i386/550_rebuild_initramfs.sh
├── i386
│ └── 550_rebuild_initramfs.sh
└── ppc64le
└── 550_rebuild_initramfs.sh -> ../i386/550_rebuild_initramfs.sh
I can do it if there are no objections. Please let me know whether you agree or not.
jsmeix commented at 2026-10-20 13:15:¶
I don't have time for analysis but
all actual script files differ
# find usr/share/rear/finalize -type f -ls | grep 'rebuild_initramfs'
... 5397 ... usr/share/rear/finalize/Fedora/550_rebuild_initramfs.sh
... 5939 ... usr/share/rear/finalize/SUSE_LINUX/i386/550_rebuild_initramfs.sh
... 4454 ... usr/share/rear/finalize/Debian/i386/550_rebuild_initramfs.sh
svlv commented at 2026-10-20 13:19:¶
I don't have time for analysis but
all actual script files differ
I think that @lzaoral's idea was to move
usr/share/rear/finalize/Debian/i386/550_rebuild_initramfs.sh to
usr/share/rear/finalize/Debian/550_rebuild_initramfs.sh and doing the
same for SUSE.
jsmeix commented at 2026-10-20 13:20:¶
Ah - sorry - I didn't look carefully.
jsmeix commented at 2026-10-20 13:29:¶
I think the function SourceStage() in
lib/_framework-setup-and-functions.sh
may not source from
usr/share/rear/finalize/Fedora/default
usr/share/rear/finalize/Debian/default
usr/share/rear/finalize/SUSE_LINUX/default
if I understand this code piece correctly
from plain looking at the SourceStage() code
local scripts=( $( cd $SHARE_DIR/$stage
ls -d {default,"$ARCH","$OS",..."}/*.sh \
"$BACKUP"/{default,"$ARCH","$OS",..."}/*.sh \
"$OUTPUT"/{default,"$ARCH","$OS",..."}/*.sh \
"$OUTPUT"/"$BACKUP"/{default,"$ARCH","$OS",..."}/*.sh \
Proof (in a git clone)
# mkdir usr/share/rear/finalize/SUSE_LINUX/default
# echo 'Error "test"' >usr/share/rear/finalize/SUSE_LINUX/default/999_test.sh
# usr/sbin/rear -s recover | grep test
[no output]
jsmeix commented at 2026-10-20 13:41:¶
I.e. what confused me was
"move the script to the default directory"
jsmeix commented at 2026-10-20 14:01:¶
So the actual proposal is for SUSE_LINUX and Debian
to move their actual script to their parent directories
and remove the symlinks.
So we would get the actual scripts
usr/share/rear/finalize/Fedora/550_rebuild_initramfs.sh
usr/share/rear/finalize/SUSE_LINUX/550_rebuild_initramfs.sh
usr/share/rear/finalize/Debian/550_rebuild_initramfs.sh
which means those scripts get executed on all architectures
so those scripts must work on all architectures.
Because this already works for Fedora
I guess it will also work for SUSE_LINUX and Debian
but I did not check if the scripts for SUSE_LINUX and Debian
will actually work on all architectures.
svlv commented at 2026-10-20 14:12:¶
So the actual proposal is for SUSE_LINUX and Debian
to move their actual script to their parent directories
and remove the symlinks.
Yes, exactly.
but I did not check if the scripts for SUSE_LINUX and Debian
will actually work on all architectures.
Me neither. I can check only amd64 and arm64. Basically, that's why I am
asking whether you agree or not.
I don't possess experience with other platforms (I'm familiar with
32-bit ARM, but that's unrelated).
jsmeix commented at 2026-10-20 15:51:¶
I have personal experience only with x86_64.
I have only x86_64 systems (I am in homeoffice).
svlv commented at 2026-10-20 16:03:¶
I have personal experience only with x86_64.
I have only x86_64 systems (I am in homeoffice).
Alright, I am leaving it as is since I can't verify it properly. If someone else request it, then we'll see.
jsmeix commented at 2026-10-26 13:36:¶
@rear/contributors
I would like to merge it this Wednesday (28. Oct.) afternoon
unless there are objections against its current form.
Further cleanup work can be done later as needed.
jsmeix commented at 2026-10-28 13:29:¶
@svlv
thank you for your continuous enhancements to ReaR!
[Export of Github issue for rear/rear.]