Re: /etc/rc is not run anymore
On Fri Nov 12, 1999 at 03:06:48PM +0100, Eric Delaunay wrote:
> Erik Andersen wrote:
> > On Thu Nov 11, 1999 at 11:40:55PM -0500, Adam Di Carlo wrote:
> >
> > Another way is to stat("/") and then stat each entry in /dev until you
> > find a dev_t that matches. This is messy and slow.
>
> And what about root filesystem on NFS ? It is named server:/mountpath but I
> don't think it could be derived automagically :(
As I said -- it is messy. And in the case of nfs, it doesn't work, both
are good reasons why I don't do it that way in busybox mount/umount/df.
I use getfsfile, and expect /etc/fstab to have the real root device name
in it.
> > Fortunatly, in this case, to remount / read-write, it doesn't matter
> > what we put in for the device name.
>
> Yes. Therefore no need to resolve /dev/root.
thankfully.
> Btw, I discovered that busybox' mount is not used by boot floppies!
> mount/umount are going from the mount package.
Yikes! Thats bad.
> I guess it is because your mount program does not support NFS. Are you
> planning to add it? We could save 50k to 100k on the rootdisk (mount+umount
> takes 120k on sparc for the moment) if you would do but you need to support all
> filesystems the bootdisks might use. Basically ext2, nfs and iso9660, but also
> msdos/fat/vfat (for PC), ufs (for Sun), ...
Doesn't support nfs?
[root@slag busybox]# ./busybox mount crater:/home /mnt -t nfs
Mounting crater:/home on /mnt failed: Invalid argument
Oops, I guess you are right. So nfs doesn't use mount(2)?
<sound of apt-get source util-linux, and Erik reading mount
source code>
Yikes. nfs is very wierd. Looks like I can probably make
it go (as a #define BB_NFS or some such). Seems you fill
in a bunch of structs and such. messy.
I just asked my boss, and adding nfs support to busybox'
mount isn't a high priority here at Lineo (they are paying
me to work on it so I do what they pay me to do). Adding insmod
and rmmod is more important, so I guess I'll be working on
that today. I may look into adding it in my spare time at
home, but I rarely use nfs...
If you have a few hours and want to hack the nfs support from
util-linux's mount into a new file like nfs_mount.c, then
you add #define BB_NFS_MOUNT to busybox.defs.h (so it gets
compiled in when BB_NFS_MOUNT is defined via some sed magic)
and then stick in
#if defined BB_NFS_MOUNT
stuff
#endif
stuff into busybox' mount.c.
-Erik
--
Erik B. Andersen Web: http://www.xmission.com/~andersen/
email: andersee@debian.org
--This message was written using 73% post-consumer electrons--
Reply to: