#1082657 /scripts/local-bottom/mdadm: 2: /scripts/local-bottom/mdadm: rm: not found

Package:
mdadm
Source:
mdadm
Description:
Tool to administer Linux MD arrays (software RAID)
Submitter:
Allan Wind
Date:
2026-06-16 09:03:02 UTC
Severity:
normal
#1082657#5
Date:
2024-09-24 07:57:06 UTC
From:
To:
Dear Maintainer,

I noticed this error message after upgrading to bookworm a while
ago. It doesn't have to have any ill-effect.  The full message
from boot.log.1 is:

Begin: Running /scripts/local-bottom ... /scripts/local-bottom/mdadm: 2: /scripts/local-bottom/mdadm: rm: not found
done.

and the file in question appears to be installed by mdadm to
/usr/share/initramfs-tools/scripts/local-bottom/mdadm:

#!/bin/sh
rm -f /run/count.mdadm.initrd
exit 0

On my system /bin/sh is symlinked to /bin/dash so dash
cannot find the `rm` command.  /bin is symblinked to usr/bin/
which has the `rm` binary.

This appears to be a regression of #875918 that was fixed in 4.1-9
while I am running 4.2-5.


/Allan
--- /etc/default/mdadm
AUTOCHECK=true
AUTOSCAN=true
START_DAEMON=true
DAEMON_OPTIONS="--syslog"
VERBOSE=false
--- /proc/partitions: major minor #blocks name 259 0 3907018584 nvme0n1 259 1 524288 nvme0n1p1 259 2 3906493255 nvme0n1p2
--- LVM physical volumes: LVM does not seem to be used. --- mount output sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime) proc on /proc type proc (rw,nosuid,nodev,noexec,relatime) udev on /dev type devtmpfs (rw,nosuid,relatime,size=32780212k,nr_inodes=8195053,mode=755,inode64) devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000) tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=6562796k,mode=755,inode64) /dev/nvme0n1p2 on / type ext4 (rw,noatime,errors=remount-ro) securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64) tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k,inode64) cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot) pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime) efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime) bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700) systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=29,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=15153) hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M) mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime) debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime) tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime) configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime) fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime) ramfs on /run/credentials/systemd-sysusers.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700) ramfs on /run/credentials/systemd-tmpfiles-setup-dev.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700) /dev/nvme0n1p1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro) ramfs on /run/credentials/systemd-tmpfiles-setup.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700) binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime) ramfs on /run/credentials/systemd-sysctl.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700) tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=6562792k,nr_inodes=1640698,mode=700,uid=1000,gid=100,inode64) pawan:/var/lib/media on /home/allan/media type fuse.sshfs (rw,nosuid,nodev,relatime,user_id=1000,group_id=100) tracefs on /sys/kernel/debug/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
--- initrd.img-6.1.0-25-amd64: gzip: /boot/initrd.img-6.1.0-25-amd64: not in gzip format cpio: premature end of archive
--- initrd's /conf/conf.d/md: no conf/md file.
--- /proc/modules: dm_mod 184320 0 - Live 0xffffffffc0b8f000 raid10 65536 0 - Live 0xffffffffc08a2000 raid456 180224 0 - Live 0xffffffffc09d6000 async_raid6_recov 24576 1 raid456, Live 0xffffffffc083b000 async_memcpy 20480 2 raid456,async_raid6_recov, Live 0xffffffffc07de000 async_pq 20480 2 raid456,async_raid6_recov, Live 0xffffffffc07d8000 async_xor 20480 3 raid456,async_raid6_recov,async_pq, Live 0xffffffffc0783000 async_tx 20480 5 raid456,async_raid6_recov,async_memcpy,async_pq,async_xor, Live 0xffffffffc077d000 raid6_pq 122880 3 raid456,async_raid6_recov,async_pq, Live 0xffffffffc09b7000 libcrc32c 16384 1 raid456, Live 0xffffffffc0736000 raid1 53248 0 - Live 0xffffffffc0728000 raid0 24576 0 - Live 0xffffffffc064f000 multipath 20480 0 - Live 0xffffffffc0643000 linear 20480 0 - Live 0xffffffffc05ec000 md_mod 192512 6 raid10,raid456,raid1,raid0,multipath,linear, Live 0xffffffffc0987000
--- volume detail: /dev/sda is not recognised by mdadm. /dev/sdb is not recognised by mdadm. /dev/sdc is not recognised by mdadm. /dev/sdd is not recognised by mdadm.
--- /proc/cmdline BOOT_IMAGE=/boot/vmlinuz-6.1.0-25-amd64 root=UUID=4281ffd0-af9c-41f6-8354-7a8387da04c9 ro nosplash quiet transparent_hugepage=madvise
--- grub2: linux /boot/vmlinuz-6.1.0-25-amd64 root=UUID=4281ffd0-af9c-41f6-8354-7a8387da04c9 ro nosplash quiet transparent_hugepage=madvise linux /boot/vmlinuz-6.1.0-25-amd64 root=UUID=4281ffd0-af9c-41f6-8354-7a8387da04c9 ro nosplash quiet transparent_hugepage=madvise linux /boot/vmlinuz-6.1.0-25-amd64 root=UUID=4281ffd0-af9c-41f6-8354-7a8387da04c9 ro single
--- udev: ii udev 252.30-1~deb12u2 amd64 /dev/ and hotplug management daemon 9d7dfcdc58fa54941f8d28f6094a7a5b /lib/udev/rules.d/01-md-raid-creating.rules d767cffc82663d79b515f66ee8557fb4 /lib/udev/rules.d/63-md-raid-arrays.rules b733421b507e8c6c87963f4bfb572ca5 /lib/udev/rules.d/64-md-raid-assembly.rules ba1d376ca9b7364576f950d06ba18207 /lib/udev/rules.d/69-md-clustered-confirm-device.rules 66395d55d648c302185206ca05df2691 /lib/udev/rules.d/99-systemd.rules
--- /dev: /dev/disk/by-diskseq: total 0 lrwxrwxrwx 1 root root 13 Aug 31 23:36 1 -> ../../nvme0n1 lrwxrwxrwx 1 root root 9 Aug 31 23:36 14 -> ../../sdb lrwxrwxrwx 1 root root 9 Aug 31 23:36 15 -> ../../sdd lrwxrwxrwx 1 root root 9 Aug 31 23:36 16 -> ../../sda lrwxrwxrwx 1 root root 9 Aug 31 23:36 17 -> ../../sdc lrwxrwxrwx 1 root root 11 Aug 31 23:36 2 -> ../../loop0 lrwxrwxrwx 1 root root 11 Aug 31 23:36 3 -> ../../loop1 lrwxrwxrwx 1 root root 11 Aug 31 23:36 4 -> ../../loop2 lrwxrwxrwx 1 root root 11 Aug 31 23:36 5 -> ../../loop3 lrwxrwxrwx 1 root root 11 Aug 31 23:36 6 -> ../../loop4 lrwxrwxrwx 1 root root 11 Aug 31 23:36 7 -> ../../loop5 lrwxrwxrwx 1 root root 11 Aug 31 23:36 8 -> ../../loop6 lrwxrwxrwx 1 root root 11 Aug 31 23:36 9 -> ../../loop7 /dev/disk/by-id: total 0 lrwxrwxrwx 1 root root 13 Aug 31 23:36 nvme-Samsung_SSD_990_PRO_4TB_S7KGNJ0WB00003T -> ../../nvme0n1 lrwxrwxrwx 1 root root 15 Aug 31 23:36 nvme-Samsung_SSD_990_PRO_4TB_S7KGNJ0WB00003T-part1 -> ../../nvme0n1p1 lrwxrwxrwx 1 root root 15 Aug 31 23:36 nvme-Samsung_SSD_990_PRO_4TB_S7KGNJ0WB00003T-part2 -> ../../nvme0n1p2 lrwxrwxrwx 1 root root 13 Aug 31 23:36 nvme-Samsung_SSD_990_PRO_4TB_S7KGNJ0WB00003T_1 -> ../../nvme0n1 lrwxrwxrwx 1 root root 15 Aug 31 23:36 nvme-Samsung_SSD_990_PRO_4TB_S7KGNJ0WB00003T_1-part1 -> ../../nvme0n1p1 lrwxrwxrwx 1 root root 15 Aug 31 23:36 nvme-Samsung_SSD_990_PRO_4TB_S7KGNJ0WB00003T_1-part2 -> ../../nvme0n1p2 lrwxrwxrwx 1 root root 13 Aug 31 23:36 nvme-eui.0025384b3140f952 -> ../../nvme0n1 lrwxrwxrwx 1 root root 15 Aug 31 23:36 nvme-eui.0025384b3140f952-part1 -> ../../nvme0n1p1 lrwxrwxrwx 1 root root 15 Aug 31 23:36 nvme-eui.0025384b3140f952-part2 -> ../../nvme0n1p2 lrwxrwxrwx 1 root root 9 Aug 31 23:36 usb-Kingston_Multi-Reader_-0_08738183000239-0:0 -> ../../sda lrwxrwxrwx 1 root root 9 Aug 31 23:36 usb-Kingston_Multi-Reader_-1_08738183000239-0:1 -> ../../sdd lrwxrwxrwx 1 root root 9 Aug 31 23:36 usb-Kingston_Multi-Reader_-2_08738183000239-0:2 -> ../../sdb lrwxrwxrwx 1 root root 9 Aug 31 23:36 usb-Kingston_Multi-Reader_-3_08738183000239-0:3 -> ../../sdc /dev/disk/by-partlabel: total 0 lrwxrwxrwx 1 root root 15 Aug 31 23:36 primary -> ../../nvme0n1p1 /dev/disk/by-partuuid: total 0 lrwxrwxrwx 1 root root 15 Aug 31 23:36 5eeed95e-8889-495f-8ac7-ea837b40de34 -> ../../nvme0n1p1 lrwxrwxrwx 1 root root 15 Aug 31 23:36 8e6bfec7-f95b-4cdc-bbad-7b602afcaf47 -> ../../nvme0n1p2 /dev/disk/by-path: total 0 lrwxrwxrwx 1 root root 9 Aug 31 23:36 pci-0000:00:14.0-usb-0:2.1:1.0-scsi-0:0:0:0 -> ../../sda lrwxrwxrwx 1 root root 9 Aug 31 23:36 pci-0000:00:14.0-usb-0:2.1:1.0-scsi-0:0:0:1 -> ../../sdd lrwxrwxrwx 1 root root 9 Aug 31 23:36 pci-0000:00:14.0-usb-0:2.1:1.0-scsi-0:0:0:2 -> ../../sdb lrwxrwxrwx 1 root root 9 Aug 31 23:36 pci-0000:00:14.0-usb-0:2.1:1.0-scsi-0:0:0:3 -> ../../sdc lrwxrwxrwx 1 root root 13 Aug 31 23:36 pci-0000:3e:00.0-nvme-1 -> ../../nvme0n1 lrwxrwxrwx 1 root root 15 Aug 31 23:36 pci-0000:3e:00.0-nvme-1-part1 -> ../../nvme0n1p1 lrwxrwxrwx 1 root root 15 Aug 31 23:36 pci-0000:3e:00.0-nvme-1-part2 -> ../../nvme0n1p2 /dev/disk/by-uuid: total 0 lrwxrwxrwx 1 root root 15 Aug 31 23:36 4281ffd0-af9c-41f6-8354-7a8387da04c9 -> ../../nvme0n1p2 lrwxrwxrwx 1 root root 15 Aug 31 23:36 F39E-26F8 -> ../../nvme0n1p1 Auto-generated on Tue, 24 Sep 2024 03:42:05 -0400 by mdadm bugscript
#1082657#10
Date:
2025-02-25 22:43:11 UTC
From:
To:
Control: severity -1 normal
Control: found -1 mdadm/4.4-5

