How To Install initramfs-tools on Ubuntu 20.04

In this tutorial we learn how to install initramfs-tools on Ubuntu 20.04. initramfs-tools is generic modular initramfs generator (automation) generic modular initramfs generator (automation) generic modular initramfs generator (automation)

Introduction

In this tutorial we learn how to install initramfs-tools on Ubuntu 20.04.

What is initramfs-tools

initramfs-tools is:

This package builds a bootable initramfs for Linux kernel packages. The initramfs is loaded along with the kernel and is responsible for mounting the root filesystem and starting the main init system. Task: server, ubuntu-desktop-minimal, ubuntu-desktop, cloud-image, ubuntu-live, kubuntu-desktop, kubuntu-full, kubuntu-live, xubuntu-desktop, xubuntu-live, lubuntu-live, ubuntustudio-desktop-core, ubuntustudio-desktop, ubuntustudio-dvd-live, ubuntukylin-desktop, ubuntukylin-live, ubuntu-mate-core, ubuntu-mate-desktop, ubuntu-mate-live, ubuntu-budgie-desktop, ubuntu-budgie-live

Package: initramfs-tools Status: install ok installed Priority: optional Section: utils Installed-Size: 144 Maintainer: Ubuntu Developers [email protected] Architecture: all Multi-Arch: foreign Version: 0.136ubuntu6.3 Provides: linux-initramfs-tool Depends: initramfs-tools-core (= 0.136ubuntu6.3), linux-base Suggests: bash-completion Breaks: e2fsprogs (« 1.42.13), initscripts (« 2.88dsf-59.3~), netplan.io (« 0.37), upstart Conflicts: linux-initramfs-tool, usplash (« 0.5.50) Conffiles: /etc/initramfs-tools/update-initramfs.conf e2026d4603e7161efaccca519aeb1297 /etc/kernel/postinst.d/initramfs-tools 0d9cc4eb58a5e2726911ca55d7719635 /etc/kernel/postrm.d/initramfs-tools f414d7d4a1210624ff6ef6ed96ca7061 Description-en: generic modular initramfs generator (automation) This package builds a bootable initramfs for Linux kernel packages. The initramfs is loaded along with the kernel and is responsible for mounting the root filesystem and starting the main init system. Original-Maintainer: Debian kernel team [email protected]

Package: initramfs-tools Architecture: all Version: 0.136ubuntu6 Multi-Arch: foreign Priority: optional Section: utils Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Debian kernel team [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 143 Provides: linux-initramfs-tool Depends: initramfs-tools-core (= 0.136ubuntu6), linux-base Suggests: bash-completion Conflicts: linux-initramfs-tool, usplash (« 0.5.50) Breaks: e2fsprogs (« 1.42.13), initscripts (« 2.88dsf-59.3~), netplan.io (« 0.37), upstart Filename: pool/main/i/initramfs-tools/initramfs-tools_0.136ubuntu6_all.deb Size: 9212 MD5sum: 7551534f89eafbe4905562f4fb5a3d29 SHA1: d49dc6958304180288cdc18fd2ac2f182ac8f399 SHA256: 839a08bce533772b47c2a4a9ce1b9d7e761070a112513818ab15e6abc5c5fa3c Description-en: generic modular initramfs generator (automation) This package builds a bootable initramfs for Linux kernel packages. The initramfs is loaded along with the kernel and is responsible for mounting the root filesystem and starting the main init system. Task: server, ubuntu-desktop-minimal, ubuntu-desktop, cloud-image, ubuntu-live, kubuntu-desktop, kubuntu-full, kubuntu-live, xubuntu-desktop, xubuntu-live, lubuntu-live, ubuntustudio-desktop-core, ubuntustudio-desktop, ubuntustudio-dvd-live, ubuntukylin-desktop, ubuntukylin-live, ubuntu-mate-core, ubuntu-mate-desktop, ubuntu-mate-live, ubuntu-budgie-desktop, ubuntu-budgie-live

There are three methods to install initramfs-tools on Ubuntu 20.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install initramfs-tools Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install initramfs-tools using apt-get by running the following command:

sudo apt-get -y install initramfs-tools

Install initramfs-tools Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install initramfs-tools using apt by running the following command:

sudo apt -y install initramfs-tools

Install initramfs-tools Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install initramfs-tools using aptitude by running the following command:

sudo aptitude -y install initramfs-tools

How To Uninstall initramfs-tools on Ubuntu 20.04

To uninstall only the initramfs-tools package we can use the following command:

sudo apt-get remove initramfs-tools

Uninstall initramfs-tools And Its Dependencies

To uninstall initramfs-tools and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove initramfs-tools

Remove initramfs-tools Configurations and Data

To remove initramfs-tools configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge initramfs-tools

Remove initramfs-tools configuration, data, and all of its dependencies

We can use the following command to remove initramfs-tools configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge initramfs-tools

References

Summary

In this tutorial we learn how to install initramfs-tools package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.