can't get init to work

2007-10-24 Thread Craig
Hi.

I am using busybox 1.7.2 on a CentOS 4.4 kernel (2.6.9). Everything 
seemed to compile fine. I am able to run the shell 
(/usr/local/src/busybox-1.7.2/busybox ash) and able to run some simple 
commands.

But, when I try to build an initrd from it, things don't seem to work. I 
have tried PXE booting:

 kernel os/test/vmlinuz
 append root=/dev/ram0 initrd=os/test/initrd.img.gz init=/linuxrc

Via grub:
title Test init
 root (hd0,0)
 kernel /test-vmlinuz ro root=/dev/ram0 init=linuxrc
 initrd /test-initrd.img.gz

In that initrd, I also have the "default CD /sbin/init" as 
/sbin/init-orig. (I guess it's basically the anaconda binary.) If I 
simply change init ("init=/sbin/init-orig"), anaconda starts up and 
things look to be fine.

I must be doing something silly, but I can't figure out what it is. I 
have tried changing "/linuxrc" to various ash scripts and/or a symlink 
to /sbin/busybox.

The error I get is:
...
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 164K freed
Kernel panic - not syncing: No init found.  Try passing init= option to 
kernel.

Not sure what other information you need.

TIA!

Craig.

P.S. All I am trying to do is build a VERY simple network boot image so 
that I can look at some simple data from the hardware (like MAC addr).
___
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox


Re: can't get init to work

2007-10-24 Thread Hamish Moffatt
On Wed, Oct 24, 2007 at 09:15:47PM -0700, Craig wrote:
> I am using busybox 1.7.2 on a CentOS 4.4 kernel (2.6.9). Everything 
> seemed to compile fine. I am able to run the shell 
> (/usr/local/src/busybox-1.7.2/busybox ash) and able to run some simple 
> commands.
> 
> But, when I try to build an initrd from it, things don't seem to work. I 
> have tried PXE booting:
> 
>  kernel os/test/vmlinuz
>  append root=/dev/ram0 initrd=os/test/initrd.img.gz init=/linuxrc

Does it load the image and mount the root file system ok in this
configuration?

With an unpacked version of your initrd image (or mount it via loop
device), try to chroot into the directory and run /linuxrc. Does it run?

You might be missing libraries or something like that.


Hamish
-- 
Hamish Moffatt VK3SB <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
___
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox


Re: can't get init to work

2007-10-24 Thread Craig
Yes, it appears to load the image. (My previous email had the boot 
output. Which said that the root filesystem was loaded.)

Sigh... I was missing a lib... I kept thinking the error would be 
something else for a missing lib.

Anyway, it seems to work. Now, I just need to get networking up. :)

Thanx for the quick response!

Craig

P.S. Just for reference. To figure out the missing lib:
$ ldd /usr/local/src/busybox-1.7.2/busybox
 libcrypt.so.1 => /lib/libcrypt.so.1 (0x00cce000)
 libm.so.6 => /lib/tls/libm.so.6 (0x002bb000)
 libc.so.6 => /lib/tls/libc.so.6 (0x0018d000)
 /lib/ld-linux.so.2 (0x0016f000)


Hamish Moffatt wrote:
> On Wed, Oct 24, 2007 at 09:15:47PM -0700, Craig wrote:
>> I am using busybox 1.7.2 on a CentOS 4.4 kernel (2.6.9). Everything 
>> seemed to compile fine. I am able to run the shell 
>> (/usr/local/src/busybox-1.7.2/busybox ash) and able to run some simple 
>> commands.
>>
>> But, when I try to build an initrd from it, things don't seem to work. I 
>> have tried PXE booting:
>>
>>  kernel os/test/vmlinuz
>>  append root=/dev/ram0 initrd=os/test/initrd.img.gz init=/linuxrc
> 
> Does it load the image and mount the root file system ok in this
> configuration?
> 
> With an unpacked version of your initrd image (or mount it via loop
> device), try to chroot into the directory and run /linuxrc. Does it run?
> 
> You might be missing libraries or something like that.
> 
> 
> Hamish
___
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox