#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-07-12 17:51:01 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-

#1082657#59
Date:
2026-07-12 17:49:54 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
mdadm, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1082657@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Daniel Baumann <daniel@debian.org> (supplier of updated mdadm package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sun, 12 Jul 2026 19:29:50 +0200
Source: mdadm
Architecture: source
Version: 4.6-3
Distribution: sid
Urgency: medium
Maintainer: Daniel Baumann <daniel@debian.org>
Changed-By: Daniel Baumann <daniel@debian.org>
Closes: 1082657
Changes:
 mdadm (4.6-3) sid; urgency=medium
 .
   * Updating to debhelper 14.
   * Including rm from coreutils explicitly for systems without busybox
     (Closes: #1082657).
Checksums-Sha1:
 dff0f9a863df7889a2014253ed731e81a32c65d1 1352 mdadm_4.6-3.dsc
 2050f415bbc0146c6ecf94a8d15f46d938dcee6c 89612 mdadm_4.6-3.debian.tar.xz
 ab85007a435ae0d9c02c754f33d3d40673719432 5610 mdadm_4.6-3_amd64.buildinfo
Checksums-Sha256:
 7b75c97a9dc7e3bd154f97c4c506ad8f210b1e2fe005adc6bdc649d22217752d 1352 mdadm_4.6-3.dsc
 53e97c32a6ce33be6d0e4884589dd6a19f57ee4ff54812096b00d9bf7361c176 89612 mdadm_4.6-3.debian.tar.xz
 1e18a58e62c31ab7806bff983e801226f4ea19287eca5865f5c396038983edf2 5610 mdadm_4.6-3_amd64.buildinfo
Files:
 eac4bf19ec3b86d5e64831486314020c 1352 admin optional mdadm_4.6-3.dsc
 e220dcdc05acb4d443f776e8eb2edb42 89612 admin optional mdadm_4.6-3.debian.tar.xz
 4b7ec7539815b202ef5072ba972c25c3 5610 admin optional mdadm_4.6-3_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQQmmGg4gLaoSj0ERgL7tPDoCoAiLwUCalPPSQAKCRD7tPDoCoAi
LxgWAQDwsloKmL6cTbbtYr87Wxd6P7r/pyRx0FCXy6cIb9BjngD8DrkZZcKfop/I
Wf2LaQHnQc2sIG+VDMZVRL4bElY80wU=
=bkYM
-----END PGP SIGNATURE-----