hello I have compiled my custom kernel and pack initramfs into it. I have created two partition fat32 and ext3. fat32 contains bootloaders and kernel and ext3 contains rootfs. I have made a raw disk image on that. But when I try this on qemu it's show init script not found.
Here is the screenshot.
here is my init script
echo "Something went wrong. Dropping you to a shell."
busybox --install -s
mount -t proc none /proc
mount -t sysfs none /sys
echo "This script mounts rootfs and boots it up, nothing more!"
mount -o ro /dev/sda2 /mnt/root || rescue_shell
exec switch_root /mnt/root /sbin/init
I have put the init script on initramfs with
chmod +x init
I am using qemu with the follwing parameter
qemu-system-arm.exe -M versatilepb -cpu arm1176 -hda my_custom_image.img -kernel kernel-qemu -m 256 -append "root=/dev/sda2"
Here is my initramfs structure
./dev/sda2: block special
./dev/null: character special
./dev/console: character special
./dev/tty: character special
./dev/sda1: block special
./bin/busybox: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, for GNU/Linux 2.6.16, stripped
And my rootfs contains also the same structure. Is there anything wrong what I have done so far?.
And Another thing when my same structure is in physical raspberry the init script got error and entering in rescue mode with the following error.
kernel panic not syncing attempted kill init
Can any one show me a proper guidance. I can't find a way out.
If additional details require I will surely provide. Thank You.