This reproduces on fresh installs of trixie, the log message there
reads:

/scripts/local-bottom/mdadm: 2: /scripts/local-bottom/mdadm: rm: not found

It appears nothing ensures (/usr)/bin/rm is actually copied into the
initramfs.

Could this please be fixed in time for the release?

Thanks,
Chris

#1082657#19
Date:
2025-05-27 13:14:48 UTC
From:
To:
* Chris Hofstaedtler [Tue Feb 25, 2025 at 11:43:11PM +0100]:

This is still present in mdadm v4.4-11, any chance to see this fixed
for trixie?

regards
-mika-

#1082657#24
Date:
2025-05-27 13:48:00 UTC
From:
To:
[Resending to 1082657@bugs.debian.org instead of -quiet to ensure it
reaches the package maintainer :)]

* Chris Hofstaedtler [Tue Feb 25, 2025 at 11:43:11PM +0100]:

This is still present in mdadm v4.4-11, any chance to see this fixed
for trixie?

regards
-mika-

#1082657#29
Date:
2025-05-27 17:33:39 UTC
From:
To:
indeed, I haven't seen it :(

I'll have a look at it on Monday after the holidays and aim for an
unblock :)

Regards,
Daniel

#1082657#34
Date:
2025-07-22 14:18:10 UTC
From:
To:
Hi,

hmm.. I had a look at this several times, however, I coudn't find out
why 'rm' isn't working at that stage/place in initramfs, where it
clearly works before or afterwards for other packages.

I'll give it another go tomorrow.

Regards,
Daniel

#1082657#39
Date:
2025-07-22 15:12:09 UTC
From:
To:
I just had another look at this bug. It happens only on machines
which do not have "busybox" installed.

IIRC initramfs-tools can use various tools either from busybox or
from coreutils and klibc-utils. I *guess* if busybox is installed,
busybox and all links to it get installed unconditionally. This does
not happen if busybox is not installed.

Probably the easy way out is to unconditionally have the mdadm hook
script install /bin/rm into the initramfs.

Chris

#1082657#44
Date:
2025-09-06 15:51:58 UTC
From:
To:
[..]

Daniel, did you find some time for this?


Thanks,
Chris

#1082657#49
Date:
2025-10-06 09:58:17 UTC
From:
To:
* Chris Hofstaedtler [Sat Sep 06, 2025 at 05:51:58PM +0200]:

Friendly maintainer ping

regards
-mika-

#1082657#54
Date:
2026-06-16 08:53:48 UTC
From:
To:
hi,

* Michael Prokop [Mon Oct 06, 2025 at 11:58:17AM +0200]:

Ping? :)

regards
-mika-