FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 11-24-2010, 01:32 PM
Toan Pham
 
Default building initramfs also as root filesystem problem

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


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTikKJ8BLsWJMS2bzSWifoOdv6HCFMvzrpC6EfBTj@mail .gmail.com">http://lists.debian.org/AANLkTikKJ8BLsWJMS2bzSWifoOdv6HCFMvzrpC6EfBTj@mail .gmail.com
 
Old 12-03-2010, 08:09 PM
Toan Pham
 
Default 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.


-toan

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


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTint-ob2oVOEu+EcGdo2M=shzgXdc+tTPHdGvvWc@mail.gmail.com ">http://lists.debian.org/AANLkTint-ob2oVOEu+EcGdo2M=shzgXdc+tTPHdGvvWc@mail.gmail.com
 

Thread Tools




All times are GMT. The time now is 10:23 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org