Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [initrd]

initrd is a method for loading a temporary file system into memory, during the process of booting the Linux kernel.

Filter by
Sorted by
Tagged with
2 votes
2 answers
4k views

Booting kernel (FIT image) with no rootfs

An embedded Linux device I am working with has the following kernel parameter: root=/dev/ram0 Additionally, the kernel image is bundled together with an initrd and device tree to make a flattened ...
0 votes
1 answer
42 views

How do I keep init from pivot_root and stay in ramdisk?

in short, I was not satisfied with the available distros as they are either roo large or are missing the features I need ootb, I also want it to boot it into ramdisk, so I made my own ISO. This ISO ...
0 votes
0 answers
52 views

noinitrd is ignored, always runs initrd copy of /init

I use an initrd currently on an imx8 processor that uses buildroot for a base filesystem. (kernel is 5.10.52) For debugging purposes, I want to bypass the initrd and load the filesystem I copied to a ...
8 votes
2 answers
711 views

Eliminate inclusion of X11 libs in initrd

I'm running Debian Bookworm on a TS412 (QNAP); it stores the kernel & initrd in flash. It has a total of 16MB of flash. So even after tweaking with the MD partitions the best I can get is a 12MB ...
0 votes
0 answers
63 views

Linux without initrd: unable to mount rootfs

Setup Partitions: # fdisk -l /dev/sda ... Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 51199 49152 24M c W95 FAT32 (LBA) /dev/sda2 51200 204799 153600 75M 83 ...
0 votes
0 answers
604 views

Alpine linux how to load system into RAM

I need advice if possible to load entire system into RAM. Let's imagine following situation: Booting LIVE OS from DVD and login as root lsblk shows NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS loop0 ...
1 vote
2 answers
731 views

Nixos install results in error during boot of "Timed out waiting for device /dev/dis/by-uuid/... to appear" with external NVME drive via USB

I have an issue when using an external NVME drive, grub successfully boots but once entering the entry default configuration (nixos generation) it gives me the below error: "Timed out waiting ...
0 votes
2 answers
313 views

Why initrd size is not fixed?

After update-initramfs -c -k KERNELVERSION(I didn't do any change and just type this command), the initrd will always has different size with the previous initrd. And this situation happen on Debian ...
0 votes
2 answers
2k views

Kernel panic - not syncing: Requested init /init failed (error -2)

Attaching a bit more of the boot log. HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages HugeTLB registered 32.0 MiB page size, pre-allocated 0 pages HugeTLB registered 2.00 MiB page size, ...
11 votes
2 answers
15k views

How to populate /dev directory when building my own initrd?

I am trying to learn stuff about initrd. I have followed this tutorial to build my own initrd from scratch, and I installed busybox on it. Then I made an .iso from it with isolinux, so I could test it ...
1 vote
1 answer
3k views

CentOS 7.6 - Initrd.img not loading updated driver

I have been trying to load an updated initrd.img file with updated drivers on booting the Centos 7.6 ISO, however it seems to still load the old driver even though I have replaced the driver. Steps ...
4 votes
1 answer
786 views

What happens to the files in directories mounted by initrd , when initrd unmounts

While the linux boots up, initrd is mounted with basic support files and kernel modules, which are needed to help further boot procedure. Later the rootfs is mounted and initrd is unmounted from the ...
5 votes
3 answers
1k views

Where is /cow for Linux booted from LiveUSB?

I wanted to see what files are added on top of ISO 9660 when LiveUSB Linux is running. When booted with persistence upper and work folders are on USB drive clearly seen. I run mount on Linux booted ...
3 votes
3 answers
8k views

How to pack an extracted initrd (x-cpio archive)?

I am customizing an Ubuntu 20.04 ISO, in this process, I have to edit the files inside initrd file which is inside the casper directory Ubuntu20.04-ISO/casper/initrd How to recompile this file type of ...
0 votes
2 answers
879 views

Why is my boot partition full?

When I run run apt-get dist-upgrade, I get update-initramfs: deferring update (trigger activated) Processing triggers for initramfs-tools (0.142) ... update-initramfs: Generating /boot/initrd.img-6.0....
1 vote
2 answers
1k views

What files are pulled in by update-initramfs?

I need to know what config and data files are pulled in to make the initrd.img-xxx when update-initramfs (mkinitramfs) is executed. I am having a video driver problem that I have narrowed down to the ...
1 vote
2 answers
2k views

How to change default username/hostname for Ubuntu 22.04.1 LTS LiveCD?

I'm trying to edit the default username/hostname for a a custom Ubuntu 22.04.1 LTS LiveCD. I'm understanding I need to edit the /etc/casper.conf file that resides inside $ISO_MEDIA/casper/initrd, ...
7 votes
2 answers
10k views

How to make a minimal bootable linux (only with terminal) from kernel source code? [duplicate]

I want to make a very minimal linux os which only have a terminal interface and basic commands/applications (busybox is my choice for commands/apps). I don't want the installation option on my os. I ...
1 vote
1 answer
746 views

create initrd image compressed with zstd

I have initrd image compressed with xz. This is how I created it from image file initrd: e2image -ar initrd - | xz -9 --check=crc32 > initrd.xz now I need same image compressed using zstd ...
2 votes
3 answers
3k views

Uboot Hangs when Initrd size increased in FIT image

I'm booting Linux on arm64 using FIT multi image (image + initrd + DTB). If I increase the initrd size (from 16 MB -> 20MB) the board hangs at "starting kernel"). However if I change the ...
13 votes
3 answers
29k views

Linux kernel is not finding the initrd correctly

I had compiled a linux kernel and I wanted to debug it in QEMU. I created a file to boot from by doing the commands $ qemu-img create -f raw disk.img 200M $ mkfs.ext2 -F disk.img # mkdir /mnt/rootfs ...
0 votes
1 answer
531 views

Boot into Xen on debian11 (initrd trouble)

Linux xd 5.10.0-16-amd64 #1 SMP Debian 5.10.127-1 (2022-06-30) x86_64 GNU/Linux Edit 2022-07-20 This issue has had comes and goes, at the moment, I am having a lot of trouble when Xen boot lands on ...
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 ...
3 votes
3 answers
9k views

How to find modules used in initrd?

Is there a way to see all the kernel modules/drivers put in the initrd/intramfs?
0 votes
1 answer
392 views

Is it possible to suppress initramfs logs during shutdown?

There are quite a few Linux kernel parameters that can prevent the boot and shutdown logs from appearing on the screen. I was able to set the following kernel parameters to achieve a completely silent ...
4 votes
2 answers
3k views

/boot/vmlinuz file is not present

I am using debian and when I was just checking my filesystem there was no vmlinuz file and after a bit of googling many user with no vmlinuz were having trouble to boot but my computer is booting well....
8 votes
3 answers
12k views

Ubuntu 21.04 hangs at "loading initial ramdisk" after kernel update with LUKS

I've reproduced this twice from a fresh install - the setup initially works fine, but when a kernel update is applied, the system hangs on reboot. Selecting the older kernel I have available from GRUB ...
4 votes
0 answers
4k views

How can I replace root / filesystem with another filesystem?

When the Linux kernel starts up, it uses initrd as the root / filesystem, then replaces that with a filesystem partition in fstab. Based on a test in an early init script, I want to replace that root ...
1 vote
0 answers
970 views

RemainAfterExit not working

I have a systemd service unit, for which I want to enable RemainAfterExit. This runs in a custom intrd. Here is my unit: [Unit] Description=Ask for network config Conflicts=initrd-switch-root.target ...
1 vote
1 answer
1k views

decoding failed, system halted during legacy boot (possibly due to large SATA drive attached)

I booted liveUSB stick based on Linux Mint 20.2. After outputting initrd line (one after vmlinuz) I got empty screen with "decoding failed, system halted" (tried twice, error got reproduced)...
0 votes
0 answers
434 views

Adjusting a RHEL 8 install for a machine without a hard drive?

I've been working with a custom RHEL 8 image (basically the official ISO but with a kickstart for packages/configuration) on a CD and have gotten it to install without issue on a piece of hardware ...
0 votes
0 answers
325 views

Unable to auto-mount encrypted filesystem.squashfs of Debian Live CD

Part 1 I've created a live ISO image of my system using 'live build' tool on a Debian system. For automated installation i've used a preseeding file. To protect my senstive data I'm using LUKS ...
1 vote
0 answers
114 views

Unable to create an identical initrd on re-compression for Pop! OS 19.04

I've made changes to initramfs, but when i'm repacking, the obtained file isn't identical to the original file I've pulled out the boot image with the help of dd using dd if=INITRD.GZ of=main bs=1 ...
0 votes
1 answer
49 views

tput from initrd

I have a script that uses tput and runs in a initrd. Specifically I'm using tput -T linux [sc|rc|ed] > /dev/tty0 to overwrite multiple lines. When I run in a qemu vm, it works perfectly. When I run ...
1 vote
0 answers
538 views

How to debug a loop in systemd-shutdown / initrd ? (Arch Linux)

I've recently installed Arch Linux to a virtual disk, under a custom configuration for root on ZFS. This was in using some scripting I've put together for managing a multiboot configuration, with ...
6 votes
2 answers
4k views

Booting without initrd

Is it possible to boot linux without a initrd.img ? I am planning to add default drivers as a part-of-kernel itself and avoid initrd completely. What are the modules that should be made part-of-the-...
0 votes
0 answers
227 views

/dev/sde install disk is seen as /dev/sda at boot time

I'm SystemImager image deployment software developper. I'm trying to support external disk drivers, but I'm stuck with a silly problem. When I run preinstall scripts (udev has already settled) I fetch ...
7 votes
3 answers
15k views

Can the initramfs image use a compression format other than gzip?

Can the initramfs image be compressed by a method other than gzip, such as lzma?
1 vote
1 answer
3k views

How to control the OverlayFS size

I'm trying to mount the rootfs / of a Debian Buster system as overlayfs because I'm interested in using tmpfs for the /upper directory. My idea is to use this to preserve the root filesystem integrity ...
1 vote
2 answers
4k views

How to repair linux after failed to start file system

I have problem with my linux. I always had small problem with my HHD but my PC always could works correctly but yesterday its stuck and I decided to reboot it. After rebooting I get this error. [...
1 vote
1 answer
847 views

stuck at busy box, attempt to boot old linux at another partition

I have, and able to boot with arch Linux with kernel 5.10.34 normally. I have older Linux (linuxmint 20.1) on my sda6 with kernel 5.4.0-72 and 5.8.0-50. I am using grub-customizer. Kindly not answer ...
49 votes
6 answers
19k views

Why is it that my initrd only has one directory, namely, 'kernel'?

I'm using debian live-build to work on a bootable system. By the end of the process i get the typical files used to boot a live system: a squashfs file, some GRUB modules and config files, and an ...
2 votes
1 answer
447 views

Why do distros(e.g. Arch) use BOTH initramfs and root={smth}?

I thought the goal of initramfs is to boot a root partition and chroot into it. But I can't understand why do distro developers use initramfs if there is ALWAYS a root={smth} flag.
18 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 ...
4 votes
1 answer
5k views

How to verify signed UEFI binaries?

I'm trying to understand why secure boot works on my machine. It is enabled in the UEFI config, everything boots just fine, and mokutil --sb-state says SecureBoot enabled. But I think it shouldn't. ...
1 vote
1 answer
1k views

Dropping to initramfs shell

For many years now I've been an avid windows & mac user. Most recently, the growing love-affair between tech corporatists and government bureaucrats has convinced me to take the plunge into the ...
2 votes
1 answer
2k views

Proper manual OS setup on LUKS encrypted drive with non-aes algorithm on yum-based distro (CentOS)

I'm trying to achieve LUKS-encrypted CentOS 7 install with separate /boot partition and lvm on EFI-friendly motherboard. I've done partitioning fresh CentOS install from old CentOS(installed from GUI)...
3 votes
1 answer
524 views

A Small GUI Linux System with UEFI completely running on RAMDisk

I am developing a POS System and I am planning to use Linux. My requirements are as follows UEFI Support. (Running on x86 and x86_64) No Storage Drive so completely running on RAM and persistence ...
0 votes
2 answers
2k views

is /sbin/init an executable?

# Mount the root filesystem. 1 .mount -o ro /dev/sda1 /mnt/root # Boot the real thing. 2 .exec switch_root /mnt/root /sbin/init This is a piece of code from /init file of initramfs as mentioned in ...
1 vote
0 answers
253 views

Difference between initrd.img and a initramfs.img?

an initrd.img sets the stage for the real root file system to take over once done, as I understand it the initramfs.img is a customizable version of the initrd. lets say you are loading to a diskless ...