initramfs with busybox(init not found)

Luciano Miguel Ferreira Rocha strange at nsk.no-ip.org
Tue Mar 13 12:04:16 UTC 2007


On Tue, Mar 13, 2007 at 08:27:11PM +0900, Sina Mallick wrote:
> Hi,
> Thanks a ton for your reply...
> Do you think that initramfs has mounted properly.??...because at that case
> at the kernel log message that is "Unpacking initramfs..." should comming
> from /init/initramfs.c..in o\my case is not comming at kernel log message...

Initramfs isn't mounted. It's extracted directly to ramfs, /init or
whatever rdinit you defined is executed and the system is considered
booted. There will be no message: VFS: Mounted root ...

> In my case am using a some different boot loader(IPL) where i could not set
> any thing...even i am using JTAG to port the vmlinux kernel.....and i tryed
> to test initramfs by some sample program hello world as mention at Linux
> kernel documentation....i do not understant why rootfs is not mounted by
> initramfs..though cpio format initramfs is created inside linus kernel
> /usr.......

Ah. I think the message "Unpacking initramfs..." or "checking if image
is initramfs..." doesn't show in that case. The kernel already knows it
has a valid initramfs, and is included with itself. Thus, you don't need
to mess with the loader also, as there's no initrd to load.

> can you suggest something about how to debug this one...or from
> where i should start this debuging....in our case there is no connection
> between bootloader and initram created rootfs.....
> thanks for your timing.....
(time, not timing, usually)

Well, I'd start by compiling a static hello world:
#include <unistd.h>
#include <string.h>

#define HELLO "Hello World!\n"

int main(int argc, char *argv[])
{
        write(1, HELLO, strlen(HELLO));
        for (;;) pause();
        return 0;
}

and running it as rdinit, first. Then, making it execute /bin/ash and
show any error:

        write(1, HELLO, strlen(HELLO));
#define ASH "/bin/ash"
	execl(ASH, ASH, (void *)0);
	perror(ASH);
	for(;;) pause();


-- 
lfr
0/0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20070313/294ccaff/attachment-0002.pgp 


More information about the busybox mailing list