slarm64This forum is for the discussion of slarm64.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I ran into a problem, where after a package update, I updated the kernel and related packages on my 8 GB Raspberry PI 4.
After the update, I rebuilt the initrd image, and after a reboot, I was greeted with a kernel panic:
Code:
/bin/ash: error while loading shared libraries: libm.so.6: cannot open shared object file: No such file or directory
Kernel panic - not syncing: Attempted to kill init! exitcode=....
I believe the initrd tree likely doesn't contain that file for some reason.
Is there maybe some reason why this broke? Things were working fine before.
took the last image slarm64-current-aarch64-server-raspberry_pi_4-5.16.7-build-20220215.img.zst, then updated and recreated uInitrd loaded normally.
I will have this topic moved over to the slarm64 forum soon.
On the other hand: I managed to build a working initrd while on another Raspberry PI4, and having chrooted to the problematic machine's SD card.
That image is around 10 MB in size, while the other, that I manage to create locally is only around 6 MB (and doesn't work).
This image I created from a chroot, and works: https://drive.google.com/file/d/1kK3...ew?usp=sharing
This is the image that I create locally and doesn't work: https://drive.google.com/file/d/1ukM...ew?usp=sharing
it looks like mkinitrd is failing to find dependencies.
As far as I could check the ldd command works fine. I just failed to find the /bin/ash binary, so that I could check that. I checked the /bin/sh and /bin/bash binaries, and they both return the same libraries, on both my working machine and the one where I can't build a working initrd.
When creating the initrd, I didn't see anything that would indicate an error:
Code:
root@pi4-build:/boot# bash ./rebuild-initrd.sh
select kernel: 5.16.7
kernel: 5.16.7
select modules: ext4:xfs:btrfs
modules: ext4:xfs:btrfs
Started build uInitrd-5.16.7
OK: /lib/modules/5.16.7/kernel/fs/xfs/xfs.ko added.
OK: /lib/modules/5.16.7/kernel/lib/zstd/zstd_compress.ko added.
OK: /lib/modules/5.16.7/kernel/lib/raid6/raid6_pq.ko added.
OK: /lib/modules/5.16.7/kernel/arch/arm64/lib/xor-neon.ko added.
OK: /lib/modules/5.16.7/kernel/crypto/xor.ko added.
OK: /lib/modules/5.16.7/kernel/fs/btrfs/btrfs.ko added.
OK: /lib/modules/5.16.7/kernel/drivers/md/dm-mod.ko added.
OK: /lib/modules/5.16.7/kernel/drivers/md/dm-mod.ko added.
OK: /lib/modules/5.16.7/kernel/drivers/md/dm-bufio.ko added.
OK: /lib/modules/5.16.7/kernel/drivers/md/dm-snapshot.ko added.
41860 blocks
/tmp/initrd.gz created.
Be sure to run lilo again if you use it.
/tmp/initrd-tree /boot
/boot
Image Name: uInitrd
Created: Tue Mar 15 13:23:26 2022
Image Type: AArch64 Linux RAMDisk Image (gzip compressed)
Data Size: 6274387 Bytes = 6127.33 KiB = 5.98 MiB
Load Address: 00000000
Entry Point: 00000000
Rebuild uInitrd-5.16.7 complited.
root@pi4-build:/boot#
As far as I could check the ldd command works fine. I just failed to find the /bin/ash binary, so that I could check that. I checked the /bin/sh and /bin/bash binaries, and they both return the same libraries, on both my working machine and the one where I can't build a working initrd.
When creating the initrd, I didn't see anything that would indicate an error:
Code:
root@pi4-build:/boot# bash ./rebuild-initrd.sh
select kernel: 5.16.7
kernel: 5.16.7
select modules: ext4:xfs:btrfs
modules: ext4:xfs:btrfs
Started build uInitrd-5.16.7
OK: /lib/modules/5.16.7/kernel/fs/xfs/xfs.ko added.
OK: /lib/modules/5.16.7/kernel/lib/zstd/zstd_compress.ko added.
OK: /lib/modules/5.16.7/kernel/lib/raid6/raid6_pq.ko added.
OK: /lib/modules/5.16.7/kernel/arch/arm64/lib/xor-neon.ko added.
OK: /lib/modules/5.16.7/kernel/crypto/xor.ko added.
OK: /lib/modules/5.16.7/kernel/fs/btrfs/btrfs.ko added.
OK: /lib/modules/5.16.7/kernel/drivers/md/dm-mod.ko added.
OK: /lib/modules/5.16.7/kernel/drivers/md/dm-mod.ko added.
OK: /lib/modules/5.16.7/kernel/drivers/md/dm-bufio.ko added.
OK: /lib/modules/5.16.7/kernel/drivers/md/dm-snapshot.ko added.
41860 blocks
/tmp/initrd.gz created.
Be sure to run lilo again if you use it.
/tmp/initrd-tree /boot
/boot
Image Name: uInitrd
Created: Tue Mar 15 13:23:26 2022
Image Type: AArch64 Linux RAMDisk Image (gzip compressed)
Data Size: 6274387 Bytes = 6127.33 KiB = 5.98 MiB
Load Address: 00000000
Entry Point: 00000000
Rebuild uInitrd-5.16.7 complited.
root@pi4-build:/boot#
I think a lot is not displayed, that's where /bin/ash is located /usr/share/mkinitrd/initrd-tree.tar.gz
Thanks for pointing that out!
I checked /bin/ash in the initrd-tree archive, and it's a symlink to busybox (no surprises there).
I ran ldd on the busybox binary, and it produced the following output:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.