Kernel panic when using initramfs instead of initrd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux