Skip to content

Commit e6ea299

Browse files
committed
New guide: Regenerate initramfs
Also add `kernel` section.
1 parent 17db25e commit e6ea299

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

docs/guides/.pages

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ nav:
2121
- File Sharing Services: file_sharing
2222
- Hardware: hardware
2323
- Interoperability: interoperability
24+
- Kernel: kernel
2425
- Mirror Management: mirror_management
2526
- Network: network
2627
- Package Management: package_management
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
title: Regenerate initramfs
3+
author: Neel Chauhan
4+
contributors:
5+
tested_with: 9.4
6+
tags:
7+
- hardware
8+
---
9+
10+
# Regenerate initramfs
11+
12+
## Introduction
13+
14+
An `initramfs` is the root filesystem inside a Linux kernel to help boot the system. It contains the core modules needed to boot Linux.
15+
16+
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/).
17+
18+
## Requirements
19+
20+
The following are the minimum requirements for using this procedure:
21+
22+
* A Rocky Linux system or virtual machine (not a container)
23+
24+
* Changes to the kernel, such as blacklisting or adding a module
25+
26+
## Regenerating the `initramfs`
27+
28+
To regenerate the `initramfs` you should first back up the existing `initramfs`:
29+
30+
```bash
31+
cp /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-$(date +%m-%d-%H%M%S).img
32+
```
33+
34+
Next, run `dracut` to regenerate the `initramfs`:
35+
36+
```bash
37+
dracut -f /boot/initramfs-$(uname -r).img $(uname -r)
38+
```
39+
40+
Subsequently, reboot:
41+
42+
```bash
43+
reboot
44+
```
45+
46+
## Conclusion
47+
48+
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!

0 commit comments

Comments
 (0)