/lib, /sbin directories - Setup

This is a discussion on /lib, /sbin directories - Setup ; Hi all, why is it said that /lib, /sbin directories should not be mounted on a separate partition ?...

+ Reply to Thread
Results 1 to 11 of 11

Thread: /lib, /sbin directories

  1. /lib, /sbin directories

    Hi all,

    why is it said that /lib, /sbin directories should not be mounted on
    a separate partition ?

  2. Re: /lib, /sbin directories

    annalissa wrote:
    > why is it said that /lib, /sbin directories should not be mounted on
    > a separate partition ?


    Because they belong to the root file system.
    Without the files in these directories the system is unusable.
    These files should be there after / is mounted.

    How, for example, do you want to start the init process, that eventually
    mounts the other file systems? The executable is /sbin/init.

    Yours,
    Laurenz Albe

  3. Re: /lib, /sbin directories

    annalissa wrote:
    >
    > *why is it said that /lib, /sbin directories should not be mounted on
    > a separate partition ?


    Compiled binaries in a bin directory tend to reference compiled
    libraries in a lib directory. Most of the binaries in /sbin are
    statically linked but some can reference /lib. Since the first
    filesystem mounted is root and the first binaries referenced are
    in /sbin they must be capable of running with no reference at
    all to any directory tree outside of /.

    At install time there are options to move all sorts of directories
    to their own mount points. /opt and /usr don't have any issues
    like that. /sbin and /lib do have that issue.

    The other directory that absolutely must be in the boot mount
    point is /etc because /etc/inittab lives there plus the scripts
    that do the mounts of all the other local filesystems. Once
    the rest of the local filesystems are mounted it becomes
    less important where a executible binary is versus where its
    library binaries are.

  4. Re: /lib, /sbin directories

    annalissa writes:

    >Hi all,


    > why is it said that /lib, /sbin directories should not be mounted on
    >a separate partition ?


    Why is it said that the earth is hollow and an entirely different species
    of people live inside it?

    Who says it?


  5. Re: /lib, /sbin directories

    On Wed, 5 Nov 2008, Unruh wrote:

    > annalissa writes:
    >
    >> Hi all,

    >
    >> why is it said that /lib, /sbin directories should not be mounted on
    >> a separate partition ?

    >
    > Why is it said that the earth is hollow and an entirely different species
    > of people live inside it?
    >
    > Who says it?
    >

    From past experience her friend, which some have translated to her
    teacher.

    The latter seems more likely, based on the questions.

    Michael


  6. Re: /lib, /sbin directories

    Laurenz Albe wrote:
    > annalissa wrote:
    >> why is it said that /lib, /sbin directories should not be mounted on
    >> a separate partition ?

    >
    > Because they belong to the root file system.
    > Without the files in these directories the system is unusable.
    > These files should be there after / is mounted.
    >
    > How, for example, do you want to start the init process, that eventually
    > mounts the other file systems? The executable is /sbin/init.
    >
    > Yours,
    > Laurenz Albe


    This used to be even more the case with systems that had to be bootstrapped to
    boot, in various ways, For example, when Linux had to boot from a flaoppy, the
    absolute *minimum* of components had to fit somewhere where the standard
    system tools would not be mounted on them. Thus, the bootstrapppable element
    of the OS were kept there, and were not part of everyday use. This made
    partitioning a separate, mountable space for /usr much easier, and made
    rebuilding or recovering it at need a lot easier.

    Things have shifted in the Linux and the older UNIX world since those days. On
    some systems, /lib and /bin are links to /usr/lib and /usr/bin. But the old
    /lib and /bin paths are hardcoded for use in such bootstrap environments.

    Heck, the binaries many moons ago in the UNIX world used to be stashed in
    /etc, such /etc.restore for restoring filesystems.

  7. Re: /lib, /sbin directories

    On Nov 6, 5:39*am, Michael Black wrote:
    > On Wed, 5 Nov 2008, Unruh wrote:
    > > annalissa writes:

    >
    > >> Hi all,

    >
    > >> why is it said that /lib, /sbin directories should not be mounted on
    > >> a separate partition ?

    >
    > > Why is it said that the earth is hollow and an entirely different species
    > > of people live inside it?

    >
    > > Who says it?

    >
    > From past experience her friend, which some have translated to her
    > teacher.
    >
    > The latter seems more likely, based on the questions.


    it is not about friend or teacher

    i got this from the book "Ubuntu Certified Professional Study Guide"
    by Michael Jang

    in page no: 175 it is written that :-

    /lib Program libraries for the kernel and various command-line
    utilities. Do not mount this directory on a separate partition.
    /sbin System administration commands. Donít mount this directory
    separately.



  8. Re: /lib, /sbin directories

    annalissa writes:

    >On Nov 6, 5:39=A0am, Michael Black wrote:
    >> On Wed, 5 Nov 2008, Unruh wrote:
    >> > annalissa writes:

    >>
    >> >> Hi all,

    >>
    >> >> why is it said that /lib, /sbin directories should not be mounted on
    >> >> a separate partition ?

    >>
    >> > Why is it said that the earth is hollow and an entirely different speci=

    >es
    >> > of people live inside it?

    >>
    >> > Who says it?

    >>
    >> From past experience her friend, which some have translated to her
    >> teacher.
    >>
    >> The latter seems more likely, based on the questions.


    >it is not about friend or teacher


    >i got this from the book "Ubuntu Certified Professional Study Guide"
    >by Michael Jang


    >in page no: 175 it is written that :-


    >/lib Program libraries for the kernel and various command-line
    >utilities. Do not mount this directory on a separate partition.
    >/sbin System administration commands. Don=92t mount this directory
    >separately.


    /bin, /sbin, /lib have to be in the / partitions. /lib contains all the
    modules that the kernel needs to run your hardware ( disks, video,...)
    /sbin contains critical system programs ( mount, ps, ifconfig, ifup, ....)
    /bin contains system programs and programs to rescue stuff ( vim-minimal,
    grep, cp, bash,....)
    and /etc contains the configuration files. All these need to be ther for
    the system to boot up.

    If that is what you are refering to . Those quotes are totally obscure,
    since what they mean by " on a separate partition" They usually ARE on a
    separate partition from /home, or /usr/local.




  9. Re: /lib, /sbin directories

    On Thu, 06 Nov 2008 00:35:04 -0500, annalissa wrote:

    > i got this from the book "Ubuntu Certified Professional Study Guide"
    > by Michael Jang


    It boils down to what's required to load the kernel, and get the
    filesystems that contain the needed programs, scripts, configuration
    files, and modules that are needed to boot the system mounted.

    If you create an initrd that contains all of the above, then you
    don't need anything except /initrd and /boot on the root filesytem.
    You can probably get away with scripts that create /initrd, for as
    long as needed, in an initrd.

    Anything you don't provide in the initrd must be available in the
    root filesystem, unless it's set up to mount/get the rest of the
    required stuff.

    As with most things with linux, it's totally up to you, to decide
    what you want where, and how you want to make it available, when
    it's needed.

    The advise to keep /lib, /bin, ..., on the root filesystem is based
    on the use of boot scripts provided with commonly used distributions.

    If you are willing to customize the scripts in the initrd, you can do
    whatever you want.

    Regards, Dave Hodgins

    --
    Change nomail.afraid.org to ody.ca to reply by email.
    (nomail.afraid.org has been set up specifically for
    use in usenet. Feel free to use it yourself.)

  10. Re: /lib, /sbin directories

    Unruh wrote:

    > annalissa writes:
    >
    >>On Nov 6, 5:39=A0am, Michael Black wrote:
    >>> On Wed, 5 Nov 2008, Unruh wrote:
    >>> > annalissa writes:
    >>>
    >>> >> Hi all,
    >>>
    >>> >> why is it said that /lib, /sbin directories should not be mounted on
    >>> >> a separate partition ?
    >>>
    >>> > Why is it said that the earth is hollow and an entirely different speci=

    >>es
    >>> > of people live inside it?
    >>>
    >>> > Who says it?
    >>>
    >>> From past experience her friend, which some have translated to her
    >>> teacher.
    >>>
    >>> The latter seems more likely, based on the questions.

    >
    >>it is not about friend or teacher

    >
    >>i got this from the book "Ubuntu Certified Professional Study Guide"
    >>by Michael Jang

    >
    >>in page no: 175 it is written that :-

    >
    >>/lib Program libraries for the kernel and various command-line
    >>utilities. Do not mount this directory on a separate partition.
    >>/sbin System administration commands. Don=92t mount this directory
    >>separately.

    >
    > /bin, /sbin, /lib have to be in the / partitions. /lib contains all the
    > modules that the kernel needs to run your hardware ( disks,
    > video,...)


    Usually all the modules needed for booting are in the initrd. But /lib
    contains important libraries like the libc without which no program
    (except for statically linked) works. As usually mount isn't
    statically linked you can't mount anything without /lib


    > /sbin contains critical system programs ( mount, ps, ifconfig, ifup,
    > ....)


    More important /sbin contains init, the program that get started by
    the kernel and controls the whole boot process.


    > /bin contains system programs and programs to rescue stuff ( vim-minimal,
    > grep, cp, bash,....)


    The most important one is /bin/sh and other basic programs that are
    needed for shell scripts. bash and vim are optional.


    > and /etc contains the configuration files.


    In particular /etc contains the SysV init-scripts which tell init
    what to do at boot time, and fstab that tells mount which partitions
    to mount.


    > All these need to be ther for the system to boot up.


    They are even required *before* any partition (other than /) gets
    mounted during start up


    > If that is what you are refering to . Those quotes are totally obscure,
    > since what they mean by " on a separate partition" They usually ARE on a
    > separate partition from /home, or /usr/local.


    Usually "on a separate partition" without further reference means
    "separate from /".


    Florian
    --

    -----------------------------------------------------------------------
    ** Hi! I'm a signature virus! Copy me into your signature, please! **
    -----------------------------------------------------------------------

  11. Re: /lib, /sbin directories

    On November 6, 2008 06:56, in comp.os.linux.setup, Florian Diesch
    (diesch@spamfence.net) wrote:

    > Unruh wrote:
    >
    >> annalissa writes:
    >>
    >>>On Nov 6, 5:39=A0am, Michael Black wrote:
    >>>> On Wed, 5 Nov 2008, Unruh wrote:
    >>>> > annalissa writes:
    >>>>
    >>>> >> Hi all,
    >>>>
    >>>> >> why is it said that /lib, /sbin directories should not be mounted on
    >>>> >> a separate partition ?
    >>>>
    >>>> > Why is it said that the earth is hollow and an entirely different
    >>>> > speci=
    >>>es
    >>>> > of people live inside it?
    >>>>
    >>>> > Who says it?
    >>>>
    >>>> From past experience her friend, which some have translated to her
    >>>> teacher.
    >>>>
    >>>> The latter seems more likely, based on the questions.

    >>
    >>>it is not about friend or teacher

    >>
    >>>i got this from the book "Ubuntu Certified Professional Study Guide"
    >>>by Michael Jang

    >>
    >>>in page no: 175 it is written that :-

    >>
    >>>/lib Program libraries for the kernel and various command-line
    >>>utilities. Do not mount this directory on a separate partition.
    >>>/sbin System administration commands. Don=92t mount this directory
    >>>separately.

    >>
    >> /bin, /sbin, /lib have to be in the / partitions. /lib contains all the
    >> modules that the kernel needs to run your hardware ( disks,
    >> video,...)

    >
    > Usually all the modules needed for booting are in the initrd. But /lib
    > contains important libraries like the libc without which no program
    > (except for statically linked) works. As usually mount isn't
    > statically linked you can't mount anything without /lib
    >
    >
    >> /sbin contains critical system programs ( mount, ps, ifconfig, ifup,
    >> ....)

    >
    > More important /sbin contains init, the program that get started by
    > the kernel and controls the whole boot process.
    >
    >
    >> /bin contains system programs and programs to rescue stuff ( vim-minimal,
    >> grep, cp, bash,....)

    >
    > The most important one is /bin/sh and other basic programs that are
    > needed for shell scripts. bash and vim are optional.
    >
    >
    >> and /etc contains the configuration files.

    >
    > In particular /etc contains the SysV init-scripts which tell init
    > what to do at boot time, and fstab that tells mount which partitions
    > to mount.


    Actually, /etc contains the inittab file, which is the control file
    for /sbin/init. It is in /etc/inittab that all the system startup functions
    are defined, including the functions to run the SysV init-scripts, if the
    system has them.

    >
    >> All these need to be ther for the system to boot up.

    >
    > They are even required *before* any partition (other than /) gets
    > mounted during start up


    [snip]

    --
    Lew Pitcher

    Master Codewright & JOAT-in-training | Registered Linux User #112576
    http://pitcher.digitalfreehold.ca/ | GPG public key available by request
    ---------- Slackware - Because I know what I'm doing. ------



+ Reply to Thread