-
Notifications
You must be signed in to change notification settings - Fork 315
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New guide: Regenerate initramfs (#2478)
Also add `kernel` section.
- Loading branch information
1 parent
895ce4b
commit 27c3c3d
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
title: Regenerate initramfs | ||
author: Neel Chauhan | ||
contributors: | ||
tested_with: 9.4 | ||
tags: | ||
- hardware | ||
--- | ||
|
||
# Regenerate initramfs | ||
|
||
## Introduction | ||
|
||
An `initramfs` is the root filesystem inside a Linux kernel to help boot the system. It contains the core modules needed to boot Linux. | ||
|
||
Sometimes, an Linux administrator might want to regenerate the `initramfs`, say if they want to blacklist a driver or include a out-of-band module. For instance, the author did this to [enable Intel vPro on a Minisforum MS-01](https://spaceterran.com/posts/step-by-step-guide-enabling-intel-vpro-on-your-minisforum-ms-01-bios/). | ||
|
||
## Requirements | ||
|
||
The following are the minimum requirements for using this procedure: | ||
|
||
* A Rocky Linux system or virtual machine (not a container) | ||
|
||
* Changes to the kernel setup, such as blacklisting or adding a module | ||
|
||
## Regenerating the `initramfs` | ||
|
||
To regenerate the `initramfs` you should first back up the existing `initramfs`: | ||
|
||
```bash | ||
cp /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-$(date +%m-%d-%H%M%S).img | ||
``` | ||
|
||
Next, run `dracut` to regenerate the `initramfs`: | ||
|
||
```bash | ||
dracut -f /boot/initramfs-$(uname -r).img $(uname -r) | ||
``` | ||
|
||
Subsequently, reboot: | ||
|
||
```bash | ||
reboot | ||
``` | ||
|
||
## Conclusion | ||
|
||
The Linux kernel is extremely powerful and modular. It makes sense that some users may want to allow or disallow certain modules, and regenerating the `initramfs` allows for this to happen. So cheers, you regenerated yours! |