From: voidexp@gmail.com (Ivan Nikolaev)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Kernel panic when using initramfs instead of initrd
Date: Sun, 05 May 2013 11:44:28 +0200 [thread overview]
Message-ID: <518629FC.8060403@gmail.com> (raw)
Hello everyone!
Briefly, I'm creating a dummy distribution which boots from CD (using
VirtualBox for testing purposes) and lives in RAM. It's a very
minimalistic kernel which has almost nothing enabled except from core
facilities, virtual terminal, framebuffer and serial port.
I'm trying to use the "ultimate boot feature" - the initial RAM
filesystem. Basically what I have is a plain simple directory with the
following contents:
./proc
./sys
./dev
./etc
./etc/inittab
./etc/profile
./etc/passwd
./bin
./bin/init
./bin/sh
./bin/busybox
Obviously, at boot /bin/init is executed which is instructed by
/etc/inittab to simply run a shell and stay happy.
EVERYTHING WORKS if I enable in the kernel some filesystem (like ext2 or
squashfs) and create the initrd image of that type and put inside the
contents of the directory. Isolinux then boots the kernel this way:
LABEL linux
SAY Booting linux...
KERNEL /vmlinuz
APPEND root=/dev/ram0 initrd=/initrd.gz console=ttyS0,38400 vga=0x305
To make this work, I obviously enabled the "Initial RAM filesystem and
RAM disk (initramfs/initrd) support" in "General setup" and the "RAM
block device support" in "Device drivers - block devices" options.
Well, ensuring everything works, I tried to switch to initramfs.
Disabled the "RAM block device support", the ext2 and squashfs
filesystems and created the init cpio image with a command like this:
find | cpio -H newc -o | gzip -9 > initrd.gz
The boot arguments are the same. When I boot, what I have is a kernel
panic with the following details:
List of all partitions:
No filesystem could mount root, tried:
Kernel panic - not syncing: VFS: Unable to mount root fs on
unknown-block(0,0)
Here's my config file: http://pastebin.com/XVd8ZukU
Using linux v3.9.0
--
Ivan Nikolaev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130505/c6803c68/attachment.html
next reply other threads:[~2013-05-05 9:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-05 9:44 Ivan Nikolaev [this message]
2013-05-06 9:32 ` Kernel panic when using initramfs instead of initrd Max Filippov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=518629FC.8060403@gmail.com \
--to=voidexp@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.