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

Re: building initramfs also as root filesystem problem

Hi all,

I got this resolved,

the trick when building ramfs as rootfs os is to:

1.  Use busybox (symlink all neccessary tools and package all busybox
dependencies with ramfs)
2.  bootup into busybox bash, which should be /bin/sh symlinked to /bin/busybox
3.  You may get nothing (no stardard ouput) when you try to run an
executable, or bash error no such file found (but yet it is there).
4.  Try to execute the executable with /lib/ld-2.5.90.so <path to
executable>.  Using this method, the linker actually tells you what's
wrong with the executable if it can not be executed.


On 11/24/10, Toan Pham <tpham3783@gmail.com> wrote:
> Hi,
> I am building a linux os by incorporating in-kernel initramfs, which
> also runs as root-filesystem.
> The result of this work would be booting/distributing linux with only
> one file, which is the kernel + linked in initramfs + rootfs.
> I am having a problem booting up the os when everything is linked in.
> Here is the two errors I've been getting when:
> 1.  root-filesystem is prepared in initramfs and linked in with kernel
>  (total size is about 5 megs) -
>     a.  Kernel Panic - not syncing: Attempted to kill init!
>     b.  Also tried to boot directly to bash instead (rdinit=/bin/init
> and/or init=/bin/sh), same error.
> 2.  Moved root-filesystem to boot-drive (/rootfs), boot kernel with
> linked in initramfs (total size about 2 megs) -
>     a.  Boot OK to bash (still within initramfs shell).
>     b.  Manually and successfully mount:  rootfs on boot-drive located
> at <boot drive>/rootfs to /tmp/rootfs  as vfat filesystem-type
>     c.  I can cat all mounted files at /tmp/rootfs.  For example, cat
> /tmp/rootfs/bin/clear works find.
>     d.  However, I can not execute that file, for example execute
> /tmp/rootfs/bin/clear.  Bash would display an error like   clear: no
> such file or directory.
>     e.  Permission setting is correct of-course.
> This is really an effort of building linux distribution from scratch
> and compact it into one single file, and not related to Debian at all.
> If anyone has experience on this, please give me some advices.
> Thank you.
> -toan

Toan Pham
Atronix Engineering, Inc.
UPS Advanced Technology Center
(321) 277-3336

Reply to: