Discussion:
[CI] /usr/sbin/chroot and initrd
Aneesh Kumar K.V
2002-11-29 01:41:02 UTC
Permalink
Hi,

If we have a separate /usr partition the use of /usr/sbin/chroot in
linuxrc will fail. How do we fix this ?

I have fixed some of the path issues in the CVS by removing the path and
just specifying the binary . ie instead of /usr/sbin/cmount i used
cmount. If it is not advisable to do the above please feel free to
modify.

-anesh
Brian J. Watson
2002-12-03 22:23:01 UTC
Permalink
Post by Aneesh Kumar K.V
If we have a separate /usr partition the use of /usr/sbin/chroot in
linuxrc will fail. How do we fix this ?
Back in the days of NonStop Clusters for UnixWare, /usr had to be part
of the root file system. I can't remember the precise reason why, but I
doubt we need to have the same restriction on Linux.

To solve the chroot problem, we could just copy it into /bin of the
initrd and run it out of there.

SSI-specific commands that might be run before /usr is mounted, such as
cmount, should not be installed under /usr. They should be installed in
/bin or /sbin. In the case of cmount, it should be installed in /bin,
just like the mount command.
Post by Aneesh Kumar K.V
I have fixed some of the path issues in the CVS by removing the path and
just specifying the binary . ie instead of /usr/sbin/cmount i used
cmount. If it is not advisable to do the above please feel free to
modify.
It's not a problem as long as the PATH variable is guaranteed to contain
the command's path. Just to be safe, the PATH variable should be set at
the top of a script if any commands outside of /bin are being called.

BTW, does your new Cluster Tools build system support installing into a
UML root image? I remember there were a few special things that needed
to be done, like installing a pre-written /etc/clustertab.

-Brian
Aneesh Kumar K.V
2002-12-04 01:07:02 UTC
Permalink
Post by Brian J. Watson
Post by Aneesh Kumar K.V
If we have a separate /usr partition the use of /usr/sbin/chroot in
linuxrc will fail. How do we fix this ?
Back in the days of NonStop Clusters for UnixWare, /usr had to be part
of the root file system. I can't remember the precise reason why, but I
doubt we need to have the same restriction on Linux.
To solve the chroot problem, we could just copy it into /bin of the
initrd and run it out of there.
But after pivot_root my root will change and /bin in initrd is now
/initrd/bin/
Post by Brian J. Watson
SSI-specific commands that might be run before /usr is mounted, such as
cmount, should not be installed under /usr. They should be installed in
/bin or /sbin. In the case of cmount, it should be installed in /bin,
just like the mount command.
Here is the confusion. I am yet figure out a method by which i can
install some binaries in /usr/bin and some in /bin. What i found is i
can have only two type of binaries sbin_PROGRAMS and bin_PROGRAMS. now
/usr/sbin is nothing but sbin with prefix /usr. and prefix is something
that is global to the cluster-tools. Any how i will experiment and try
to figure out some way. ( I don't want to do it in install-local )

Till we solve the above can we say that all the cluster-tools binaries
will go to either /bin or /sbin ( that is with prefix=/ )

I will make cmount installable at /bin.
Post by Brian J. Watson
Post by Aneesh Kumar K.V
I have fixed some of the path issues in the CVS by removing the path and
just specifying the binary . ie instead of /usr/sbin/cmount i used
cmount. If it is not advisable to do the above please feel free to
modify.
It's not a problem as long as the PATH variable is guaranteed to contain
the command's path. Just to be safe, the PATH variable should be set at
the top of a script if any commands outside of /bin are being called.
Now that it is going to be in /bin i guess it is ok ?
Post by Brian J. Watson
BTW, does your new Cluster Tools build system support installing into a
UML root image? I remember there were a few special things that needed
to be done, like installing a pre-written /etc/clustertab.
I guess the $DESTDIR should help in getting that. I have taken care
to install all the local installation ( scripts and conf files ) under
$DESTDIR/$prefix. So setting the DESTDIR with uml root should work .But
I haven't tested the above.

For installing clustertab one need to run configre_cluster. I haven't
made it as a part of cluster-tools installation.
Post by Brian J. Watson
-Brian
-aneesh
Sigurd Urdahl
2002-12-04 12:00:05 UTC
Permalink
Post by Aneesh Kumar K.V
Post by Brian J. Watson
SSI-specific commands that might be run before /usr is mounted, such as
cmount, should not be installed under /usr. They should be installed in
/bin or /sbin. In the case of cmount, it should be installed in /bin,
just like the mount command.
Here is the confusion. I am yet figure out a method by which i can
install some binaries in /usr/bin and some in /bin. What i found is i
can have only two type of binaries sbin_PROGRAMS and bin_PROGRAMS. now
/usr/sbin is nothing but sbin with prefix /usr. and prefix is something
that is global to the cluster-tools. Any how i will experiment and try
to figure out some way. ( I don't want to do it in install-local )
Till we solve the above can we say that all the cluster-tools binaries
will go to either /bin or /sbin ( that is with prefix=/ )
Shouldn't that be solveable by just extending the possible
destinationcategories from sbin_PROGRAMS and bin_PROGRAMS to also
include usr_sbin_PROGRAMS and usr_bin_PROGRAMS?

I believe the LVM-people install to both / and /usr directories (they
had an relase that only put things into /usr, which broke my system
quite spectacularily when I had /usr on LVM (who was first, the
egg or the hen?). Maybe there is something to gain by takeing a look
at their Makefiles?
Post by Aneesh Kumar K.V
I will make cmount installable at /bin.
goodie:)

-sig
--
Sigurd Urdahl ***@linpro.no
Systemkonsulent | Systems consultant www.linpro.no
LIN PRO can improve the health of people who consume the eggs,
meat and milk [..] (http://www.werneragra.com/linpro.html)
Loading...