[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    [BusyBox] init with 2.6.x kernel without initrd
From:       "Hamish Guthrie" <hamish () prodigi ! ch>
Date:       2005-06-20 18:32:57
Message-ID: LDEKLCIFJMAFIOPNLICOGECIFGAA.hamish () prodigi ! ch
[Download RAW message or body]

I am battling, have searched the web for more than a day, searched the
busybox maillist archives, and am no wiser!

I am not sure if this is moving against the current trend with 2.6.x
kernels, but I am attempting to put together an environment for an embedded
system as follows:

Because the embedded device only has 2 drivers (MTD and Ethernet
controller), I have statically linked these drivers into the kernel amd
disabled mosule support. I have created a squashfs root filesystem, which I
am able to mount sucessfully and am able to execute /bin/init (link to
busybox). The only issue is that for some reason /bin/init (it is PID 1)
does not appear to be running as root.

I have created another very similar boot environment where I implemented an
initrd which then has sripts which do the whole pivot_root excercise to
mount my actual root filesystem, and init does indeed run as root.

What appears to be really strange to me is that if I have init execute a
script which calls /bin/ash I have 2 different scenarios:

1. Without initrd: the prompt I get is $, not #, I cannot execute certain of
the busybox utilities, (ie crontab) complain with the message 'This applet
requires root privileges'.

2. With initrd: the prompt I get is #, and crontab is executed without a
problem.

What is also really curious to me though, is I mount a tmpfs and if I then
create files or directories on that tmpfs, the owner and group are root
(this is without having the initrd, so my prompt is $!).

In order to test this further, I then downloaded the sources for sysvinit
and put this into the same environment without initrd, and I get the message
init: must be superuser. Of course it operates correctly in the initrd
environment.

Anyone have any ideas?

Thanks in advance

Hamish
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.7.8/22 - Release Date: 17.06.2005

_______________________________________________
busybox mailing list
busybox@mail.busybox.net
http://codepoet.org/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic