Skip to main content

Questions tagged [initramfs]

The "initial RAM file system" is the successor of initrd. It is a root filesystem that is embedded into the kernel and loaded early in the boot process.

Filter by
Sorted by
Tagged with
113 votes
5 answers
224k views

Possible missing firmware /lib/firmware/i915/* for module i915

I am getting these warnings every time I update my initramfs image(-s) with update-initramfs on my Dell PowerEdge T20 server running GNU/Linux Debian Buster 10.0. Is there a fix? W: Possible missing ...
Vlastimil Burián's user avatar
36 votes
7 answers
83k views

Mount root filesystem from initramfs

It's a common scenario. For whatever reason, the initramfs (OpenSUSE, in case it matters) has failed to find the root filesystem, so it drops you into a rescue shell. I know perfectly well what device ...
MathematicalOrchid's user avatar
36 votes
2 answers
20k views

When would you use pivot_root over switch_root?

I'm wanting to understand the Linux init process better in order to netboot a system over ceph rather than nfs. In the process I've come across two forms of switching root. One called switch_root, ...
hookenz's user avatar
  • 1,287
29 votes
3 answers
295k views

How to fix boot into initramfs prompt and "mount: can't read '/etc/fstab': No such file or directory" and "No init found"?

Installing a new system using a GPT partitioned disk dedicated to a single partition, ext4 formatted, extlinux (version 4.05) as bootloader, Ubuntu Core version 13.10 amd64 as rootfs, and Ubuntu linux-...
Pro Backup's user avatar
  • 4,924
24 votes
7 answers
33k views

Why do I need initramfs?

I found out that if I choose jffs or sd as filesystem (and not initramfs), the kernel size will be very small (1.4 MB as compared to with initramfs which is 3.4MB). It means that initramfs takes ...
gpuguy's user avatar
  • 1,366
23 votes
3 answers
36k views

Does initramfs use /etc/fstab?

The way I understand it, initramfs is responsible for loading the "real" root filesystem. Now, there are two places where we define that root. First we put an entry in /etc/fstab. Second, we put the ...
Ahmed Ghonim's user avatar
21 votes
1 answer
41k views

What is the equivalent of mkinitcpio.conf on debian?

I want to review that the hooks used to build the initrd.img are correct in my debian but I fail to find the /etc/mkinitcpio.conf file like the one in Archlinux, what is the equivalent of this file in ...
ChiseledAbs's user avatar
  • 2,253
18 votes
3 answers
8k views

Why use cpio for initramfs?

I am making my own initramfs following the Gentoo wiki. Instead of the familiar tar and gzip, the page is telling me to use cpio and gzip. Wikipedia says that cpio is used by the 2.6 kernel's ...
phunehehe's user avatar
  • 20.3k
17 votes
3 answers
11k views

Is the entire kernel loaded into memory on boot?

I read through this popular IBM doc (I see it referred quite often on the web) explaining the function of the initial RAM disk. I hit a wall in conceptualizing how this works though. In the doc it ...
user1028270's user avatar
  • 1,044
16 votes
6 answers
27k views

Unlock LUKS encrypted Debian root with key file on boot partition

I'm trying to decrypt the Debian root with a key file stored in the boot partition (decrypted partition). This will break the security, but it doesn't matter now. I have to conclude this successfully ...
Fusgyus's user avatar
  • 161
14 votes
2 answers
59k views

Missing modules (cat /proc/modules; ls /dev) and UUID doesn't exist in BusyBox

I'm stuck in the boot and can't open any terminal. When I try to boot my laptop it shows the following error: Gave up waiting for root device. Common problems: -Boot args (cat /proc/cmdline) -Check ...
IAmBlake's user avatar
  • 243
14 votes
3 answers
13k views

extract Embedded initramfs

I have a kernel in which one initramfs is embedded. I want to extract it. I got the output x86 boot sector when I do file bzImage I have System.map file for this kernel image. Is there any way to ...
SHW's user avatar
  • 14.8k
14 votes
1 answer
12k views

How can I force a Ubuntu kernel to fail mounting / and drop into the initramfs rescue shell?

I am trying to customize the initramfs rescue environment and would like to force the kernel to fail mounting / and drop into the (initramfs) rescue shell, as opposed to single user mode. How can I ...
0xC0000022L's user avatar
  • 16.6k
14 votes
1 answer
21k views

"cryptsetup: ERROR: Couldn't resolve device" combined with "cryptsetup: WARNING: target 'sda3_crypt' not found in /etc/crypttab"

After setting up hibernation on ubuntu 20.04 and modifying it that it works for encrypted swap partitions, I'm getting several issues: First, after rebooting from hibernation, I got "Gave up ...
Andreas L.'s user avatar
13 votes
1 answer
70k views

How to assemble a specific RAID array without using /etc/mdadm.conf

Is it possible to assemble a specific RAID array using mdadm and its scan-functionality, but without the need for a configuration file? Background: I'm using a custom-made initramfs to setup my ...
maxxim's user avatar
  • 131
13 votes
3 answers
11k views

Why does initramfs mount the root filesystem read-only

What is the reason for the root filesystem being mounted ro in the initramfs (and in initrd). For example the Gentoo initramfs guide mounts the root filesystem with: mount -o ro /dev/sda1 /mnt/root ...
Portablejim's user avatar
11 votes
2 answers
9k views

Appending files to initramfs image - reliable?

I'm modifying a bunch of initramfs archives from different Linux distros in which normally only one file is being changed. I would like to automate the process without switching to root user to ...
Emilio Lazo's user avatar
11 votes
2 answers
4k views

Difference in execution of init with embedded vs. external initramfs?

I'm building a very minimal Linux system that just consists of the kernel (v4.1-rc5) and an initramfs populated with busybox (v1.23.2). It works fine for the most part, but I observe a difference in ...
clw's user avatar
  • 111
10 votes
2 answers
7k views

pivot_root from initramfs to new root - error "Invalid argument"

You can not use pivot_root on an initramfs rootfs, you will get Invalid Argument. You can only pivot real filesystems. Indeed: Fedora Linux 28 - this uses the dracut initramfs. Boot into an ...
sourcejedi's user avatar
  • 50.4k
10 votes
7 answers
10k views

Hibernation resume fail on linux kernel 4.9.0, Debian 9

I recently upgraded my kernel from 3.16.4 (Debian jessie) to 4.9.0 (Debian stretch). Everything was fine, until I tried to "Hibernate" (suspend to disk). When I use Hibernate option in LXDE, it ...
Enginecrafter77's user avatar
10 votes
2 answers
4k views

How is a Linux kernel capable of accessing its assigned initramfs/initrd?

I'm trying to understand the boot process of a machine as a whole from the time you hit the power button. There's this one piece from bootloader to initramfs stage I don't quite understand among some ...
gertvdijk's user avatar
  • 14k
10 votes
2 answers
6k views

How to mark "not fully installed" apt-get package as "successfully installed"

I have installed Debian 7.4 on my Iomega ix2-200 NAS, following this blog. The ix2-200 is running an ARM Marvel CPU and has a 128 MB NAND flash memory. The flash contains an initramfs image (uInitrd) ...
32u-nd's user avatar
  • 215
10 votes
3 answers
8k views

GRUB confuses kernels/initramfs of Ubuntu and Arch Linux installation

I have a machine that used to dual-boot Ubuntu (16.04 currently) and Windows 7, with Ubuntu's GRUB as boot loader. Now I just added Arch Linux as third OS, following the official installation ...
Byte Commander's user avatar
10 votes
3 answers
1k views

How do I know what decompression algorithms are compiled-in into the linux kernel?

If /proc/config.gz is unavailable, how do I know what decompression algorithms the running kernel is capable of using on a compressed cpio initramfs? Is the gzip algorithm always available, even when ...
MattBianco's user avatar
  • 3,704
9 votes
4 answers
10k views

How to generate initramfs image with busybox links?

Having been directed to initramfs by an answer to my earlier question (thanks!), I've been working on getting initramfs working. I can now boot the kernel and drop to a shell prompt, where I can ...
pingswept's user avatar
  • 1,115
9 votes
7 answers
12k views

Prevent Debian from auto-assembling RAID at boot

I set up a Debian wheezy (7.6), installed openmediavault, and created a software RAID 5 with that. It is listed at /dev/md127. Now I want to move that to a virtual XEN VM. To do so, I have to stop ...
Droids's user avatar
  • 211
9 votes
3 answers
9k views

Building a Read-Only Linux System With a Writable Layer in RAM

I have a requirement to boot RHEL 6.6/7.0 into read-only mode with a writable layer only in RAM. I believe this is similar to how live CDs work, in that the file system is read-only, but certain parts ...
Kinetic Arc's user avatar
9 votes
2 answers
4k views

Freeing initramfs ram after switching root when using overlayfs?

I am building a custom Live Linux boot image based on Arch Linux. I've modified the stock initrd to contain a custom script which does the following: After boot, only the initramfs exists. I first ...
fdmillion's user avatar
  • 2,828
8 votes
2 answers
23k views

No mkinitcpio preset present

My laptop lost battery during an update, so the linux kernel got truncated. After arch-chrooting into it and reinstalling linux, it's OK, but /boot/initramfs-linux.img (and the fallback) are empty. ...
R Harrington's user avatar
8 votes
2 answers
15k views

Initramfs in debootstrap chroot of fully encrypted system

I'm working on a script to create a fully encrypted washable system from debootstrap. It's doing some good, but the initramfs image that comes out does not pick up the cryptroot properly. After ...
Robert Cutajar's user avatar
7 votes
4 answers
7k views

Extracting concatenated cpio archives

initramfs archives on Linux can consist of a series of concatenated, gzipped cpio files. Given such an archive, how can one extract all the embedded archives, as opposed to only the first one? The ...
Charles Duffy's user avatar
7 votes
3 answers
10k views

md raid not mounted by dracut

Background I'm running Centos 7. Originally, it was running on a single disk that looked something like this: 1 200M EFI System (/boot/efi) 2 500M Microsoft basic (/boot) 3 465.1G ...
dghodgson's user avatar
  • 301
7 votes
2 answers
1k views

Can initramfs be paged out to swap disk?

I am using initramfs to boot Centos via PXE. The initramfs used memory is listed within the "cached" value in /proc/meminfo or via free. Since I need to calculate performance data, I need to know ...
dfens123's user avatar
  • 123
7 votes
2 answers
2k views

Repack the filesystem image from vmlinux.bin (embedded initramfs) without rebuilding?

In How do I extract the filesystem image from vmlinux.bin? and https://wiki.gentoo.org/wiki/Custom_Initramfs#Salvaging methods are presented for getting and unpacking an embedded initramfs/initrd ...
phk's user avatar
  • 5,963
6 votes
1 answer
5k views

unable to open luks encrypted device (wrong password)

I'm using CentOS 7 with a luks encrypted root partition. Usually I have to type my password during boot, but sometimes the system doesn't accept it. It reacts as it was wrong, but it isn't. I did not ...
sedrubal's user avatar
  • 306
6 votes
3 answers
14k views

Luks, ssh unlock, Strange behaviour, Invalid authorized_keys file

I don't know why, but I can't manage to follow these instructions on my debian stable. After installing dropbear and busybox, I tried to run initramfs -u. I got here a strange warning: # update-...
tobiasBora's user avatar
  • 4,101
6 votes
1 answer
9k views

update-initramfs hangs on debian Stretch

using apt-get upgrade on Debian left me with the decision to update to kernel 4.9.0-6 but the installation never finishes. It always stalls at the following stage: Setting up linux-image-4.9.0-6-...
Christian's user avatar
  • 303
6 votes
3 answers
3k views

Is making /etc directory read only a bad idea?

I have an embedded system setup built using buildroot and using initramfs. It runs on compact flash device where I have created separate ext3 partitions to mount /etc/ and /var directories as well as ...
mathematician1975's user avatar
6 votes
2 answers
12k views

update-initramfs selects wrong kernel

I'm running Debian 8 Jessie with kernel 4.1.20 from kernel.org. For some reason when I do update-initramfs -u it tells me the following: /boot/initrd.img-4.4.4 does not exist. Cannot update. For some ...
Scoopta's user avatar
  • 1,520
6 votes
1 answer
16k views

Excluding kernel modules through /etc/modprobe.d/blacklist.conf does not work

I don't want to load the kernel module nouveau on my debian box at startup, so I put the following in /etc/modprobe.d/blacklist.conf: blacklist ttm blacklist drm blacklist nouveau I even did a ...
JohnnyFromBF's user avatar
  • 3,496
6 votes
3 answers
6k views

Why do we need initramfs and initrd

For example we have exotic file system on the disk and in order to load system we need mount root filesystem. But we cannot because there is no suitable driver exists in kernel image. Let me ...
solderingiron's user avatar
6 votes
1 answer
10k views

Adding a file to /etc of initramfs in Debian Wheezy

I have added the file /etc/initramfs-tools/etc/motd so that it would be available in /etc of the initramfs environment. However, it does not turn up. This is my second try where I gave the file all ...
user avatar
6 votes
1 answer
3k views

Grub2/LUKS How to avoid to type the passphrase twice?

I am on the latest OpenSUSE Tumbleweed and this guide has not worked for me. I did everything like in the guide except I did not generate a new random key and added it to the harddisk but used the ...
redanimalwar's user avatar
  • 1,067
6 votes
3 answers
11k views

How do I determine if my kernel uses initramfs?

I'm reading up on Wake on Lan on Debian wiki and there is a part that says: If your kernel uses an initramfs image (eg. Debian stock kernels), also run update-initramfs -u (or update-initramfs -u -k ...
linstar's user avatar
  • 753
6 votes
1 answer
4k views

update-initramfs failing after upgrading to stretch from jessie

I recently updated one of my Debian boxes to run with stretch, but unfortunately I run in an issue when it comes to the regeneration of the initramfs image. It seems that it doesn't recognize that I ...
Steffen's user avatar
  • 191
6 votes
1 answer
2k views

How to combine linux kernel and initrd without compiling?

I know that it's possible to extract from a linux kernel the embedded initramfs cpio. I want to know if the reverse operation is possible; i.e., given both a compiled kernel and initramfs archive, how ...
therealneil's user avatar
6 votes
3 answers
6k views

How do I build a read-only Linux system that only writes to the RAM?

This is my current partition structure: Filesystem 1K-blocks Used Available Use% Mounted on tmpfs 127428 0 127428 0% /lib/init/rw udev ...
mado saif's user avatar
6 votes
1 answer
1k views

Does the kernel delete entries in /dev on an initramfs?

I have a fully custom, minimal, embedded Linux (vanilla, 3.3.8, i486, Vortex86dx) system that boots from an initramfs image. No standard distribution scripts are used, just a single rcS file that does ...
Mr Stinky's user avatar
  • 279
6 votes
0 answers
588 views

How to abort/cancel a running command in initramfs?

When I invoke a long-running command, e.g. du, I don't see a way to abort/cancel it (Strg/Ctrl+c doesn't work), other shells/ttys aren't available. Am I completely doomed after having started a long ...
Kalle Richter's user avatar
6 votes
1 answer
4k views

Adding dropbear to initramfs with dracut on Fedora

I'm trying to add dropbear to my initramfs so I can unlock the encrypted disk through a remote SSH session (as described here). I'm running Fedora 16 which apparently uses dracut to generate the ...
brianmearns's user avatar

1
2 3 4 5
10