* Kernel panic when using initramfs instead of initrd
@ 2013-05-05 9:44 Ivan Nikolaev
2013-05-06 9:32 ` Max Filippov
0 siblings, 1 reply; 2+ messages in thread
From: Ivan Nikolaev @ 2013-05-05 9:44 UTC (permalink / raw)
To: kernelnewbies
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Kernel panic when using initramfs instead of initrd
2013-05-05 9:44 Kernel panic when using initramfs instead of initrd Ivan Nikolaev
@ 2013-05-06 9:32 ` Max Filippov
0 siblings, 0 replies; 2+ messages in thread
From: Max Filippov @ 2013-05-06 9:32 UTC (permalink / raw)
To: kernelnewbies
Hi Ivan,
On Sun, May 5, 2013 at 1:44 PM, Ivan Nikolaev <voidexp@gmail.com> wrote:
...
> 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
Empty CONFIG_INITRAMFS_SOURCE parameter in your config
should actually look like
CONFIG_INITRAMFS_SOURCE="/path/to/your/initrd.gz"
given the command you use for initramfs creation, because initramfs
image is linked into the vmlinuz at the build time.
--
Thanks.
-- Max
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-05-06 9:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-05 9:44 Kernel panic when using initramfs instead of initrd Ivan Nikolaev
2013-05-06 9:32 ` Max Filippov
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.