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
0 votes
1 answer
116 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 ...
0 votes
1 answer
44 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 ...
  • 179
0 votes
0 answers
74 views

How to use initramfs hooks?

I am building linux kernel 5.15 and I want to build an initramfsimage with a hook script. Where I should keep my script? Is it in the /etc/initramfs-tools/hooks/ or in /etc/dracut.conf.d? Which ...
  • 177
1 vote
0 answers
243 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 ...
0 votes
2 answers
125 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 ...
  • 21
1 vote
1 answer
513 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
64 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
1 answer
327 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, ...
0 votes
0 answers
71 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 ...
2 votes
1 answer
270 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 ...
1 vote
0 answers
66 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
41 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 ...
0 votes
0 answers
250 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
3 answers
3k 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 ...
  • 61
0 votes
0 answers
96 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 ...
0 votes
2 answers
845 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 ...
  • 101
1 vote
2 answers
1k 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. [...
  • 11
1 vote
1 answer
393 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 ...
2 votes
1 answer
242 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.
3 votes
1 answer
2k 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. ...
  • 5,214
1 vote
1 answer
683 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 ...
  • 11
3 votes
1 answer
240 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 ...
  • 53
0 votes
2 answers
1k 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 ...
  • 21
1 vote
0 answers
148 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 ...
  • 63
4 votes
2 answers
2k 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....
2 votes
2 answers
3k 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 ...
  • 121
1 vote
1 answer
698 views

Ubuntu 20.04 on zfs on root on LUKS on UEFI

I am following https://github.com/openzfs/zfs/wiki/Ubuntu-18.04-Root-on-ZFS but doing it for Ubuntu 20.04. When I get to: update-initramfs -u -k all nothing happens: It returns after 0.1 second and ...
  • 30.7k
2 votes
1 answer
598 views

Problem extracting the "initrd" archive in kernel 5.4

I can see my initrd is occupied almost 90 MB of disk but after extracting it via cpio , it contains only a 30 KB microcode : $ cpio -it < initrd.img-5.4.0-18-generic . kernel kernel/x86 kernel/...
1 vote
2 answers
128 views

Why does a shebang script run as init= have an euid of 0 when run from an initrd, but not otherwise?

I am trying to create my own PID 1 init script, to be called from the boot cmdline with init=/myscript. How can I make it work on a real filesystem, with any kernel? When it runs in an initrd, it ...
  • 13
0 votes
1 answer
2k 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 ...
  • 1
0 votes
1 answer
89 views

initrd and intramfs purpose confusion

My understanding of the purpose of having initrd or intramfs is for the kernel to be able to mount a temporary file system in RAM to load drivers and other things in order to be able to mount the ...
0 votes
1 answer
507 views

In a systemd initrd, how do I persist a mount into the new root

Background I'm building a custom initrd using dracut. It: mounts an ext4 disk partition to /data retrieves a squashfs image over the network, which it stores in /data mounts the squashfs mounts an ...
1 vote
0 answers
81 views

Initrd - rebooting issue

I recently booted into Root via Ubuntu kernel recovery mode. When I finished what I was doing, and not altering anything in my system, I tried to reboot with shutdown -r now. This started various ...
0 votes
1 answer
195 views

Ubuntu 18.04.3 netboot PXE fresh installed boots up with Ethernet not managed by Network Manager

I'm trying to set up a PXE server to deliver Linux image for end user workstation in my company. I've finally made it to set up dnsmasq and nfs-kernel-server so now I can get the images via network ...
1 vote
0 answers
148 views

How create RAID 1 on working Slackware 14.2?

I use Slackware 14.2 (with kernel 4.4.14-smp) on sda and I'm trying to create the RAID 1 with additional sdb. I'm using the VM VirtualBox. First, I have cleaned the sdb: dd if=/dev/zero of=/dev/sdb ...
2 votes
2 answers
5k views

Grub: boot with USB key, then continue booting from SD card?

I have an old laptop that has a built-in SD card reader, only it's not available at boot. I can however grub boot linux (Debian) from a small 8GB USB key (USB 2.0), but it's very slow. The SD card is ...
1 vote
0 answers
157 views

Initramfs not reading new configuration/scripts

I am trying to add some custom initramfs scripts to /etc/initramfs-tools/scripts/init-bottom/. However, these are not executed at next boot, after having rebuilt with # update-initramfs -u In fact, ...
1 vote
1 answer
760 views

How to boot OpenWRT FROM PXE?

I have downloaded OpenWRT files for PC from OpenWRT site. I have installed DHCP and TFTP (in my LAN) and can boot (other) kernels from them. Now I want to boot these OpenWRT files. I wrote in PXE ...
  • 2,709
1 vote
0 answers
39 views

Take initrd out of the Linux boot process

I have "one" machine which is static. The following never change: CPU, GPU, motherboard, harddrive, keyboard, mouse, USB ports I have dual-boot Windows and Linux (specifically Windows 10 and Ubuntu) ...
2 votes
1 answer
213 views

initrd and initramfs confusions

I read from arch wiki: In case your root filesystem is on LVM, you will need to enable the appropriate mkinitcpio hooks, otherwise your system might not boot. However, both my initrd and ...
0 votes
1 answer
2k views

How to copy the /bin files along with dependencies using commands?

The /bin folder of Ubuntu 14.04 has files with dependencies. I want to copy the symbolic links along with the files, into a separate directory. Is there an inbuilt command for this?
3 votes
1 answer
1k views

My initrd has only one directory, after decompressing, namely 'kernel'

The file shows 56 blocks as the size. I am using the system Ubuntu 16.04 and I need a solution that does not require me to update the kernel.
0 votes
0 answers
231 views

trap signal in bash initramfs fails to work

inside /init bash script executed by the kernel in initramfs.img i need to send a signal to drop me to a rescue shell, so i have trap "exec /bin/bash" SIGINT but ctrl+C isn't effective. First why ...
  • 343
2 votes
1 answer
548 views

Kernel can't find initrd?

When trying to mount ext2 I get this error: Creating 4 MTD partitions on "MPC8313RDB Flash Map Info": 0x000000000000-0x000000100000 : "U-Boot" 0x000000100000-0x000000300000 : "Kernel" 0x000000300000-...
  • 43
1 vote
1 answer
921 views

Can't mount squashfs loop during initramfs

I am trying to mount a squashfs file during initramfs. I have included loop and squashfs modules. Currently using mount /foo.squashfs /mountpoint or mount -t squashfs -o loop /foo.squashfs /...
1 vote
2 answers
3k views

how to know the right size of /boot

for now /boot on our linux machines is /dev/sda1 497M 157M 340M 32% /boot we want to create a new linux redhat template and I have the feeling that /boot size is too small for ...
  • 11.4k
0 votes
1 answer
84 views

kernel sysfs doesn't recognize storage kobjects [closed]

I am using ubuntu kernel 4.xx with corresponding ubuntu initrd.img, and it works. But, I want to use a custom initramfs inspired by lfs (linux from scratch) initramfs. The kernel extracts, and runs ...
  • 343
1 vote
0 answers
173 views

How to add ssmtp into initramfs?

I'm trying to add ssmtp into initramfs. However, I can not find (or compile at the moment) the statically linked version. I guess my only option is adding the current, dynamically linked version. I'...
  • 2,027
3 votes
0 answers
4k views

Ubuntu 18.04 LUKS boot problems

Problem description I am trying to achieve dualboot of Windows 10 (pre-installed) and Ubuntu 18.04 on a new laptop. This is not very difficult, however it appears to get much more complex if you also ...
  • 170
1 vote
0 answers
319 views

Why can't dd write to /dev/ram0 on Core Linux?

I created an ext2 file-system on /dev/ram0 ramdisk, and mounted it at /mnt/ram. mkdir /mnt/ram mkext2fs /dev/ram0 sudo mount /dev/ram0 /mnt/ram -o rw Reading from ramdisk with dd works. dd if=/dev/...
  • 516