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

Re: Troubles with initramfs configuration



On Tue, 2007-05-15 at 13:40 -0500, Dallas Clement wrote:
> Dear All,
> 
> I'm having problems with configuring my initramfs so that the /init file
> will be executed correctly.
> 
> If I have a configuration file for my initramfs as follows with the
> simple "hello world" program as my init - it is executed fine.
> 
> dir /dev 755 0 0
> nod /dev/console 644 0 0 c 5 1
> nod /dev/loop0 644 0 0 b 7 0
> dir /bin 755 1000 1000
> file /bin/busybox ../../initramfs/busybox 755 0 0
> slink /bin/ash busybox 777 0 0
> dir /proc 755 0 0
> dir /sys 755 0 0
> dir /mnt 755 0 0
> file init ../../initramfs/hello 777 0 0
> 
> however, if I replace the "hello world" program with say busybox or a
> init.sh shell script, I get an error "Can't find /init to
> execute...kernel panic... etc.".
> 
> file init ../../initramfs/busybox 777 0 0
> 
> Can anyone please give me some pointers?  I'm doing this with the
> 2.6.21.1 kernel.

I found the source of my troubles. It was a dumb mistake on my part.  I
had not statically linked the 'busybox' utility.  Hence, it was seg
faulting looking for some libraries that didn't exist.

It would be nice to see some error information however while initramfs
is trying to execute the 'init' program.  I would have found this much
sooner.



Reply to: