Kernel Panic - Can't find root filesystem / error mounting /dev/root
Solution 1
An initrd (short for “initial RAM drive”) is a filesystem that's mounted when the Linux kernel boots, before the “real” root filesystem. This filesystem is loaded into memory by the bootloader, and remains in memory until the real boot. The kernel executes the program /linuxrc
on the initrd; its job is to mount the real root, and when /linuxrc
terminates the kernel runs /sbin/init
.
A bug somewhere in the initrd can explain why the system doesn't boot. So the document you link to recommends that you compare your initrd with an official one if you have trouble booting.
In the provided instructions, initrd
is just some temporary directory, you can call it anisha_initrd
or fred
if you like. The initrd is stored in the file /boot/initrd-SOMETHING.img
as a gzipped cpio archive; the instructions unpack that archive in the temporary directory you created. After unpacking, you can compare it with an official initrd (unpack the official initrd and run a command like diff -ru /path/to/official_initrd /path/to/anisha_initrd
).
Solution 2
The steps you referred to describe how to examine an initrd image, i.e., how to unpack (via gzip
and cpio
) the initrd-2.6.23-0.104.rc3.fc8.img
file into a directory (initrd/
here, created anywhere, with mkdir
). It's just a step towards finding the problem, no solution in itself.
Related videos on Youtube
Aquarius_Girl
Arts and Crafts.stackexchange.com is in public beta now. Join us!
Updated on September 18, 2022Comments
-
Aquarius_Girl over 1 year
A lot of these bugs end up being a broken initrd due to bugs in mkinitrd.
Get the user to attach their initrd for their kernel to the bz, and also their /etc/modprobe.conf, or have them examine the contents themselves if they are capable of that.
Picking apart the initrd of a working and failing kernel and doing a diff of the init script can reveal clues. To take apart an initrd, do the following ..
mkdir initrd cd initrd/ gzip -dc /boot/initrd-2.6.23-0.104.rc3.fc8.img | cpio -id
I wish to understand what exactly is being done here.
What hasinitrd
to do with anything?
Where are we supposed to create the directoryinitrd
? -
Aquarius_Girl over 12 yearsThanks, What is an initrd image? in brief, if you can. :)
-
sr_ over 12 years"initrd" is short for "initial ram disk", it's an image the Linux kernel loads into memory as one step of the boot process, for example to load modules that might be needed (e.g. "LVM") -- AFAIK; better look at Wikipedia
:)