[Bug 2140442] Re: cp: cannot stat '/boot/firmware/current/cmdline.txt': No such file or directory

Dave Jones 2140442 at bugs.launchpad.net
Wed Feb 4 20:11:40 UTC 2026


Oh, that's ... not good (and quite bizarre). I wonder what happened to
cmdline.txt; my best guess off the top of my head is that you were
managing to boot without it (I forget exactly what initramfs does about
finding root in that case) but it's definitely a corner case that the
current migration doesn't handle.

For now I would recommend trying the following as root:

# cat << EOF > /boot/firmware/current/cmdline.txt
console=serial0,115200 multipath=off dwc_otg.lpm_enable=0 console=tty1 root=LABEL=writable rootfstype=ext4 panic=10 rootwait fixrtc
EOF
# apt -f install

One note: the contents of cmdline.txt should be a single line only (in
case that wraps). That line is the default cmdline.txt which we ship in
the pi-gadget. With current/cmdline.txt present, flash-kernel *should*
be able to proceed; it copies the existing current/cmdline.txt to
new/cmdline.txt when it's copying new boot assets which is why it's
failing at the moment.

Note to self:
Should probably have a better fallback when current/cmdline.txt does not exist. Perhaps scraping /proc/cmdline for the current one? Although it'll need some sanitizing because the bootloader dumps a bunch of stuff in there; maybe just pick specific values (but what about netbooting which uses a whole variety of different values)? Or maybe exclude values we know are definitely auto-generated by the bootloader?

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to flash-kernel in Ubuntu.
https://bugs.launchpad.net/bugs/2140442

Title:
  cp: cannot stat '/boot/firmware/current/cmdline.txt': No such file or
  directory

Status in flash-kernel package in Ubuntu:
  New

Bug description:
  This interrupted a release upgrade from plucky to questing on my pi4.
  After dropping to a shell, "apt -f install" yields the same error, as
  does just calling "flash-kernel":

  root at pi4:~# apt -f install
  The following packages were automatically installed and are no longer required:
    g++-14                     libboost-iostreams1.83.0        libclang-cpp18          libllvm19            libxml2                          linux-raspi-tools-6.14.0-1018
    g++-14-aarch64-linux-gnu   libboost-locale1.83.0           libclang1-19            libreiserfscore0t64  linux-headers-6.14.0-1018-raspi  linux-tools-6.14.0-1018-raspi
    gir1.2-nautilus-4.0        libboost-program-options1.83.0  libfuse3-3              libsframe1           linux-image-6.14.0-1018-raspi    python3-packaging-whl
    libboost-context1.83.0     libboost-thread1.83.0           libgnutls-openssl27t64  libsigsegv2          linux-modules-6.14.0-1018-raspi  python3-wheel-whl
    libboost-filesystem1.83.0  libboost-url1.83.0              libllvm18               libstdc++-14-dev     linux-raspi-headers-6.14.0-1018
  Use 'apt autoremove' to remove them.

  Summary:
    Upgrading: 0, Installing: 0, Removing: 0, Not Upgrading: 0
    1 not fully installed or removed.
    Space needed: 0 B / 47.6 GB available

  Setting up initramfs-tools (0.150ubuntu3.1) ...
  update-initramfs: deferring update (trigger activated)
  Processing triggers for flash-kernel (3.109ubuntu6.2) ...
  Using DTB: bcm2711-rpi-4-b.dtb
  Installing /lib/firmware/6.17.0-1007-raspi/device-tree/broadcom/bcm2711-rpi-4-b.dtb into /boot/dtbs/6.17.0-1007-raspi/./bcm2711-rpi-4-b.dtb
  Taking backup of bcm2711-rpi-4-b.dtb.
  Installing new bcm2711-rpi-4-b.dtb.
  flash-kernel: installing version 6.17.0-1007-raspi
  Copying kernel assets to /boot/firmware/new/
  cp: cannot stat '/boot/firmware/current/cmdline.txt': No such file or directory
  dpkg: error processing package flash-kernel (--configure):
   installed flash-kernel package post-installation script subprocess returned error exit status 1
  Processing triggers for initramfs-tools (0.150ubuntu3.1) ...
  update-initramfs: Generating /boot/initrd.img-6.17.0-1007-raspi
  Using DTB: bcm2711-rpi-4-b.dtb
  Installing /lib/firmware/6.17.0-1007-raspi/device-tree/broadcom/bcm2711-rpi-4-b.dtb into /boot/dtbs/6.17.0-1007-raspi/./bcm2711-rpi-4-b.dtb
  Taking backup of bcm2711-rpi-4-b.dtb.
  Installing new bcm2711-rpi-4-b.dtb.
  flash-kernel: installing version 6.17.0-1007-raspi
  Copying kernel assets to /boot/firmware/new/
  cp: cannot stat '/boot/firmware/current/cmdline.txt': No such file or directory
  run-parts: /etc/initramfs/post-update.d//flash-kernel exited with return code 1
  dpkg: error processing package initramfs-tools (--configure):
   installed initramfs-tools package post-installation script subprocess returned error exit status 1
  Errors were encountered while processing:
   flash-kernel
   initramfs-tools
  Error: Sub-process /usr/bin/dpkg returned an error code (1)

  
  If this matters, here is /boot/firmware/current and a find showing that no cmdline.txt file exists anywhere under /boot:

  root at pi4:~# find /boot -name cmdline.txt

  root at pi4:~# l /boot/firmware/current/
  total 98M
  drwxr-xr-x 3 root root 4.5K Feb  4 17:19 .
  drwxr-xr-x 4 root root  11K Jan  1  1970 ..
  -rwxr-xr-x 1 root root  32K Feb  4 17:18 bcm2710-rpi-2-b.dtb
  -rwxr-xr-x 1 root root  35K Feb  4 17:18 bcm2710-rpi-3-b-plus.dtb
  -rwxr-xr-x 1 root root  35K Feb  4 17:18 bcm2710-rpi-3-b.dtb
  -rwxr-xr-x 1 root root  32K Feb  4 17:18 bcm2710-rpi-cm3.dtb
  -rwxr-xr-x 1 root root  34K Feb  4 17:18 bcm2710-rpi-zero-2-w.dtb
  -rwxr-xr-x 1 root root  34K Feb  4 17:18 bcm2710-rpi-zero-2.dtb
  -rwxr-xr-x 1 root root  55K Feb  4 17:18 bcm2711-rpi-4-b.dtb
  -rwxr-xr-x 1 root root  55K Feb  4 17:18 bcm2711-rpi-400.dtb
  -rwxr-xr-x 1 root root  38K Feb  4 17:18 bcm2711-rpi-cm4-io.dtb
  -rwxr-xr-x 1 root root  56K Feb  4 17:18 bcm2711-rpi-cm4.dtb
  -rwxr-xr-x 1 root root  53K Feb  4 17:18 bcm2711-rpi-cm4s.dtb
  -rwxr-xr-x 1 root root  77K Feb  4 17:18 bcm2712-d-rpi-5-b.dtb
  -rwxr-xr-x 1 root root  77K Feb  4 17:18 bcm2712-rpi-5-b.dtb
  -rwxr-xr-x 1 root root  77K Feb  4 17:18 bcm2712-rpi-500.dtb
  -rwxr-xr-x 1 root root  77K Feb  4 17:18 bcm2712-rpi-cm5-cm4io.dtb
  -rwxr-xr-x 1 root root  78K Feb  4 17:18 bcm2712-rpi-cm5-cm5io.dtb
  -rwxr-xr-x 1 root root  77K Feb  4 17:18 bcm2712-rpi-cm5l-cm4io.dtb
  -rwxr-xr-x 1 root root  78K Feb  4 17:18 bcm2712-rpi-cm5l-cm5io.dtb
  -rwxr-xr-x 1 root root  77K Feb  4 17:18 bcm2712d0-rpi-5-b.dtb
  -rwxr-xr-x 1 root root  21K Feb  4 17:18 bcm2837-rpi-3-a-plus.dtb
  -rwxr-xr-x 1 root root  21K Feb  4 17:18 bcm2837-rpi-3-b-plus.dtb
  -rwxr-xr-x 1 root root  21K Feb  4 17:18 bcm2837-rpi-3-b.dtb
  -rwxr-xr-x 1 root root  20K Feb  4 17:18 bcm2837-rpi-cm3-io3.dtb
  -rwxr-xr-x 1 root root  21K Feb  4 17:18 bcm2837-rpi-zero-2-w.dtb
  -rwxr-xr-x 1 root root 4.2K Feb  4 17:18 blaize-blzp1600-cb2.dtb
  -rwxr-xr-x 1 root root  52K Feb  4 17:18 bootcode.bin
  -rwxr-xr-x 1 root root 2.7K Feb  4 17:18 en7581-evb.dtb
  -rwxr-xr-x 1 root root 7.2K Feb  4 17:18 fixup.dat
  -rwxr-xr-x 1 root root 5.4K Feb  4 17:18 fixup4.dat
  -rwxr-xr-x 1 root root 3.2K Feb  4 17:18 fixup4cd.dat
  -rwxr-xr-x 1 root root 8.3K Feb  4 17:18 fixup4db.dat
  -rwxr-xr-x 1 root root 8.3K Feb  4 17:18 fixup4x.dat
  -rwxr-xr-x 1 root root 3.2K Feb  4 17:18 fixup_cd.dat
  -rwxr-xr-x 1 root root  11K Feb  4 17:18 fixup_db.dat
  -rwxr-xr-x 1 root root  11K Feb  4 17:18 fixup_x.dat
  -rwxr-xr-x 1 root root 2.3K Feb  4 17:18 hat_map.dtb
  -rwxr-xr-x 1 root root  63M Feb  4 17:18 initrd.img
  -rwxr-xr-x 1 root root 1.5K Feb  4 17:18 overlay_map.dtb
  drwxr-xr-x 2 root root  31K Feb  4 17:19 overlays
  -rwxr-xr-x 1 root root 2.9M Feb  4 17:18 start.elf
  -rwxr-xr-x 1 root root 2.2M Feb  4 17:18 start4.elf
  -rwxr-xr-x 1 root root 790K Feb  4 17:18 start4cd.elf
  -rwxr-xr-x 1 root root 3.6M Feb  4 17:18 start4db.elf
  -rwxr-xr-x 1 root root 2.9M Feb  4 17:18 start4x.elf
  -rwxr-xr-x 1 root root 790K Feb  4 17:18 start_cd.elf
  -rwxr-xr-x 1 root root 4.7M Feb  4 17:18 start_db.elf
  -rwxr-xr-x 1 root root 3.6M Feb  4 17:18 start_x.elf
  -rwxr-xr-x 1 root root    5 Feb  4 17:19 state
  -rwxr-xr-x 1 root root  13M Feb  4 17:18 vmlinuz

  ProblemType: Bug
  DistroRelease: Ubuntu 25.10
  Package: flash-kernel 3.109ubuntu6.2
  ProcVersionSignature: Ubuntu 6.14.0-1019.19-raspi 6.14.11
  Uname: Linux 6.14.0-1019-raspi aarch64
  NonfreeKernelModules: zfs
  ApportVersion: 2.33.1-0ubuntu3
  Architecture: arm64
  CasperMD5CheckResult: unknown
  CloudBuildName: server
  CloudSerial:
   
  Date: Wed Feb  4 18:58:32 2026
  ProcEnviron:
   LANG=C.UTF-8
   PATH=(custom, no user)
   SHELL=/bin/bash
   TERM=screen-256color
   XDG_RUNTIME_DIR=<set>
  RebootRequiredPkgs: Error: path contained symlinks.
  SourcePackage: flash-kernel
  UpgradeStatus: Upgraded to questing on 2026-02-04 (0 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/flash-kernel/+bug/2140442/+subscriptions




More information about the foundations-bugs mailing list