Hello. Im am building a Linux distro. It will be very tiny and fast.
I only have a minimal linuxkernel (bzImage) who is 1,2 mb big. And then I have Busybox who is 174,6 kb big.
The commands in busybox is: cd, ls, mkdir, rmdir, wget, httpd, clear, rm, poweroff, halt, reboot, fdisk, mount, umount, free, and cp.
When I compiled the kernel i use initramfs/initrd function and point it to a folder where initrd/initramfs source is.
The kernel works OK with others initramfs/initrd files. But not with my own.
Quote:
Waring: unable to open initial console.
Freeing unused kernel memory: 412k freed
Failed to execute /init
Kernel Panic - Not syncing: No init found. Try passing init= option to kernel.
|
Here is how the end of the kernelcomplie look like.
Quote:
BUILD arch/x86/boot/bzImage
Root device is (8, 1)
Setup is 13132 bytes (padded to 13312 bytes).
System is 1232 kB
CRC 8ed74771
Kernel: arch/x86/boot/bzImage is ready (#4)
root@desktop-GA-7VAXFS:/home/desktop/Hämtningar/linux-2.6.38.3#
|
Here is my init file who is the initrd/initramfs source.
Quote:
#!/bin/busybox sh
mkdir -p /dev /proc /sys
mount -t devtmpfs devfs /dev
mkdir -p /dev/pts
mount -t devpts ptsfs /dev/pts
mount -t proc procfs /proc
mount -t sysfs sysfs /sys
exec /bin/busybox sh
|
/folder/to/initramfs/bin/busybox
The initramfs folder contains "bin" (folder) and "init" a file. No more.
What is the problem? I know the problem, but not to solve it. The problem is that the kernel cannot find/read init file. I have search, but no answers fitt this question.