Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
0
votes
1
answers
2352
views
update-initramfs does not fully create initrd for new kernel
I seem to be having a bizarre problem installing a new custom kernel. `update-initramfs` fails during `dpkg -i` with: update-initramfs: Generating /boot/initrd.img-5.15.7-hardened1-test1 find: ‘/tmp/user/0/mkinitramfs_gHxWMQ/lib/modules/5.15.7-hardened1-test1/kernel’: No such file or directory Gener...
I seem to be having a bizarre problem installing a new custom kernel.
update-initramfs
fails during dpkg -i
with:
update-initramfs: Generating /boot/initrd.img-5.15.7-hardened1-test1
find: ‘/tmp/user/0/mkinitramfs_gHxWMQ/lib/modules/5.15.7-hardened1-test1/kernel’: No such file or directory
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.7-hardened1-r7
Found initrd image: /boot/initrd.img-5.15.7-hardened1-r7
Found linux image: /boot/vmlinuz-5.15.7-hardened1-test1
Found initrd image: /boot/initrd.img-5.15.7-hardened1-test1
Found linux image: /boot/vmlinuz-5.10.0-10-amd64
Found initrd image: /boot/initrd.img-5.10.0-10-amd64
done
The r7
kernel builds and installs perfectly fine, but the test1
installs with a find: ‘/tmp/user/0/mkinitramfs_gHxWMQ/lib/modules/5.15.7-hardened1-test1/kernel’: No such file or directory
error. The only difference between the .configs is:
29c29
CONFIG_LOCALVERSION="-test1"
39c39
# CONFIG_KERNEL_GZIP is not set
45c45
CONFIG_KERNEL_ZSTD=y
787c787
CONFIG_MODULE_FORCE_UNLOAD=y
802,803c802,803
# CONFIG_MODULE_COMPRESS_XZ is not set
> CONFIG_MODULE_COMPRESS_ZSTD=y
I even tried a slightly newer kernel (5.15.27) and older (5.10.104) with the same results. Trying to boot into the kernel drops the boot to a initramfs
prompt (without USB keyboard functionality) after failing to find the root LVM.
The initrd images also have very different sizes for the minimal changes made:
9.7M initrd.img-5.15.7-hardened1-r7 (working)
9.1M initrd.img-5.15.7-hardened1-test1 (broke)
Doing a diff between the two with lsinitrd
produces this, suggesting that the initrd does indeed lack a huge number of modules.
346,399c346
5.15.7-hardened1-test1
Anyone seen this before? I found one results through google but a solution was never provided.
I'm running Devuan Chimaera (Debian 11 base) with: initramfs-tools=0.140 & dpkg=1.20.9
bcHelix
(75 rep)
Mar 19, 2022, 11:39 PM
• Last activity: Jul 27, 2025, 03:07 AM
0
votes
3
answers
19809
views
How to avoid "can't access tty; job control turned off" when boot to initramfs
i'm testing my custom initramfs now, but everytime the log there will have the "can't access tty; job control turned off". The /dev in initramfs has four files: null, sda1, ttyS0. The kernel parameter is 'console=ttyS0'. Also, i test ctrl+c, it works fine.So how could this problem heppen? In busybox...
i'm testing my custom initramfs now, but everytime the log there will have the
"can't access tty; job control turned off".
The /dev in initramfs has four files: null, sda1, ttyS0.
The kernel parameter is 'console=ttyS0'.
Also, i test ctrl+c, it works fine.So how could this problem heppen?
In busybox documentation,
> Why do I keep getting "sh: can't access tty; job control turned off"
> errors? Why doesn't Control-C work within my shell? This isn't really
> a uClibc question, but I'll answer it here anyways. Job control will
> be turned off since your shell can not obtain a controlling terminal.
> This typically happens when you run your shell on /dev/console. The
> kernel will not provide a controlling terminal on the /dev/console
> device. Your should run your shell on a normal tty such as tty1 or
> ttyS0 and everything will work perfectly. If you REALLY want your
> shell to run on /dev/console, then you can hack your kernel (if you
> are into that sortof thing) by changing drivers/char/tty_io.c to
> change the lines where it sets "noctty = 1;" to instead set it to "0".
> I recommend you instead run your shell on a real console...
I type tty and it gives me /dev/console instead of /dev/ttyS0.
So, that's all information about this problem, hope some one can help me out:-)
Obsessive
(11 rep)
Jul 13, 2019, 04:08 AM
• Last activity: Jul 26, 2025, 04:07 PM
0
votes
1
answers
1917
views
copy_exec command not found when executing update-initramfs
I'm currently trying to include cryptsetup into my initramfs so i can boot after having encrypted the root partition. I created a hook-script in ```/usr/share/initramfs-tools/hooks/my_hook``` With the following content copy_exec /sbin/cryptsetup /sbin But everytime i try to execute (in chroot) updat...
I'm currently trying to include cryptsetup into my initramfs so i can boot after having encrypted the root partition.
I created a hook-script in
/usr/share/initramfs-tools/hooks/my_hook
With the following content
copy_exec /sbin/cryptsetup /sbin
But everytime i try to execute (in chroot)
update-initramfs -u -k all
It fails with:
root@ubuntu update-initramfs -u -k all
/usr/share/initramfs-tools/hooks/my_hook
:1 /usr/share/initramfs- tools/hooks/my_hook copy_exec: not found
E: /usr/share/initramfs-tools/hooks/my_hook failed with return 127
KoKlA
(101 rep)
Jan 7, 2020, 06:08 AM
• Last activity: Jul 23, 2025, 01:06 PM
11
votes
3
answers
10597
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 extract all files inside the `initramfs` image and packing them again. First I've tried to generate a li...
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 extract all files inside the initramfs
image and packing them again.
First I've tried to generate a list of files for gen_init_cpio
*without* extracting all contents on the initramfs
archive, i.e. parsing the output of cpio -tvn initrd.img
(like ls -l
output) through a script which changes all permissions to octal and arranges the output to the format gen_init_cpio
wants, like:
dir /dev 755 0 0
nod /dev/console 644 0 0 c 5 1
slink /bin/sh busybox 777 0 0
file /bin/busybox initramfs/busybox 755 0 0
This involves some replacements and the script may be hard to write for me, so I've found a better way and I'm asking about how safe and portable is:
In some distros we have an initramfs
file with concatenated parts, and apparently the kernel parses the whole file extracting all parts packed in a 1-byte boundary, so there is no need to fill each part to a multiple of 512 bytes. I thought this 'feature' can be useful for me to avoid recreating the archive when modifying files inside it. Indeed it works, at least for Debian
and CloneZilla
.
For example if we have modified the /init
file on initrd.gz
of Debian 8.2.0, we can append it to initrd.gz
image with:
$ echo ./init | cpio -H newc -o | gzip >> initrd.gz
so initrd.gz
has two concatenated archives, the original and its modifications. Let's see the result of binwalk
:
DECIMAL HEXADECIMAL DESCRIPTION
--------------------------------------------------------------------------------
0 0x0 gzip compressed data, maximum compression, has original file name: "initrd", from Unix, last modified: Tue Sep 1 09:33:08 2015
6299939 0x602123 gzip compressed data, from Unix, last modified: Tue Nov 17 16:06:13 2015
It works perfectly. But it is reliable? what restrictions do we have when appending data to initfamfs
files? it is safe to append without padding the original archive to a multiple of 512 bytes? from which kernel version is this feature supported?
Emilio Lazo
(253 rep)
Nov 17, 2015, 06:05 PM
• Last activity: Jul 21, 2025, 04:09 AM
0
votes
0
answers
28
views
How to add init script with decrpt LUKS Logic in Initramfs without disturbing poky source?
Here is quick description what im trying to achieve, building this mender yocto image for raspberry pi want to encrypt the root partition, while secure boot, need to add the init script which can decrypt the LUKS encrypted rootfs partition. Poky layer already has core-image-minimal-initramfs which c...
Here is quick description what im trying to achieve, building this mender yocto image for raspberry pi want to encrypt the root partition, while secure boot, need to add the init script which can decrypt the LUKS encrypted rootfs partition. Poky layer already has core-image-minimal-initramfs which can be bundled in linux kernel, the problem is im not able to add the init script from custom layer, have no idea how to achieve it
This is the poky layer content core-image-minimal-initramfs.bb
# Simple initramfs image. Mostly used for live images.
SUMMARY = "Small image capable of booting a device."
DESCRIPTION = "Small image capable of booting a device. The kernel includes \
the Minimal RAM-based Initial Root Filesystem (initramfs), which finds the \
first 'init' program more efficiently."
INITRAMFS_SCRIPTS ?= "\
initramfs-framework-base \
initramfs-module-setup-live \
initramfs-module-udev \
initramfs-module-install \
initramfs-module-install-efi \
"
PACKAGE_INSTALL = "${INITRAMFS_SCRIPTS} ${VIRTUAL-RUNTIME_base-utils} udev base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
# Do not pollute the initrd image with rootfs features
IMAGE_FEATURES = ""
# Don't allow the initramfs to contain a kernel
PACKAGE_EXCLUDE = "kernel-image-*"
IMAGE_NAME_SUFFIX ?= ""
IMAGE_LINGUAS = ""
LICENSE = "MIT"
IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
inherit core-image
IMAGE_ROOTFS_SIZE = "8192"
IMAGE_ROOTFS_EXTRA_SPACE = "0"
# Use the same restriction as initramfs-module-install
COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|loongarch64.*)-(linux.*|freebsd.*)'
the is meta-mender/meta-mender-core/recipe-core tree, ihave added this core-image-minimal-initramfs.bbappend and initLUKSdecrpyt.sh
/meta-mender/meta-mender-core/recipes-core$ tree
.
├── initrdscripts
│ ├── core-image-minimal-initramfs.bbappend
│ ├── files
│ │ ├── init-install-efi-mender.sh
│ │ └── initLUKSdecrypt.sh
│ ├── initramfs-module-install_%.bbappend
│ ├── initramfs-module-install-efi_%.bbappend
│ └── initramfs-module-install.inc
8 directories, 12 files
this is code in core-image-minimal-initramfs.bbappend file,here the do_install is not getting called.
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI += "file://initLUKSdecrypt.sh"
PACKAGE_INSTALL += "cryptsetup"
do_install:append:mender-uboot(){
bbwarn "WorkDIR=${WORKDIR} Destination=${D}"
install -m 0755 ${WORKDIR}/initLUKSdecrypt.sh ${D}/init.d/initLUKSdecrypt.sh
}
So add the code in initramfs-module-install_%.bbappend, the do_install gets called but while final pacakging gets error.
require initramfs-module-install.inc
do_install:append:mender-efi-boot() {
install -m 0755 ${WORKDIR}/init-install-efi-mender-altered.sh ${D}/init.d/install.sh
}
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI := " file://initLUKSdecrypt.sh "
do_install() {
bbwarn "WorkDIR=${WORKDIR} Destination=${D}"
install -m 0755 ${WORKDIR}/initLUKSdecrypt.sh ${D}/../package/init.d/
}
Error logs:
ERROR: Task (/home/john/meta-mender-community/yocto-raspberrypi4/build/../../kas/demos/meta-mender-raspberrypi-wifi/recipes-raspberrypi/images/core-image-raspberrypi-wifi.bb:do_image_bootimg) failed with exit code '1'
ERROR: core-image-minimal-initramfs-1.0-r0 do_rootfs: Unable to install packages. Command '/home/john/meta-mender-community/yocto-raspberrypi4/build/tmp/work/raspberrypi4_64-poky-linux/core-image-minimal-initramfs/1.0/recipe-sysroot-native/usr/bin/opkg --volatile-cache -f /home/john/meta-mender-community/yocto-raspberrypi4/build/tmp/work/raspberrypi4_64-poky-linux/core-image-minimal-initramfs/1.0/opkg.conf -t /home/john/meta-mender-community/yocto-raspberrypi4/build/tmp/work/raspberrypi4_64-poky-linux/core-image-minimal-initramfs/1.0/temp/ipktemp/ -o /home/john/meta-mender-community/yocto-raspberrypi4/build/tmp/work/raspberrypi4_64-poky-linux/core-image-minimal-initramfs/1.0/rootfs --force_postinstall --prefer-arch-to-version --add-exclude kernel-image-* --add-exclude kernel-image-* install base-passwd busybox cryptsetup initramfs-framework-base initramfs-module-install initramfs-module-install-efi initramfs-module-setup-live initramfs-module-udev run-postinsts udev' returned 255:
* opkg_solver_install: No candidates to install initramfs-module-install (null)!
ERROR: Logfile of failure stored in: /home/john/meta-mender-community/yocto-raspberrypi4/build/tmp/work/raspberrypi4_64-poky-linux/core-image-minimal-initramfs/1.0/temp/log.do_rootfs.10642
ERROR: Task (/home/john/meta-mender-community/yocto-raspberrypi4/build/../poky/meta/recipes-core/images/core-image-minimal-initramfs.bb:do_rootfs) failed with exit code '1'
don't know what im missing.
URegal
(1 rep)
Jul 15, 2025, 12:40 PM
1
votes
1
answers
3551
views
How to automatically run mkinitramfs on Debian after apt update for kernel packages?
What I am trying to achieve is to have an encrypted root file system on a Raspberry Pi (running Raspian Buster) that gets unlocked at boot via ssh. I got quite far by adapting [a tutorial for Kali linux][1] and got it working at least once, but it does not survive kernel updates yet. One of the prob...
What I am trying to achieve is to have an encrypted root file system on a Raspberry Pi (running Raspian Buster) that gets unlocked at boot via ssh. I got quite far by adapting a tutorial for Kali linux and got it working at least once, but it does not survive kernel updates yet.
One of the problems is, that this setup is using an initramfs that is referenced in
/boot/config.txt
by
initramfs initramfs.gz followkernel
and that needs to be updated after an kernel update by manually calling e.g.
mkinitramfs -o /boot/initramfs.gz 4.19.118-v7+
where 4.19.118-v7+
depends on the current kernel version and the kind of Raspberry Pi hardware that is used. Of course, I want to have this automatically done whenever apt upgrade
installs a new kernel.
This is where I got stuck with 2 problems:
- A) Where and how do I plug in that update process in a proper way?
- B) How do I determine the correct kernel version to use?
Regarding A) I came as far as learning that raspberrypi-kernel.postinst
executes /etc/kernel/postinst.d/
. This again calls /usr/sbin/update-initramfs
which in the end will call mkinitramfs
. Where I got confused was this code in /usr/sbin/update-initramfs
:
set_initramfs()
{
initramfs="${BOOTDIR}/initrd.img-${version}"
}
It determines the filename for the initramfs. No such file got ever generated during the update and I'm not sure if I am on the right track, as wikipedia says that the init.rd scheme was superseded by the initramfs scheme. However, I was not able to find a good documentation that describes how things are supposed to happen after a kernel module upgrade. (Good links appreciated).
So my question is:
Where is a good place to plug in a script that runs the mkinitramfs
command? Should I modify /etc/kernel/postinst.d/
? Will this solution be stable over the next few Debian versions?
Regarding B), it is easy to get available kernel versions with
> ls -l /lib/modules/ | awk -F" " '{print $9}'`
5.4.51+
5.4.51-v7+
5.4.51-v7l+
5.4.51-v8+
But how do I automatically select the right one for the current hardware? For a Pi3B+ this would be 5.4.51-v7+
. Is there a way to determine this automatically?
Thank you very much for your help!
Alexander Lorz
(11 rep)
Aug 14, 2020, 08:29 PM
• Last activity: Jul 12, 2025, 05:03 PM
19
votes
6
answers
30690
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 or die trying. I have created the hooks to the `initramfs` and the key file is on the `/boot` direct...
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 or die trying.
I have created the hooks to the
initramfs
and the key file is on the /boot
directory inside the initrd.img-*
file. The path to the key file (/boot/keyfile
) is on the /etc/crypttab
file.
I updated the initramfs
with sudo update-initramfs -u
but I received this message: cryptsetup: WARNING: target sdaX_crypt uses a key file, skipped.
Ignoring the message and rebooting results in a unbootable disk. The message Gave up waiting for root device.
is displayed and drops to initramfs
shell.
In the initramfs
environment the cryptsetup
don't exists. *(It should exists?)*
Seens that the update-initramfs -u
"thinks" the sdaX_crypt
device will be mounted in another way and don't configure to decrypt with the keyfile.
*How can I do that?*
Fusgyus
(191 rep)
Oct 27, 2014, 07:29 AM
• Last activity: Jul 5, 2025, 12:11 PM
7
votes
3
answers
12012
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 Linux LVM LVM VG centos - LVM LV ext4 centos-root (/) - LVM LV swap centos-swap (swap) This was just a temporary s...
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 Linux LVM
LVM VG centos
- LVM LV ext4 centos-root (/)
- LVM LV swap centos-swap (swap)
This was just a temporary solution as it was originally supposed to be installed on a Linux software RAID1 array. I got around to migrating it today. This is what it currently looks like:
Both new disks have this partition layout:
1 200M EFI System (/boot/efi)
2 457.6G Linux RAID /dev/md0 RAID1 (for boot and LVM)
3 8G Linux RAID /dev/md1 RAID0 (so 16GB total, for swap)
/dev/md0 looks like this:
1 500M Linux filesystem (/boot)
2 457G Linux LVM (centos-root is migrated to this)
LVM now has only one LV, centos-root
/etc/mdadm.conf
looks like this:
ARRAY /dev/md0 level=raid1 num-devices=2 metadata=1.2 name=main.centos.local:0 UUID=5b5057b4:4235ba4b:5342dfda:acf63302
devices=/dev/sda2,/dev/sdb2
ARRAY /dev/md1 level=raid0 num-devices=2 metadata=1.2 name=main.centos.local:1 UUID=f82a8c99:9b391d83:4efc9456:9e9bad98
devices=/dev/sda3,/dev/sdb3
/etc/fstab
looks like this:
/dev/mapper/centos-root / xfs defaults 0 0
UUID=fcb5f82f-ce6b-460b-800f-329e010bc403 /boot xfs defaults 0 0
UUID=C532-14AE /boot/efi vfat umask=0077,shortname=winnt 0 0
/dev/md1 swap swap defaults 0 0
blkid
outputs this (relevant entries only):
/dev/sdb1: SEC_TYPE="msdos" UUID="C532-14AE" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="ed301bbd-c15c-40af-ae75-bf238d0e6270"
/dev/sda1: SEC_TYPE="msdos" UUID="C532-14AE" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="f3a76412-41a0-4e04-9b04-ad1c159133cf"
/dev/md0p1: LABEL="boot" UUID="fcb5f82f-ce6b-460b-800f-329e010bc403" TYPE="xfs" PARTLABEL="primary" PARTUUID="df8d6481-c6ce-423a-b5d5-205d355e5653"
/dev/md0p2: UUID="7LfywM-oPHy-MTEt-swlI-EVbZ-opTo-m82E6R" TYPE="LVM2_member" PARTLABEL="primary" PARTUUID="19e7f9d5-a955-4036-8338-03a748faa1f6"
/dev/mapper/centos-root: UUID="deaa9788-b487-4991-adf7-2945788fb6cd" TYPE="xfs"
I have a script which automatically mounts the other EFI partition to /boot/efi_[device]
, and when the kernel is updated, the grub.cfg gets copied to this partition to keep everything in sync.
/dev/sda1
and /dev/sdb1
are kept in sync by the script (I've verified this), so it shouldn't be an issue that fstab mounts either one to /boot/efi
(this also means that if one drive was removed due to failure, the system is still guaranteed to boot). I could have put swap in a LV to simplify things, but the RAID0 gets better performance (for what it's worth) and I get an extra 16GB of space.
I migrated the LV from the old drive to the new PV using the following commands:
pvcreate /dev/md0p2
vgextend centos /dev/md0p2
pvmove /dev/sdg3
vgreduce centos /dev/sdg3
Then I regenerated the initramfs with dracut
(after backing up the original), and finally regenerated grub.cfg. Afterwards, I mounted the new /boot
and /boot/efi
partitions and copied everything over.
Problem
=====
After disconnecting the old drive and booting, dracut fails to find my RAID arrays, and of course the /boot
partition and my LVG as well. It appears that it's simply not calling mdadm --assemble
on /dev/md0
and /dev/md
. I'm able to do just that from the dracut
prompt, after which lvm_scan
finds my LVG, I can link /dev/centos/root
to /dev/root
, and the system continues booting without any problems once exiting the prompt. Everything seems to be exactly where it should be.
There was a kernel update available, so I tried installing it (assuming I messed something up the first time around when regenerating the initramfs and grub.cfg files), but no dice. System still fails in the exact same way. This is true when I boot from either EFI partition manually (as it should be since the two are identical).
Link to rdsosreport.txt on pastebin
What am I missing here? How do I get dracut to assemble my arrays?
dghodgson
(301 rep)
Feb 27, 2016, 04:03 AM
• Last activity: Jul 5, 2025, 07:38 AM
0
votes
2
answers
2079
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, pre-allocated 0 pages HugeTLB registered 64.0 KiB page size, pre-allocated 0 pages iommu: Default...
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, pre-allocated 0 pages
HugeTLB registered 64.0 KiB page size, pre-allocated 0 pages
iommu: Default domain type: Translated
iommu: DMA domain TLB invalidation policy: strict mode
SCSI subsystem initialized
EDAC MC: Ver: 3.0.0
clocksource: Switched to clocksource arch_sys_counter
workingset: timestamp_bits=62 max_order=19 bucket_order=0
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
io scheduler mq-deadline registered
cacheinfo: Unable to detect cache hierarchy for CPU 0
brd: module loaded
VFS: Mounted root (tmpfs filesystem) on device 0:15.
Freeing unused kernel memory: 704K
Run /init as init process
with arguments:
/init
with environment:
HOME=/
TERM=linux
Kernel panic - not syncing: Requested init /init failed (error -2).
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.15.0-rc7-00001-g8d7daa446b53-dirty #33
Call trace:
dump_backtrace+0x0/0x1d0
show_stack+0x14/0x20
dump_stack_lvl+0x64/0x7c
dump_stack+0x14/0x2c
panic+0x158/0x304
kernel_init+0xf0/0x150
ret_from_fork+0x10/0x20
Kernel Offset: disabled
CPU features: 0x00001001,20000802
Memory Limit: none
---[ end Kernel panic - not syncing: Requested init /init failed (error -2). ]---
I am building an embedded linux OS for an experimental FPGA platform. I used upstream U-boot(boot-loader), linux(kernel) and buildroot(just for filesystem).
I followed some examples and enabled the required initrd/initramfs support in my linux config.
CONFIG_BLK_DEV_INITRD=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=1
CONFIG_BLK_DEV_RAM_SIZE=10240
I used the bootm command in u-boot to load a FIT image that comprises of the linux kernel, dtb and the rootfs.cpio(compiled from buildroot). Relevant info here:FIT_Test
These are the bootargs passed to the kernel:
console=ttyS0,9600 earlyprintk maxcpus=1 earlycon root=/dev/ram init=/init rw rootfstype=tmpfs debug
**Note:**
Couple of other things I tried , but resulted in the same error.
- Passing the kernel,dtb and fs image separately.
- Tried a basic initramfs with just an init script , simple directory structure and a separately compiled busybox placed in /bin/busybox with symbolic links.
- Rather than passing an external FS, I passed the path to the initramfs source and compiled it into the kernel with CONFIG_INITRAMFS_SOURCE.
I would appreciate any feedback/pointers on what I could be missing, been stuck on this for while now.
rish_1n4
(1 rep)
Dec 16, 2021, 07:02 PM
• Last activity: Jul 4, 2025, 01:07 PM
4
votes
1
answers
4277
views
How to debug systemd "init" freeze during boot?
I'm trying to get my own `init` script running on [some ARM hardware](http://www.acmesystems.it/terra) and Debian Jessie with systemd. The overall boot concept and `init` script is almost identical to a x86 variant, which works fine. For both hardwares the whole SD card image is pre-built on a x86 h...
I'm trying to get my own
init
script running on [some ARM hardware](http://www.acmesystems.it/terra) and Debian Jessie with systemd. The overall boot concept and init
script is almost identical to a x86 variant, which works fine. For both hardwares the whole SD card image is pre-built on a x86 host.
When running on the ARM hardware, having **serial console access** I see that my init
script runs fine up to the point where switch_root
is called:
exec switch_root -c /dev/console /newroot /sbin/init
Nothing happens after that. No error message is printed - which makes it difficult to find the problem.
The kernel command line is...
ro root=LABEL=IM_BOOT1 panic=10 mem=256M console=ttyS0,115200 systemd.log_level=debug
...and AFAIK this should make systemd
print maximum debug messages. Unfortunately nothing is printed.
**Any idea/hint what I could do to understand what could be causing the freeze, or with other words - understand what is going on?**
----
The only strange detail are some warnings in the kernel log *before* calling switch_root
:
ext4: Unknown symbol jbd2_journal_errno (err 0)
ext4: Unknown symbol jbd2_journal_begin_ordered_truncate (err 0)
ext4: Unknown symbol jbd2_journal_flush (err 0)
ext4: Unknown symbol mb_cache_entry_find_next (err 0)
squashfs: version 4.0 (2009/01/31) Phillip Lougher
aufs 3.16-20150928
usbhid: Unknown symbol hid_output_report (err 0)
usbhid: Unknown symbol hidinput_count_leds (err 0)
usbhid: Unknown symbol hid_allocate_device (err 0)
usbhid: Unknown symbol hid_destroy_device (err 0)
usbhid: Unknown symbol hid_alloc_report_buf (err 0)
usbhid: Unknown symbol hid_set_field (err 0)
usbhid: Unknown symbol hid_check_keys_pressed (err 0)
usbhid: Unknown symbol hid_input_report (err 0)
usbhid: Unknown symbol hid_debug (err 0)
usbhid: Unknown symbol __hid_request (err 0)
usbhid: Unknown symbol hid_parse_report (err 0)
usbhid: Unknown symbol hid_add_device (err 0)
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
usb_storage: Unknown symbol scsi_report_device_reset (err 0)
usb_storage: Unknown symbol scsi_remove_host (err 0)
usb_storage: Unknown symbol scsi_report_bus_reset (err 0)
usb_storage: Unknown symbol scsi_sense_desc_find (err 0)
usb_storage: Unknown symbol scsi_eh_prep_cmnd (err 0)
usb_storage: Unknown symbol scsi_host_put (err 0)
usb_storage: Unknown symbol scsi_scan_host (err 0)
usb_storage: Unknown symbol scsi_is_host_device (err 0)
...however these modules *appear* to work fine anyway. I don't know if that is related.
Some additional details:
- Debian installation is prepared using debootstrap
(same method works perfectly with x86)
- Custom built Kernel: Linux (none) 3.16.7 #1 Mon Nov 16 08:32:55 UTC 2015 armv5tejl GNU/Linux
, patched with AUFS and hardware-specific device tree
- both Kernel and root fs are built with help of QEMU on a x86 host
- initramfs
boots with **BusyBox**, sets up the AUFS final root fs and finally invokes switch_root
. The same method (nearly 100% identical init
script) works fine on x86
- I can run an interactive shell just before running switch_root
and I can't find anything that isn't working as expected at that point
Udo G
(1143 rep)
Nov 16, 2015, 11:00 AM
• Last activity: Jul 4, 2025, 08:04 AM
1
votes
1
answers
3553
views
Raspberry 4 stuck in initramfs
im new on this site so i hope im not making myself look super stupid (beside the fact that my english isnt that best) I got myself a Raspberry Pi 4B with an 64GB SDCard of Sandisk Ultra. Installed on it is an Ubuntu server 20.04 ARM Version. It usually runs 24/7 in my local network for research and...
im new on this site so i hope im not making myself look super stupid (beside the fact that my english isnt that best)
I got myself a Raspberry Pi 4B with an 64GB SDCard of Sandisk Ultra. Installed on it is an Ubuntu server 20.04 ARM Version. It usually runs 24/7 in my local network for research and bit of education.
What happen:
After installing an Update with "Sudo apt update", "sudo apt upgrade" and finishing it with "reboot", i got stuck into initramfs.
**The only message shown is:**
ext4
Thu Jan 1 00:00:06 UTC 1970
writable:recovering journal
writable: superblock need_recovery flas is clear, but journal has data.
writable: Run journal anyway
writable: UNEXPECRED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
fsck exited with status code 4
The root filesystem on /dev/mmcblk0p2 requieres a manual fsck
BusyBox v1.30.1 (Ubuntu 1:1.30.1-6ubuntu2) built in shell (ahs)
Enter 'help'for a list of built-in commands.
(initramfs)_
**I did what it says to me and tried to run it manually with the command:**
(initramfs) fsck /dev/mmcblk0p2
fsck from util-linux 2.36.1
e2fsck 1.45.7 (28-Jan-2021)
writable: recovering journal
Superblock needs_recovery flag is clear, but journal has data.
Run journal anyway? yes
fsck.ext4: unable to set superblock flags on writable
writable: ********** WARNING: Filesystem still has errors **********
(initramfs) _
After some research i found out it were problably the sd card soo i tried to reeinstall the ubuntu server on it again.
But the sd card doesnt get wiped. not wiped in windows neither Linux. The files inside are set into read only, but trying to wipe it with sudo on an other device doesnt affect it in anyway. Trying to delete anything or make it writable on the initramfs gives me a "Permission Denied".
because all my data is already save i would like to wipe it. But im still curios why this happens because i had it twice. in the first time it got fixed easy by just reeinstalling. And this is the second time.
I hope some of u got any idea to fix it. I googled my way down and up, but didnt find anything.
sefikkaan
(11 rep)
Sep 1, 2021, 08:46 PM
• Last activity: Jul 3, 2025, 05:04 AM
3
votes
1
answers
798
views
Auto de-crypt all LUKS partitions in Debian
I use Debian Wheezy and have all partitions encrypted using LUKS, except `/boot`. I want to decrypt the partitions automatically without having to type the password in each of the 7 encrypted partitions (same for all 7). How I can do this? With cryptsetup? How do I make the hook script from initramf...
I use Debian Wheezy and have all partitions encrypted using LUKS, except
/boot
.
I want to decrypt the partitions automatically without having to type the password in each of the 7 encrypted partitions (same for all 7).
How I can do this? With cryptsetup? How do I make the hook script from initramfs?
/boot: No crypt
/: crypt
/home: crypt
I need to decrypt /
and /home
in initramfs in Debian.
Alfredo Pons Menargues
(499 rep)
Feb 18, 2014, 02:21 PM
• Last activity: Jun 30, 2025, 01:41 PM
1
votes
0
answers
53
views
Zerotier in initramfs
Currently, I use Zerotier to combine SSH on Debian 12 successfully and reliability. The server is encrypted FDE cryptsetup/LUKS2 and requires a password after each restart. I would like to use `dropbear-initramfs` for remotely introducing the password, but I also need that Zerotier also starts in in...
Currently, I use Zerotier to combine SSH on Debian 12 successfully and reliability.
The server is encrypted FDE cryptsetup/LUKS2 and requires a password after each restart.
I would like to use
dropbear-initramfs
for remotely introducing the password, but I also need that Zerotier also starts in initramfs (before Dropbear), because the home server does not have a public IP.
How to add Zerotier to Initramfs?
DarekH
(157 rep)
Jun 24, 2025, 07:13 PM
3
votes
1
answers
2322
views
Linux Mint: Error! Your kernel headers for kernel 4.4.0-38-generic cannot be found
After several attempts to fix the issue by myself I've decided to post here, basically everytime I'm running an upgrade I received this error message: fabrizio@fabrix ~ $ sudo apt-get upgrade Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade...
After several attempts to fix the issue by myself I've decided to post here, basically everytime I'm running an upgrade I received this error message:
fabrizio@fabrix ~ $ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up initramfs-tools (0.125) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-4.4.0-38-generic (4.4.0-38.57) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-4.4.0-38-generic
vmlinuz(/boot/vmlinuz-4.4.0-38-generic
) points to /boot/vmlinuz-4.4.0-38-generic
(/boot/vmlinuz-4.4.0-38-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-4.4.0-38-generic.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-38-generic /boot/vmlinuz-4.4.0-38-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.4.0-38-generic /boot/vmlinuz-4.4.0-38-generic
Error! echo
Your kernel headers for kernel 4.4.0-38-generic cannot be found at
/lib/modules/4.4.0-38-generic/build or /lib/modules/4.4.0-38-generic/source.
Error! echo
Your kernel headers for kernel 4.4.0-38-generic cannot be found at
/lib/modules/4.4.0-38-generic/build or /lib/modules/4.4.0-38-generic/source.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-38-generic /boot/vmlinuz-4.4.0-38-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-38-generic
E: busybox or busybox-static, version 1:1.22.0-17~ or later, is required but not installed
update-initramfs: failed for /boot/initrd.img-4.4.0-38-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-4.4.0-38-generic.postinst line 1052.
dpkg: error processing package linux-image-4.4.0-38-generic (--configure):
subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-38-generic:
linux-image-extra-4.4.0-38-generic depends on linux-image-4.4.0-38-generic; however:
Package linux-image-4.4.0-38-generic is not configured yet.
dpkg: error processing package linux-image-extra-4.4.0-38-generic (--configure):
dependency problems - leaving unconfigured
Processing triggers for initramfs-tools (0.125) ...
update-initramfs: Generating /boot/initrd.img-4.4.0-21-generic
E: busybox or busybox-static, version 1:1.22.0-17~ or later, is required but not installed
update-initramfs: failed for /boot/initrd.img-4.4.0-21-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
linux-image-4.4.0-38-generic
linux-image-extra-4.4.0-38-generic
initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
I tried to look for similar error and I tried to remove the kernel, to upgrade initramfs and other operations without success, can you point me to right direction?
fabrizio@fabrix ~ $ df -h
Filesystem Size Used Avail Use% Mounted on
udev 3.7G 0 3.7G 0% /dev
tmpfs 759M 9.5M 750M 2% /run
/dev/sda1 286G 25G 248G 9% /
tmpfs 3.8G 9.0M 3.7G 1% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 3.8G 0 3.8G 0% /sys/fs/cgroup
cgmfs 100K 0 100K 0% /run/cgmanager/fs
tmpfs 759M 32K 759M 1% /run/user/1000
fabrizio@fabrix ~ $ df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
udev 965757 531 965226 1% /dev
tmpfs 970893 813 970080 1% /run
/dev/sda1 19038208 500395 18537813 3% /
tmpfs 970893 30 970863 1% /dev/shm
tmpfs 970893 6 970887 1% /run/lock
tmpfs 970893 18 970875 1% /sys/fs/cgroup
cgmfs 970893 14 970879 1% /run/cgmanager/fs
tmpfs 970893 20 970873 1% /run/user/1000
fabrizio@fabrix ~ $ sudo apt-get install busybox busybox-static
Reading package lists... Done
Building dependency tree
Reading state information... Done
busybox-static is already the newest version (1:1.22.0-19ubuntu2).
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
busybox : Conflicts: busybox-static but 1:1.22.0-19ubuntu2 is to be installed
busybox-static : Conflicts: busybox
E: Unable to correct problems, you have held broken packages.
fdicarlo
(131 rep)
Oct 25, 2016, 04:24 PM
• Last activity: Jun 24, 2025, 03:00 PM
1
votes
2
answers
3175
views
How to manually get initramfs prompt at boot
I'm trying to get an initramfs prompt at boot because I have no USB drives or anything that I can use, and I need to use `fsck` on my `/dev/sda`, but that's obviously not allowed while it's mounted. It's not bad enough that I get the prompt, but it still appears to fix a few things every once in a w...
I'm trying to get an initramfs prompt at boot because I have no USB drives or anything that I can use, and I need to use
**How can I stop or pause the boot process, on Arch Linux, to get an initramfs prompt?**
(I'm sorry if this isn't possible on Arch, I'm coming from Debian)
fsck
on my /dev/sda
, but that's obviously not allowed while it's mounted. It's not bad enough that I get the prompt, but it still appears to fix a few things every once in a while at boot.
So my question boils down to:**How can I stop or pause the boot process, on Arch Linux, to get an initramfs prompt?**
(I'm sorry if this isn't possible on Arch, I'm coming from Debian)
kel5isgod
(11 rep)
Oct 15, 2020, 10:02 AM
• Last activity: Jun 20, 2025, 12:04 PM
0
votes
1
answers
37
views
RHEL8 dracut initramfs switch-root hanging on one machine and not others
I have a 2TB external SSD connected to a server. Using the server, I booted into the RHEL8 installer and successfully installed onto the external drive, however during the post-install reboot (and all reboot attempts after) the boot hangs at the switch-root step. Obviously the drive is recognized by...
I have a 2TB external SSD connected to a server. Using the server, I booted into the RHEL8 installer and successfully installed onto the external drive, however during the post-install reboot (and all reboot attempts after) the boot hangs at the switch-root step. Obviously the drive is recognized by the system and is able to provide the bootloader / initramfs, but dracut/systemd seems to just hit a hard stop when switching to /sysroot using the slash partition on the drive (non-llvm ext4 formatted).
The interesting thing is several machines (laptops, desktops) will successfully boot from the drive into the OS, indicating the server chipset/usb bus is the cause. Unfortunately, I am stuck with the server (a Gigabyte... didn't realize they made more than boards) and the external drive (a Kanguru UltraLock SSD).
Kanguru claims there are no drivers required for their drive, which makes sense. Also, I have not attempted to update/flash the UEFI on the server. I've avoided it for fear of making things worse.
I did try adding a short delay in a pre-mount-hooked dracut script within the initramfs, thinking it might be a race condition of some sort, but it had no effect. That script also does an
ls /dev/disk/by-uuid
which shows the drives and partitions as they should be (i.e. the root=UUID:..
in the kernelopts matches the partition in the list).
Anything obvious I'm missing?
Update:
I realized that I actually used a PXE kickstart to install the OS because I was unable to boot into the RHEL8 installer using my thumbdrive USB stick. Initially I thought the issue was my stick (old USB2 SanDisk), so I switched to my PXE server on my laptop. I just tested a theory now and was able to boot into System Rescue (CD) on that same USB stick that did not work with the RHEL8 installer. System Rescue CD uses the typical embedded busybox boot approach, which seems to point to a dracut issue in RHEL with regard to the server's hardware or USB connections?
Thanks in advance!
devopsdinosaur
(1 rep)
Jun 13, 2025, 06:42 PM
• Last activity: Jun 17, 2025, 02:00 PM
1
votes
1
answers
1243
views
Unable to mount encrypted ZFS filesystem after reboot
```none Key load error: Failed to open key material file: Input/Output Error. Command: `mount -o zfsutil -t zfs rpool/ROOT/ubuntu_uy913 /root/`. Message: `zfs_mount_at() failed: encryption key not loaded`. `zfs_mount_at() failed: encryption key not loaded`. Mounting `rpool/ROOT/ubuntu_uy913` on `/ro...
Key load error: Failed to open key material file: Input/Output Error.
Command: mount -o zfsutil -t zfs rpool/ROOT/ubuntu_uy913 /root/
.
Message: zfs_mount_at() failed: encryption key not loaded
.
zfs_mount_at() failed: encryption key not loaded
.
Mounting rpool/ROOT/ubuntu_uy913
on /root/
failed: Permission denied.
Error: 2.
Failed to mount rpool/ROOT/ubuntu_uy913
on /root/
.
Please manually mount the filesystem and exit.
BusyBox v1.30.1 (Ubuntu 1:1.30.1-7ubuntu2) built-in shell (ash).
Enter 'help' for a list of built-in commands.
(initramfs):
Hello everyone, after turning off my machine, when I tried to turn it back on and entered my passphrase, this is what I encountered. Now I'm quite upset because I'm not sure what the issues are.
MoonMiddays
(41 rep)
Jul 13, 2024, 05:55 AM
• Last activity: Jun 8, 2025, 12:22 PM
0
votes
1
answers
344
views
ZFS error for load-key
I've tried everything I know until I'm exhausted. Please, if you can help me, I need to access my project stored on my hard drive. The command I used: ``` sudo zfs load-key rpool/ROOT/ubuntu_uy913x ``` And the error message I received: ``` Key load error: Keys must be loaded for encryption root of '...
I've tried everything I know until I'm exhausted. Please, if you can help me, I need to access my project stored on my hard drive.
The command I used:
sudo zfs load-key rpool/ROOT/ubuntu_uy913x
And the error message I received:
Key load error: Keys must be loaded for encryption root of 'rpool/ROOT/ubuntu_uy913x' (rpool).
MoonMiddays
(41 rep)
Jul 13, 2024, 11:13 AM
• Last activity: Jun 7, 2025, 02:36 PM
0
votes
1
answers
2526
views
Unable to fully install `initramfs-tools` on debian 12 with additional harddisk errors
I am receiving errors/warnings every time the linux kernel is being updated, which has been concerning. It says that `initramfs-tools` is only partially downloaded and that I don't have any space left. ```text 1 not fully installed or removed. After this operation, 0 B of additional disk space will...
I am receiving errors/warnings every time the linux kernel is being updated, which has been concerning. It says that
* I have ran
initramfs-tools
is only partially downloaded and that I don't have any space left.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up initramfs-tools (0.142) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for libc-bin (2.36-9+deb12u3) ...
Processing triggers for initramfs-tools (0.142) ...
update-initramfs: Generating /boot/initrd.img-6.1.0-13-amd64
zstd: error 70 : Write error : cannot write block : No space left on device
E: mkinitramfs failure zstd -q -9 -T0 70
update-initramfs: failed for /boot/initrd.img-6.1.0-13-amd64 with 1.
dpkg: error processing package initramfs-tools (--configure):
installed initramfs-tools package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
Setting up initramfs-tools (0.142) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.142) ...
update-initramfs: Generating /boot/initrd.img-6.1.0-13-amd64
zstd: error 70 : Write error : cannot write block : No space left on device
E: mkinitramfs failure zstd -q -9 -T0 70
update-initramfs: failed for /boot/initrd.img-6.1.0-13-amd64 with 1.
dpkg: error processing package initramfs-tools (--configure):
installed initramfs-tools package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
initramfs-tools
* I checked my boot partition and I have only used 82%, leaving me 42MB of space available, which should be more than enough.
* I have been getting these errors since I have updated from Debian 11 (buster) to Debian 12 (bookworm). My current kernel is 6.1.0-13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.55-1 (2023-09-29) x86_64 GNU/Linux
. Ever since the update I have been also getting "Hard disk Health Warnings" as one can see from the image below popping up now and then, which I don't know whether it has a relation to this issue or not.

smartctl
tests on the relevant partitions, but they all pass the test and I haven't had any issues so far...
Another thing I should probably mention, is that every since the upgrade to bookworm, whenever there was a kernel update, I needed to remove the second oldest kernels manually, which I never needed to do before in Buster. For this I run (as root) the commands
-shell
apt-get autoremove
apt-get autoclean
and then of course
-shell
update-initramfs
update-grub
Now, since having the issue with initramfs-tools
after running update-grub
I get the following error.
Generating grub configuration file ...
Found background image: .background_cache.png
Found linux image: /boot/vmlinuz-6.1.0-13-amd64
Found initrd image: /boot/initrd.img-6.1.0-13-amd64
Found linux image: /boot/vmlinuz-6.1.0-12-amd64
Found initrd image: /boot/initrd.img-6.1.0-12-amd64
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
done
I am quite concerned since this problems are regarding my boot partition and linux-kernels. Does anyone know a fix? And are the Hard disk warnings a related issue I should be concerned about?
tobibox
(1 rep)
Oct 12, 2023, 03:34 PM
• Last activity: Jun 5, 2025, 12:09 PM
4
votes
5
answers
18022
views
Kernel cannot find init in initramfs image
I'm trying to get my embedded system to run an initramfs. Right now 'init' in this initramfs does nothing but echo a message to test if it is being ran. My init script: #!/bin/sh echo "HELLO INITRAMFS" My initramfs cpio file contains busybox statically linked. 'init' is located at /init in the files...
I'm trying to get my embedded system to run an initramfs. Right now 'init' in this initramfs does nothing but echo a message to test if it is being ran.
My init script:
#!/bin/sh
echo "HELLO INITRAMFS"
My initramfs cpio file contains busybox statically linked. 'init' is located at /init in the filesystem. I first create the cpio archive and then convert it for u-boot.
(find initramfs-test |cpio -o -H newc --quiet) > initramfs.cpio
mkimage -A arm -a 80008000 -e 80008000 -T ramdisk -C none -n uInitrd -d initramfs.cpio ./uInitrd
Placing this uInitrd file with my kernel in a fat partition on an SD card and booting to the u-boot prompt I load both files into memory, set my bootargs and boot.
RIM-U-Boot# fatload mmc 0 0x81000000 uImage
reading uImage
4024775 bytes read in 415 ms (9.2 MiB/s)
RIM-U-Boot# fatload mmc 0 0x85000000 uInitrd
reading uInitrd
1410112 bytes read in 148 ms (9.1 MiB/s)
RIM-U-Boot# setenv bootargs console=${console} root=/dev/ram0 rootfstype=ramfs initrd=0x85000000
RIM-U-Boot# bootm 0x81000000 0x85000000
## Booting kernel from Legacy Image at 81000000 ...
Image Name: Linux 4.1 + Devicetree
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4024711 Bytes = 3.8 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 85000000 ...
Image Name: uInitrd
Image Type: ARM Linux RAMDisk Image (uncompressed)
Data Size: 1410048 Bytes = 1.3 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 4.1.18-ts-armv7l-crown-1.0 (mjohn@vbox) (gcc version 4.8.3 (Timesys 20161024) ) #1 SMP Tue Nov 13 16:40:10 EST 2018
[ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine model: Crown RIM
[ 0.000000] cma: Reserved 16 MiB at 0x86800000
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] CPU: All CPU(s) started in SVC mode.
[ 0.000000] AM335X ES2.1 (neon )
[ 0.000000] PERCPU: Embedded 13 pages/cpu @c7c77000 s23296 r8192 d21760 u53248
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 31968
[ 0.000000] Kernel command line: console=ttyO3,115200n8 root=/dev/ram0 rootfstype=ramfs initrd=0x85000000
[ 0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Memory: 91580K/129024K available (7192K kernel code, 871K rwdata, 2580K rodata, 464K init, 8225K bss, 21060K reserved, 16384K cma-reserved, 0K highmem)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xc8800000 - 0xff000000 ( 872 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc8000000 ( 128 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc09935f0 (9774 kB)
[ 0.000000] .init : 0xc0994000 - 0xc0a08000 ( 464 kB)
[ 0.000000] .data : 0xc0a08000 - 0xc0ae1fd0 ( 872 kB)
[ 0.000000] .bss : 0xc0ae4000 - 0xc12ec688 (8226 kB)
[ 0.000000] Running RCU self tests
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] RCU lockdep checking is enabled.
[ 0.000000] Additional per-CPU info printed with stalls.
[ 0.000000] RCU restricting CPUs from NR_CPUS=2 to nr_cpu_ids=1.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS:16 nr_irqs:16 16
[ 0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
[ 0.000000] OMAP clockevent source: timer2 at 24000000 Hz
[ 0.000021] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[ 0.000052] clocksource timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000118] OMAP clocksource: timer1 at 24000000 Hz
[ 0.001261] Console: colour dummy device 80x30
[ 0.001339] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
[ 0.001352] ... MAX_LOCKDEP_SUBCLASSES: 8
[ 0.001363] ... MAX_LOCK_DEPTH: 48
[ 0.001373] ... MAX_LOCKDEP_KEYS: 8191
[ 0.001384] ... CLASSHASH_SIZE: 4096
[ 0.001393] ... MAX_LOCKDEP_ENTRIES: 32768
[ 0.001404] ... MAX_LOCKDEP_CHAINS: 65536
[ 0.001414] ... CHAINHASH_SIZE: 32768
[ 0.001424] memory used by lock dependency info: 5167 kB
[ 0.001435] per task-struct memory footprint: 1152 bytes
[ 0.001466] Calibrating delay loop... 718.02 BogoMIPS (lpj=3590144)
[ 0.108307] pid_max: default: 32768 minimum: 301
[ 0.108753] Security Framework initialized
[ 0.109015] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.109041] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.113214] Initializing cgroup subsys blkio
[ 0.113271] Initializing cgroup subsys memory
[ 0.113392] Initializing cgroup subsys devices
[ 0.113510] Initializing cgroup subsys freezer
[ 0.113689] Initializing cgroup subsys perf_event
[ 0.113771] CPU: Testing write buffer coherency: ok
[ 0.115776] CPU0: thread -1, cpu 0, socket -1, mpidr 0
[ 0.115920] Setting up static identity map for 0x80008280 - 0x800082f0
[ 0.126396] Brought up 1 CPUs
[ 0.126434] SMP: Total of 1 processors activated (718.02 BogoMIPS).
[ 0.126448] CPU: All CPU(s) started in SVC mode.
[ 0.131751] devtmpfs: initialized
[ 0.178685] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[ 0.251639] omap_hwmod: debugss: _wait_target_disable failed
[ 0.308946] clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.312216] pinctrl core: initialized pinctrl subsystem
[ 0.319501] NET: Registered protocol family 16
[ 0.327296] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.330401] cpuidle: using governor ladder
[ 0.330444] cpuidle: using governor menu
[ 0.347621] OMAP GPIO hardware version 0.1
[ 0.379407] omap-gpmc 50000000.gpmc: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_nandflash_pins, deferring probe
[ 0.384981] No ATAGs?
[ 0.385022] hw-breakpoint: debug architecture 0x4 unsupported.
[ 0.385802] omap4_sram_init:Unable to allocate sram needed to handle errata I688
[ 0.385826] omap4_sram_init:Unable to get sram pool needed to handle errata I688
[ 0.446811] edma 49000000.edma: TI EDMA DMA engine driver
[ 0.449438] reg-fixed-voltage fixedregulator@1: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_wl12xx_gpio, deferring probe
[ 0.453649] SCSI subsystem initialized
[ 0.455728] usbcore: registered new interface driver usbfs
[ 0.455982] usbcore: registered new interface driver hub
[ 0.456188] usbcore: registered new device driver usb
[ 0.479540] tps65910 0-002d: No interrupt support, no core IRQ
[ 0.614304] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 100 kHz
[ 0.615013] pps_core: LinuxPPS API ver. 1 registered
[ 0.615032] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti
[ 0.615109] PTP clock support registered
[ 0.620004] Bluetooth: Core ver 2.20
[ 0.620170] NET: Registered protocol family 31
[ 0.620185] Bluetooth: HCI device and connection manager initialized
[ 0.620332] Bluetooth: HCI socket layer initialized
[ 0.620370] Bluetooth: L2CAP socket layer initialized
[ 0.620592] Bluetooth: SCO socket layer initialized
[ 0.624095] Switched to clocksource timer1
[ 0.820693] NET: Registered protocol family 2
[ 0.823356] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.823542] TCP bind hash table entries: 1024 (order: 3, 36864 bytes)
[ 0.824172] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.824497] UDP hash table entries: 256 (order: 2, 20480 bytes)
[ 0.824757] UDP-Lite hash table entries: 256 (order: 2, 20480 bytes)
[ 0.825968] NET: Registered protocol family 1
[ 0.828351] RPC: Registered named UNIX socket transport module.
[ 0.828381] RPC: Registered udp transport module.
[ 0.828394] RPC: Registered tcp transport module.
[ 0.828407] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.831337] CPU PMU: Failed to parse /pmu/interrupt-affinity
[ 0.831463] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
[ 0.838002] futex hash table entries: 256 (order: 2, 16384 bytes)
[ 0.838313] audit: initializing netlink subsys (disabled)
[ 0.838639] audit: type=2000 audit(0.830:1): initialized
[ 0.845262] VFS: Disk quotas dquot_6.6.0
[ 0.845456] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 0.847891] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.849171] NFS: Registering the id_resolver key type
[ 0.849744] Key type id_resolver registered
[ 0.849764] Key type id_legacy registered
[ 0.860204] io scheduler noop registered
[ 0.860252] io scheduler deadline registered
[ 0.860327] io scheduler cfq registered (default)
[ 0.863209] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
[ 0.867560] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 0.876098] omap_uart 44e09000.serial: no wakeirq for uart0
[ 0.877001] 44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 158, base_baud = 3000000) is a OMAP UART0
[ 0.879864] omap_uart 48022000.serial: no wakeirq for uart1
[ 0.880322] 48022000.serial: ttyO1 at MMIO 0x48022000 (irq = 159, base_baud = 3000000) is a OMAP UART1
[ 0.882065] omap_uart 481a6000.serial: no wakeirq for uart3
[ 0.882510] 481a6000.serial: ttyO3 at MMIO 0x481a6000 (irq = 160, base_baud = 3000000) is a OMAP UART3
[ 1.699898] console [ttyO3] enabled
[ 1.705757] omap_uart 481aa000.serial: no wakeirq for uart5
[ 1.712068] 481aa000.serial: ttyO5 at MMIO 0x481aa000 (irq = 161, base_baud = 3000000) is a OMAP UART5
[ 1.760738] brd: module loaded
[ 1.785830] loop: module loaded
[ 1.789963] (stk) :sysfs entries created
[ 1.800178] mtdoops: mtd device (mtddev=name/number) must be supplied
[ 1.874092] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
[ 1.880499] davinci_mdio 4a101000.mdio: detected phy mask fffffff5
[ 1.894287] libphy: 4a101000.mdio: probed
[ 1.898524] davinci_mdio 4a101000.mdio: phy[1] : device 4a101000.mdio:01, driver unknown
[ 1.906962] davinci_mdio 4a101000.mdio: phy: device 4a101000.mdio:03, driver unknown
[ 1.917029] cpsw 4a100000.ethernet: Detected MACID = d0:ff:50:ab:2d:b7
[ 1.927796] PPP generic driver version 2.4.2
[ 1.933714] PPP BSD Compression module registered
[ 1.938845] PPP Deflate Compression module registered
[ 1.945366] usbcore: registered new interface driver cdc_acm
[ 1.951296] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[ 1.959997] usbcore: registered new interface driver usb-storage
[ 1.970707] 47401300.usb-phy supply vcc not found, using dummy regulator
[ 1.983582] musb-hdrc musb-hdrc.0.auto: Failed to request rx1.
[ 1.990461] musb-hdrc musb-hdrc.0.auto: musb_init_controller failed with status -517
[ 2.000788] 47401b00.usb-phy supply vcc not found, using dummy regulator
[ 2.012019] musb-hdrc musb-hdrc.1.auto: Failed to request rx1.
[ 2.018436] musb-hdrc musb-hdrc.1.auto: musb_init_controller failed with status -517
[ 2.055667] mousedev: PS/2 mouse device common for all mice
[ 2.062865] i2c /dev entries driver
[ 2.072753] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[ 2.082969] omap_hsmmc 48060000.mmc: Got CD GPIO
[ 2.089408] vmmc: supplied by vbat
[ 2.139221] ledtrig-cpu: registered to indicate activity on CPUs
[ 2.147462] oprofile: using arm/armv7
[ 2.151464] Netfilter messages via NETLINK v0.30.
[ 2.157069] nf_conntrack version 0.5.0 (1686 buckets, 6744 max)
[ 2.164144] ctnetlink v0.93: registering with nfnetlink.
[ 2.170652] ipip: IPv4 over IPv4 tunneling driver
[ 2.179323] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 2.185436] arp_tables: (C) 2002 David S. Miller
[ 2.190642] Initializing XFRM netlink socket
[ 2.195447] NET: Registered protocol family 17
[ 2.200200] NET: Registered protocol family 15
[ 2.207048] Bluetooth: RFCOMM TTY layer initialized
[ 2.212284] Bluetooth: RFCOMM socket layer initialized
[ 2.217831] Bluetooth: RFCOMM ver 1.11
[ 2.221818] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 2.227427] Bluetooth: BNEP filters: protocol multicast
[ 2.232927] Bluetooth: BNEP socket layer initialized
[ 2.238179] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[ 2.244432] Bluetooth: HIDP socket layer initialized
[ 2.249798] BT WLAN Gpio value is :10
[ 2.254432] WD Enable Gpio value is :114
[ 2.258976] WD Tick Gpio value is :115
[ 2.263340] BT_WLAN Gpio value is :10
[ 2.267239] WL1271: BT/WLAN Enable
[ 2.284032] Voltage translator init complete
[ 2.302427] mmc0: host does not support reading read-only switch, assuming write-enable
[ 2.310942] WD: Enable
[ 2.313464] WD: TICK
[ 2.317180] Key type dns_resolver registered
[ 2.322818] omap_voltage_late_init: Voltage driver support not added
[ 2.329621] sr_dev_init: No voltage domain specified for smartreflex0. Cannot initialize
[ 2.338138] sr_dev_init: No voltage domain specified for smartreflex1. Cannot initialize
[ 2.348688] ThumbEE CPU extension supported.
[ 2.353214] Registering SWP/SWPB emulation handler
[ 2.358356] SmartReflex Class3 initialized
[ 2.364460] mmc0: new high speed SDHC card at address 0001
[ 2.373404] mmcblk0: mmc0:0001 SD32G 29.3 GiB
[ 2.384627] mmcblk0: p1 p2
[ 2.399807] omap-gpmc 50000000.gpmc: GPMC revision 6.0
[ 2.405715] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
[ 2.416508] nand: device found, Manufacturer ID: 0x01, Chip ID: 0xf1
[ 2.423165] nand: AMD/Spansion S34ML01G2
[ 2.427383] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[ 2.435458] nand: using OMAP_ECC_BCH4_CODE_HW ECC scheme
[ 2.441305] 8 ofpart partitions found on MTD device 8000000.nand
[ 2.447640] Creating 8 MTD partitions on "8000000.nand":
[ 2.453212] 0x000000000000-0x000000020000 : "SPL"
[ 2.467798] 0x000000020000-0x000000040000 : "SPL.backup1"
[ 2.478062] 0x000000040000-0x000000060000 : "SPL.backup2"
[ 2.488203] 0x000000060000-0x000000080000 : "SPL.backup3"
[ 2.498676] 0x000000080000-0x000000260000 : "U-Boot"
[ 2.508970] 0x000000260000-0x000000280000 : "U-Boot Env"
[ 2.518872] 0x000000280000-0x000000780000 : "Kernel"
[ 2.531256] 0x000000780000-0x000008000000 : "File System"
[ 2.610135] musb-hdrc musb-hdrc.0.auto: MUSB HDRC host driver
[ 2.617210] musb-hdrc musb-hdrc.0.auto: new USB bus registered, assigned bus number 1
[ 2.628376] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 2.635588] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 2.643149] usb usb1: Product: MUSB HDRC host driver
[ 2.648380] usb usb1: Manufacturer: Linux 4.1.18-ts-armv7l-crown-1.0 musb-hcd
[ 2.655881] usb usb1: SerialNumber: musb-hdrc.0.auto
[ 2.667430] hub 1-0:1.0: USB hub found
[ 2.672216] hub 1-0:1.0: 1 port detected
[ 2.692454] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 2.698661] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 2
[ 2.708020] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[ 2.715198] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 2.722758] usb usb2: Product: MUSB HDRC host driver
[ 2.727986] usb usb2: Manufacturer: Linux 4.1.18-ts-armv7l-crown-1.0 musb-hcd
[ 2.735499] usb usb2: SerialNumber: musb-hdrc.1.auto
[ 2.743553] hub 2-0:1.0: USB hub found
[ 2.747851] hub 2-0:1.0: 1 port detected
[ 2.877465] hctosys: unable to open rtc device (rtc0)
[ 2.882786] sr_init: No PMIC hook to init smartreflex
[ 2.888543] sr_init: platform driver register failed for SR
[ 2.930249] VFS: Mounted root (ramfs filesystem) readonly on device 0:15.
[ 2.937980] devtmpfs: error mounting -2
[ 2.943047] Freeing unused kernel memory: 464K (c0994000 - c0a08000)
[ 2.950460] Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
[ 2.964386] ---[ end Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
[ 79.333959] random: nonblocking pool is initialized
As you can see the kernel can not find init in the initramfs. Any idea on why?
Kernel is 4.1.18 and u-boot is 2013.09.
Thanks
**Edit:**
**Reply to jc__ questions:**
1.
No, no kernel switches in the device tree
2.
I've tried setting
initrd=/dev/ram0
and I get the same error.
I've also tried specifying the init as init=/init
and see the following error:
[ 2.953050] Freeing unused kernel memory: 464K (c0994000 - c0a08000)
[ 2.960261] Kernel panic - not syncing: Requested init /init failed (error -2).
[ 2.968092] --- end Kernel panic - not syncing: Requested init /init failed (error -2).
3.
I'm using a cpio file, so initramfs, but I'm trying to load it separately (not a part of the kernel image) and I'm not sure if an initramfs can work that way. [Something I found made it sound like this is possible.
My initramfs.cpio filesystem contains a /dev
.
These modules are currently built into the kernel.
4.
I'm not including a initramfs in the kernel image, so it should only include the default.
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=16384
5.
I could include it in my kernel, but it would require addition work. The kernel is built by the Timesys Factory build system, and the initramfs.cpio is built later on.
**Reply to sourcejedi**
I tried changing it to this:
# setenv bootargs console=${console} root=/dev/ram0 init=/init
And get:
[ 2.882766] sr_init: No PMIC hook to init smartreflex
[ 2.888519] sr_init: platform driver register failed for SR
[ 2.930847] omap_hsmmc 481d8000.mmc: card claims to support voltages below defined range
[ 2.946830] List of all partitions:
[ 2.950696] 0100 16384 ram0 (driver?)
[ 2.955763] 0101 16384 ram1 (driver?)
[ 2.960639] 0102 16384 ram2 (driver?)
[ 2.965564] 0103 16384 ram3 (driver?)
[ 2.970442] 0104 16384 ram4 (driver?)
[ 2.975364] 0105 16384 ram5 (driver?)
[ 2.980239] 0106 16384 ram6 (driver?)
[ 2.985153] 0107 16384 ram7 (driver?)
[ 2.990029] 0108 16384 ram8 (driver?)
[ 2.994937] 0109 16384 ram9 (driver?)
[ 2.999791] 010a 16384 ram10 (driver?)
[ 3.004781] 010b 16384 ram11 (driver?)
[ 3.009725] 010c 16384 ram12 (driver?)
[ 3.014700] 010d 16384 ram13 (driver?)
[ 3.019642] 010e 16384 ram14 (driver?)
[ 3.024616] 010f 16384 ram15 (driver?)
[ 3.029577] b300 30707712 mmcblk0 driver: mmcblk
[ 3.035191] b301 9216 mmcblk0p1 00011b5e-01
[ 3.040769] b302 440320 mmcblk0p2 00011b5e-02
[ 3.046421] 1f00 128 mtdblock0 (driver?)
[ 3.051727] 1f01 128 mtdblock1 (driver?)
[ 3.057074] 1f02 128 mtdblock2 (driver?)
[ 3.062380] 1f03 128 mtdblock3 (driver?)
[ 3.067723] 1f04 1920 mtdblock4 (driver?)
[ 3.073030] 1f05 128 mtdblock5 (driver?)
[ 3.078369] 1f06 5120 mtdblock6 (driver?)
[ 3.083676] 1f07 123392 mtdblock7 (driver?)
[ 3.089006] No filesystem could mount root, tried: ext3 ext2 ext4 cramfs squashfs vfat msdos
[ 3.098220] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)
[ 3.107068] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)
Same thing if I change it to:
# setenv bootargs console=${console} root=/dev/ram0 initrd=/dev/ram0 init=/init
**Edit2:**
Tried:
# setenv bootargs console=${console} root=/dev/ram0 initrd=0x85000000,2M
And see the same error except I now get
[ 2.978095] RAMDISK: Couldn't find valid RAM disk image starting at 0.
[ 2.992086] List of all partitions:
[ 2.996226] 0100 16384 ram0 (driver?)
[ 3.001097] 0101 16384 ram1 (driver?)
[ 3.006041] 0102 16384 ram2 (driver?)
[ 3.010895] 0103 16384 ram3 (driver?)
Seems like the kernel doesn't see the initramfs at /dev/ram0
. Could this be wrong. When u-boot loads the uImage and uInitrd to memory how is /dev/ram0
tied to that address, 0x85000000?
**Edit 3:**
I've built my initramfs.cpio in my kernel and I'm able to see my echo message. So my initramfs is valid, just not sure what I have wrong while trying to load it externally.
dangeroushobo
(707 rep)
Nov 15, 2018, 04:18 PM
• Last activity: May 30, 2025, 08:06 AM
Showing page 1 of 20 total questions