JustArchi
2022-12-31 20:40:01 UTC
Reply
PermalinkVersion: 0.142
Severity: important
Dear Maintainer,
If MODULES=dep is used to trim generated initramfs on Raspberry Pi 4, it results in unbootable initramfs generated if user boots from USB-connected external drive (rather than microSD).
In particular, system is unable to find rootfs and after a brief delay bails out to shell prompt.
In order to make it work, reset_raspberrypi module has to be included. This is the case with MODULES=most, and precise reason why only MODULES=dep is affected. For MODULES=dep scenarios, reset_raspberrypi has to be manually added to /etc/initramfs-tools/modules.
I'd like to request a bugfix in this regard to always include reset_raspberrypi module in generated initramfs if it's loaded at the time of generation or it's otherwise determined that initramfs is generated for a machine is Raspberry Pi 4.
If it helps, reset_raspberrypi module is loaded anyway during later stage of the boot process, so it doesn't hurt to load it earlier right in the initramfs even for setups that would work correctly with it being loaded later on.
I'm not familiar with all internals of how initramfs-tools works, so I apologize in advance if I mixed something up. This is also I think my first or second bug report ever done, so please bear with me.
Thank you in advance for considering this enhancement/bugfix,
Archi.
-- Package-specific info:
-- initramfs sizes
-rw-r--r-- 1 root root 8.8M Dec 31 19:38 /boot/initrd.img-6.0.0-6-arm64
-- /proc/cmdline
dma.dmachans=0x37f5 bcm2709.boardrev=0xd03114 bcm2709.serial=0x31554c49 bcm2709.uart_clock=48000000 bcm2709.disk_led_gpio=42 bcm2709.disk_led_active_low=0 smsc95xx.macaddr=DC:A6:32:D3:C1:0F vc_mem.mem_base=0x3eb00000 vc_mem.mem_size=0x3ff00000 console=tty0 root=LABEL=RASPIROOT rw fsck.repair=yes net.ifnames=0 rootwait
-- /proc/filesystems
ext3
ext2
ext4
fuseblk
vfat
-- lsmod
Module Size Used by
tls 114688 114
ip6t_REJECT 16384 1
nf_reject_ipv6 24576 1 ip6t_REJECT
nft_compat 20480 1
nf_tables 212992 10 nft_compat
libcrc32c 16384 1 nf_tables
nfnetlink 24576 2 nft_compat,nf_tables
hci_uart 135168 0
btqca 24576 1 hci_uart
btrtl 24576 1 hci_uart
btbcm 28672 1 hci_uart
btintel 40960 1 hci_uart
btsdio 20480 0
bluetooth 757760 7 btrtl,btqca,btsdio,btintel,hci_uart,btbcm
binfmt_misc 24576 1
jitterentropy_rng 24576 1
sha512_generic 16384 0
sha512_arm64 20480 1
evdev 32768 2
nls_ascii 16384 1
bcm2835_v4l2 40960 0
nls_cp437 20480 1
brcmfmac 294912 0
bcm2835_mmal_vchiq 32768 1 bcm2835_v4l2
vfat 28672 1
videobuf2_vmalloc 20480 1 bcm2835_v4l2
fat 81920 1 vfat
brcmutil 16384 1 brcmfmac
vc4 274432 4
videobuf2_memops 20480 1 videobuf2_vmalloc
videobuf2_v4l2 24576 1 bcm2835_v4l2
aes_neon_bs 24576 0
videobuf2_common 53248 4 videobuf2_vmalloc,videobuf2_v4l2,bcm2835_v4l2,videobuf2_memops
broadcom 28672 1
snd_soc_hdmi_codec 24576 2
videodev 225280 3 videobuf2_v4l2,bcm2835_v4l2,videobuf2_common
bcm_phy_ptp 24576 1 broadcom
cfg80211 770048 1 brcmfmac
bcm_phy_lib 20480 2 bcm_phy_ptp,broadcom
aes_neon_blk 28672 1 aes_neon_bs
mc 53248 3 videodev,videobuf2_v4l2,videobuf2_common
snd_soc_core 208896 2 vc4,snd_soc_hdmi_codec
ptp 32768 1 bcm_phy_ptp
snd_bcm2835 28672 0
cpufreq_dt 20480 0
snd_pcm_dmaengine 20480 1 snd_soc_core
pps_core 24576 1 ptp
snd_pcm 118784 4 snd_bcm2835,snd_soc_hdmi_codec,snd_soc_core,snd_pcm_dmaengine
drbg 40960 1
snd_timer 40960 1 snd_pcm
ansi_cprng 20480 0
snd 98304 5 snd_bcm2835,snd_soc_hdmi_codec,snd_timer,snd_soc_core,snd_pcm
soundcore 20480 1 snd
cec 53248 1 vc4
rc_core 53248 3 cec
ecdh_generic 16384 1 bluetooth
drm_display_helper 122880 1 vc4
raspberrypi_cpufreq 16384 0
dwc2 237568 0
genet 69632 0
drm_cma_helper 20480 1 vc4
mdio_bcm_unimac 20480 0
v3d 73728 0
rfkill 32768 3 bluetooth,cfg80211
of_mdio 20480 3 mdio_bcm_unimac,genet
gpu_sched 36864 1 v3d
udc_core 53248 1 dwc2
fixed_phy 16384 2 genet,of_mdio
iproc_rng200 16384 0
fwnode_mdio 20480 1 of_mdio
ecc 32768 1 ecdh_generic
roles 16384 1 dwc2
bcm2835_wdt 20480 0
bcm2711_thermal 16384 0
i2c_bcm2835 20480 0
drm_kms_helper 139264 4 drm_cma_helper,vc4,drm_display_helper
vchiq 331776 2 snd_bcm2835,bcm2835_mmal_vchiq
rng_core 24576 2 iproc_rng200
libphy 98304 7 mdio_bcm_unimac,genet,fwnode_mdio,of_mdio,broadcom,fixed_phy,bcm_phy_lib
drm_shmem_helper 24576 1 v3d
sdhci_iproc 20480 0
sdhci_pltfm 16384 1 sdhci_iproc
sdhci 69632 2 sdhci_pltfm,sdhci_iproc
leds_gpio 16384 0
sg 40960 0
drm 442368 8 drm_cma_helper,gpu_sched,drm_kms_helper,v3d,vc4,drm_shmem_helper,drm_display_helper
fuse 135168 1
efi_pstore 16384 0
configfs 49152 1
ip_tables 32768 0
x_tables 36864 3 nft_compat,ip_tables,ip6t_REJECT
autofs4 49152 2
ext4 778240 1
crc16 16384 2 bluetooth,ext4
mbcache 24576 1 ext4
jbd2 143360 1 ext4
crc32c_generic 16384 3
sd_mod 57344 2
t10_pi 16384 1 sd_mod
crc64_rocksoft 20480 1 t10_pi
crc64 20480 1 crc64_rocksoft
crc_t10dif 20480 1 t10_pi
crct10dif_generic 16384 1
uas 28672 2
usb_storage 73728 1 uas
scsi_mod 229376 4 sd_mod,usb_storage,uas,sg
scsi_common 16384 4 scsi_mod,usb_storage,uas,sg
xhci_pci 24576 0
xhci_hcd 253952 1 xhci_pci
crct10dif_ce 20480 0
crct10dif_common 16384 3 crct10dif_ce,crct10dif_generic,crc_t10dif
reset_raspberrypi 16384 1
usbcore 270336 6 xhci_hcd,dwc2,usb_storage,brcmfmac,xhci_pci,uas
pwm_bcm2835 16384 0
usb_common 16384 4 xhci_hcd,dwc2,usbcore,udc_core
fixed 20480 1
gpio_regulator 16384 1
phy_generic 20480 1
-- /etc/initramfs-tools/modules
reset_raspberrypi
-- /etc/initramfs-tools/initramfs.conf
MODULES=most
BUSYBOX=auto
KEYMAP=n
COMPRESS=zstd
DEVICE=
NFSROOT=auto
RUNSIZE=10%
FSTYPE=auto
-- /etc/initramfs-tools/update-initramfs.conf
update_initramfs=yes
backup_initramfs=no
-- /sys/block
sda
-- mkinitramfs hooks
/etc/initramfs-tools/hooks/:
/usr/share/initramfs-tools/hooks:
dmsetup
fsck
keymap
klibc-utils
kmod
raspi-firmware-fsck
resume
thermal
udev
zz-busybox
-- System Information:
Debian Release: bookworm/sid
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'testing'), (500, 'stable')
Architecture: arm64 (aarch64)
Kernel: Linux 6.0.0-6-arm64 (SMP w/4 CPU threads)
Kernel taint flags: TAINT_CRAP
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages initramfs-tools depends on:
ii initramfs-tools-core 0.142
ii linux-base 4.9
initramfs-tools recommends no packages.
Versions of packages initramfs-tools suggests:
pn bash-completion <none>
-- no debconf information