Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 3847

Advanced users • Generated initramfs_2712 requires grep, but does not include it

$
0
0
The https://downloads.raspberrypi.com/raspi ... ite.img.xz image contains in »/boot» the files «initramfs8» and «initramfs_2712». These are zstd compressed cpio files. Each of the files contains the binary «/usr/bin/grep». The farther «scripts/local-premount/firstboot» contains «if ! grep -q firstboot /proc/cmdline; then» and «scritps/local-bottom/imager_fixup» contains «if ! grep -q 'systemd\.run=/boot/firstrun\.sh' /proc/cmdline; then».

In a headless setup, I execute the image by calling «qemu-system-aarch64 -M raspi3b -cpu cortex-a72 -append "rw earlyprintk loglevel=8 console=ttyAMA0,115200 dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootdelay=1" -kernel kernel8.img …». Then I install/uninstall packages with apt. Eventually these packages trigger creating new initramfs images «/boot/initramfs_2712» and «boot/initramfs8». These images contain again calls to «grep» from «/srcipts/local-premount/firstboot» and «scritps/local-bottom/imager_fixup». But they do not contain the «/usr/bin/grep» executable.

When I flash the image left by qemu and boot, at boot time is printed

Code:

Begin: Running /scripts/local-premount ... /scripts/local-premount/firstboot: 11: /scripts/local-premount/firstboot: grep: not founddone.
The problem report is that the RPI official image creates initrd images, which require the presence of grep, but do not include grep in the image. For this or another reason on first boot after SD card flash in my use case the filesystem is not expanded to allocate more space (the whole SD card)

Statistics: Posted by dpa — Sat Jan 27, 2024 9:11 am



Viewing all articles
Browse latest Browse all 3847

Trending Articles