update-initramfs command not found

19,909

Solution 1

Found update-initramfs in sbin. I do not understand why it is not in my root PATH. However,

# sudo update-initramfs -u
update-initramfs: Generating /boot/initrd.img-4.19.0-5-amd64

did the job.

Solution 2

Had the same error when using su command to enter root

Solved by adding /sbin to PATH once entered root on terminal:

# su
# export PATH=/sbin:$PATH
Share:
19,909

Related videos on Youtube

Stefan Bollmann
Author by

Stefan Bollmann

Updated on September 18, 2022

Comments

  • Stefan Bollmann
    Stefan Bollmann over 1 year

    How can I update initramfs somewhat how it is described elsewhere for adding firmware?

    For a Debian 10 I get a command not found error. initramfs-tools is installed.

    root@pc:/home/.../linux-firmware/i915# update-initramfs -u
    bash: update-initramfs: command not found
    root@pc:/home/.../linux-firmware/i915# apt install initramfs-tools
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    initramfs-tools is already the newest version (0.133).
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    

    Ok, googled again and found package live-tools with live-update-initramfs. However, now other failure.

    root@pc:/home/stefan/Downloads/intel-firmware/linux-firmware/i915# apt install live-tools
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Suggested packages:
      debian-installer-launcher rsync uuid-runtime
    The following NEW packages will be installed:
      live-tools
    0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
    Need to get 31.1 kB of archives.
    After this operation, 109 kB of additional disk space will be used.
    Get:1 http://deb.debian.org/debian buster/main amd64 live-tools all 1:20171207 [31.1 kB]
    Fetched 31.1 kB in 0s (91.4 kB/s)   
    Selecting previously unselected package live-tools.
    (Reading database ... 160376 files and directories currently installed.)
    Preparing to unpack .../live-tools_1%3a20171207_all.deb ...
    Unpacking live-tools (1:20171207) ...
    Setting up live-tools (1:20171207) ...
    Created symlink /etc/systemd/system/multi-user.target.wants/live-tools.service → /lib/systemd/system/live-tools.service.
    update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
    update-rc.d: warning: start runlevel arguments (none) do not match live-tools Default-Start values (S)
    Processing triggers for man-db (2.8.5-2) ...
    Processing triggers for systemd (241-5) ...
    root@pd:/home/stefan/Downloads/intel-firmware/linux-firmware/i915# live-update-initramfs -u
    update-initramfs: Generating /boot/initrd.img-4.19.0-5-amd64
    /usr/sbin/update-initramfs.orig.initramfs-tools: 157: /usr/sbin/update-initramfs.orig.initramfs-tools: mkinitramfs: not found
    update-initramfs: failed for /boot/initrd.img-4.19.0-5-amd64 with 127.
    
    • steve antwan
      steve antwan over 3 years
      It is intramfs-tools not initrafs-tools
    • Matthias
      Matthias over 2 years
      It's initramfs-tools
  • telcoM
    telcoM over 4 years
    If you were using su to become root, you might want to know that while Debian 9 had a su command from the shadow source package, Debian 10 uses a version of su from util-linux, which treats environment variables differently. See Debian bug #905409 for an extensive discussion.
  • Stefan Bollmann
    Stefan Bollmann about 4 years
    Why is this answer downvoted?