Skip to contentSkip to conversation

initramfs can't find root filesystem device

DISCUSSION Baeten, M.J.J. (Max) 3 participants 4 messages Oct 18, 2023

lore
Share & tools
lore
#0 lore raw

Hello!

After compiling a xenomai 3.2.1 patched kernel the initramfs can't boot this kernel because it can't find the root filesystem device.

Error:
Gave up waiting for root file system device. Common problems:
- Boot args (cat /proc/cmdline)
- Check rootdelay= (did the system wait long enough?)
- Missing modules (cat /proc/modules; ls /dev) ALERT! /dev/mapper/ubuntu-vg-ubuntu-lv does not exist.

When I compile the same kernel sources without xenomai patch it works.

My .config is included and a screenshot of the error as well.
Cat /proc/modules = empty
Cat /proc/cmdline = BOOT_IMAGE=/vmlinuz-5.4.253-xeno-3.2.1 root=/dev/mapper/ubuntu--vg

I have tried on two systems with different ubuntu versions, kernels and xenomai patches. Ubuntu is installed with LVM but I tried as well without LVM. (Similar error: UUID does not exist)

# Config FOR UBUNTU 18.04
KERNEL_VERSION="4.19.66"
XENO_VERSION="3.2.1"
XENO_PATCH="ipipe-core-4.19.66-x86-6.patch"

# UBUNTU SRV 20.04
KERNEL_VERSION="5.4.253"
XENO_VERSION="3.2.1"
XENO_PATCH="ipipe-core-5.4.253-x86-14.patch"

Any ideas on what I am doing wrong or how I can debug this problem?

Kind regards,
Max Baeten

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.

#1 lore raw
Quoted 30 lines · M.J.J. (Max)

Hello!

After compiling a xenomai 3.2.1 patched kernel the initramfs can’t boot this kernel because it can’t find the root filesystem device.

Error:
Gave up waiting for root file system device. Common problems:
- Boot args (cat /proc/cmdline)
   - Check rootdelay= (did the system wait long enough?)
- Missing modules (cat /proc/modules; ls /dev) ALERT! /dev/mapper/ubuntu-vg-ubuntu—lv does not exist.

When I compile the same kernel sources without xenomai patch it works.

My .config is included and a screenshot of the error as well. Cat /proc/modules = empty
Cat /proc/cmdline = BOOT_IMAGE=/vmlinuz-5.4.253-xeno-3.2.1 root=/dev/mapper/ubuntu--vg

I have tried on two systems with different ubuntu versions, kernels and xenomai patches.

Ubuntu is installed with LVM but I tried as well without LVM. (Similar
error: UUID does not exist)

# Config FOR UBUNTU 18.04
KERNEL_VERSION="4.19.66"
XENO_VERSION="3.2.1"
XENO_PATCH="ipipe-core-4.19.66-x86-6.patch"

Quoted 7 lines

# UBUNTU SRV 20.04
KERNEL_VERSION="5.4.253"
XENO_VERSION="3.2.1"
XENO_PATCH="ipipe-core-5.4.253-x86-14.patch"

Any ideas on what I am doing wrong or how I can debug this problem?

Compare the kernel .configs, of your distro and your custom xenomai kernel. The latter likely lacks some features around CONFIG_MD*.

Another reason can be that your initrd contains modules for the wrong kernel.

Jan

Signature · 2 lines
Siemens AG, Technology
Linux Expert Center
#2 lore raw
In reply to Baeten, M.J.J. (Max)
Quoted 26 lines · M.J.J. (Max)

Hello!

After compiling a xenomai 3.2.1 patched kernel the initramfs can’t boot this kernel because it can’t find the root filesystem device.
Error:
Gave up waiting for root file system device. Common problems:
- Boot args (cat /proc/cmdline)
   - Check rootdelay= (did the system wait long enough?)
- Missing modules (cat /proc/modules; ls /dev)
ALERT! /dev/mapper/ubuntu-vg-ubuntu—lv does not exist.

When I compile the same kernel sources without xenomai patch it works.

My .config is included and a screenshot of the error as well.
Cat /proc/modules = empty
Cat /proc/cmdline = BOOT_IMAGE=/vmlinuz-5.4.253-xeno-3.2.1 root=/dev/mapper/ubuntu--vg

I have tried on two systems with different ubuntu versions, kernels and xenomai patches.
Ubuntu is installed with LVM but I tried as well without LVM. (Similar error: UUID does not exist)

# Config FOR UBUNTU 18.04
KERNEL_VERSION="4.19.66"
XENO_VERSION="3.2.1"

Quoted 8 lines

XENO_PATCH="ipipe-core-4.19.66-x86-6.patch"

# UBUNTU SRV 20.04
KERNEL_VERSION="5.4.253"
XENO_VERSION="3.2.1" XENO_PATCH="ipipe-core-5.4.253-x86-14.patch"

Any ideas on what I am doing wrong or how I can debug this problem?

Where does your rootfs reside? Some external device like USB? Are you sure that the kernel configuration you are using is the same (content wise) for both setups?

Seems your missing a driver / subsystem enablement.

It might have happened that you deactivated some required configuration options while migrating the configuration from 4.19 to 5.4.

Best regards,
Florian

Quoted 9 lines


Kind regards,
Max Baeten


This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.

#3 lore raw

Hi Florian, John

It is residing on a M2 SSD where I use all default options when installing ubuntu server. Once with LVM and once without. I started with a fresh config made by sudo make defconfig and changed a few options there similar to what I have done in the past.

I have used a script that runs this prepare-kernel.sh script so I am quite sure that it was executed. I will check this afternoon and verify that I included the correct .config.

Regards Max

-----Original Message-----
From: Florian Bezdeka <[email protected]>
Sent: woensdag 18 oktober 2023 12:49
To: Baeten, M.J.J. (Max) <[email protected]>; [email protected]
Subject: Re: initramfs can't find root filesystem device

Quoted 28 lines · M.J.J. (Max)

Hello!

After compiling a xenomai 3.2.1 patched kernel the initramfs can’t boot this kernel because it can’t find the root filesystem device.
Error:
Gave up waiting for root file system device. Common problems:
- Boot args (cat /proc/cmdline)
   - Check rootdelay= (did the system wait long enough?)
- Missing modules (cat /proc/modules; ls /dev) ALERT!
/dev/mapper/ubuntu-vg-ubuntu—lv does not exist.

When I compile the same kernel sources without xenomai patch it works.

My .config is included and a screenshot of the error as well.
Cat /proc/modules = empty
Cat /proc/cmdline = BOOT_IMAGE=/vmlinuz-5.4.253-xeno-3.2.1
root=/dev/mapper/ubuntu--vg

I have tried on two systems with different ubuntu versions, kernels and xenomai patches.
Ubuntu is installed with LVM but I tried as well without LVM. (Similar
error: UUID does not exist)

# Config FOR UBUNTU 18.04
KERNEL_VERSION="4.19.66"
XENO_VERSION="3.2.1"

Quoted 8 lines

XENO_PATCH="ipipe-core-4.19.66-x86-6.patch"

# UBUNTU SRV 20.04
KERNEL_VERSION="5.4.253"
XENO_VERSION="3.2.1" XENO_PATCH="ipipe-core-5.4.253-x86-14.patch"

Any ideas on what I am doing wrong or how I can debug this problem?

Where does your rootfs reside? Some external device like USB? Are you sure that the kernel configuration you are using is the same (content wise) for both setups?

Seems your missing a driver / subsystem enablement.

It might have happened that you deactivated some required configuration options while migrating the configuration from 4.19 to 5.4.

Best regards,
Florian

Quoted 9 lines


Kind regards,
Max Baeten


This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.