How To Install grub-firmware-qemu on Ubuntu 20.04

In this tutorial we learn how to install grub-firmware-qemu on Ubuntu 20.04. grub-firmware-qemu is GRUB firmware image for QEMU GRUB firmware image for QEMU

Introduction

In this tutorial we learn how to install grub-firmware-qemu on Ubuntu 20.04.

What is grub-firmware-qemu

grub-firmware-qemu is:

This package contains a binary of GRUB that has been built for use as firmware for QEMU. It can be used as a replacement for other PC BIOS images provided by seabios, bochsbios, and so on.

In order to make QEMU use this firmware, simply add `-bios grub.bin’ when invoking it.

This package behaves in the same way as GRUB for coreboot, but doesn’t contain any code from coreboot itself, and is only suitable for QEMU. If you want to install GRUB as firmware on real hardware, you need to use the grub-coreboot package, and manually combine that with coreboot.

Package: grub-firmware-qemu Architecture: amd64 Version: 2.04-1ubuntu26 Multi-Arch: foreign Priority: extra Section: universe/admin Source: grub2 Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: GRUB Maintainers [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 1913 Recommends: qemu Enhances: qemu Filename: pool/universe/g/grub2/grub-firmware-qemu_2.04-1ubuntu26_amd64.deb Size: 598860 MD5sum: 32623bbd97de4c83a591a464ab7e21c1 SHA1: 912d740329a56fb0ee74d135c88625548a133ebf SHA256: 9e808e03424a2bf57dba57d9e1f30343ff5b3a1a0a49ddca26a631c878d9f553 Homepage: https://www.gnu.org/software/grub/ Description-en: GRUB firmware image for QEMU This package contains a binary of GRUB that has been built for use as firmware for QEMU. It can be used as a replacement for other PC BIOS images provided by seabios, bochsbios, and so on.

In order to make QEMU use this firmware, simply add `-bios grub.bin’ when invoking it.

This package behaves in the same way as GRUB for coreboot, but doesn’t contain any code from coreboot itself, and is only suitable for QEMU. If you want to install GRUB as firmware on real hardware, you need to use the grub-coreboot package, and manually combine that with coreboot.

There are three methods to install grub-firmware-qemu 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 grub-firmware-qemu Using apt-get

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

sudo apt-get update

After updating apt database, We can install grub-firmware-qemu using apt-get by running the following command:

sudo apt-get -y install grub-firmware-qemu

Install grub-firmware-qemu Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install grub-firmware-qemu using apt by running the following command:

sudo apt -y install grub-firmware-qemu

Install grub-firmware-qemu 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 grub-firmware-qemu using aptitude by running the following command:

sudo aptitude -y install grub-firmware-qemu

How To Uninstall grub-firmware-qemu on Ubuntu 20.04

To uninstall only the grub-firmware-qemu package we can use the following command:

sudo apt-get remove grub-firmware-qemu

Uninstall grub-firmware-qemu And Its Dependencies

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

sudo apt-get -y autoremove grub-firmware-qemu

Remove grub-firmware-qemu Configurations and Data

To remove grub-firmware-qemu configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge grub-firmware-qemu

Remove grub-firmware-qemu configuration, data, and all of its dependencies

We can use the following command to remove grub-firmware-qemu configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge grub-firmware-qemu

References

Summary

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