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

Dave Jones 2140442 at bugs.launchpad.net
Fri Feb 6 10:47:56 UTC 2026


Excellent, glad to hear it's booted successfully. I'm going to rename
this bug to something to ensure a slightly saner fallback in the case
cmdline.txt doesn't exist.

** Summary changed:

- cp: cannot stat '/boot/firmware/current/cmdline.txt': No such file or directory
+ Use /proc/cmdline if current/cmdline.txt does not exist

** Description changed:

+ In the case that /cmdline.txt does not exist during migration, or in the
+ case that /current/cmdline.txt does not exist during a regular flash-
+ kernel run, construct one from the content of /proc/cmdline.
+ 
+ Some filtering will be necessary -- not sure yet whether exclusion of
+ things known to be generated by the bootloader, or filtering to include
+ only those things we typically include is a better idea...
+ 
+ The exclusion idea probably won't keep up with future changes to the
+ bootloader, but this is an emergency fallback and it may not matter that
+ much if it's "good enough". The filtering idea has to incorporate
+ everything that's critical for boot -- easy enough for local SD / SSD /
+ NVMe, but what about netboot? (nfsroot, nbdroot, etc. etc.)
+ 
+ I'm favouring filtering, but need to do some more research on everything
+ critical in netboot.
+ 
+ [ Original 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
+   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
+   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
+  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
+  installed initramfs-tools package post-installation script subprocess returned error exit status 1
  Errors were encountered while processing:
-  flash-kernel
-  initramfs-tools
+  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:
+ 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>
+  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)

** Changed in: flash-kernel (Ubuntu)
    Milestone: None => ubuntu-26.04

** Changed in: flash-kernel (Ubuntu)
     Assignee: (unassigned) => Dave Jones (waveform)

** Changed in: flash-kernel (Ubuntu)
       Status: New => Triaged

** Changed in: flash-kernel (Ubuntu)
   Importance: Undecided => High

-- 
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:
  Use /proc/cmdline if current/cmdline.txt does not exist

Status in flash-kernel package in Ubuntu:
  Triaged

Bug description:
  In the case that /cmdline.txt does not exist during migration, or in
  the case that /current/cmdline.txt does not exist during a regular
  flash-kernel run, construct one from the content of /proc/cmdline.

  Some filtering will be necessary -- not sure yet whether exclusion of
  things known to be generated by the bootloader, or filtering to
  include only those things we typically include is a better idea...

  The exclusion idea probably won't keep up with future changes to the
  bootloader, but this is an emergency fallback and it may not matter
  that much if it's "good enough". The filtering idea has to incorporate
  everything that's critical for boot -- easy enough for local SD / SSD
  / NVMe, but what about netboot? (nfsroot, nbdroot, etc. etc.)

  I'm favouring filtering, but need to do some more research on
  everything critical in netboot.

  [ Original 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