Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Jan 2000 14:05:57 +0100 (CET)
From:      Oliver Fromme <olli@dorifer.heim3.tu-clausthal.de>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Newbie has a lot of questions...
Message-ID:  <200001081305.OAA23249@dorifer.heim3.tu-clausthal.de>
In-Reply-To: <8579j0$bnq$1@atlantis.rz.tu-clausthal.de>

next in thread | previous in thread | raw e-mail | index | archive | help
I'm going to try to answer a few of your questions, but not
all.  Maybe others can pick up the remaining topics.

John Indra wrote in list.freebsd-questions:
 > Know what really attract me to try FreeBSD? The
 > daemon... ;) so... here's my first question: what's Mr D'mon name? I
 > can't find it on the FAQ... Maybe this question (and answer) could be
 > included in the future FAQ ;)

Most people call him "Chuck", although his "father" Kirk
McKusick doesn't like that -- he prefers to call it just
"Beastie".

Personally, I prefer "Chuck", and I don't like "Beastie"
at all (maybe that's because there's a band called
"Beastie Boys" whose music I don't like).  :-)

 > I understand that there is a runlevel concept in Linux. I believe that
 > this was inherited from SysV.

True.

 > Are there any runlevel concept on FreeBSD
 > or *BSD variant in general?

No, there aren't, and I don't think that that concept is really
necessary (I think that, for example, Solari's runlevel system
is overly complicated).

In FreeBSD (and BSD in general), there is single-user mode and
multi-user mode.  No need for anythig else, IMO.

 > What is the boot sequence in FreeBSD? Till now, this is what I
 > understand:
 > Bootstrap -> /kernel -> /sbin/init -> read /etc/rc* -> invoke gettys ->
 > login. Is my understanding correct?

Roughly.  :-)

/sbin/init calls the /rtc/rc script.  This script calls a lot
of other scripts (/etc/rc.network etc.).  You can also put
your own start scripts into the directory /usr/local/etc/rc.d
(make sure that they're executable and the name must be "*.sh")
which will be called with a "start" argument by /etc/rc.

/sbin/init waits for /etc/rc to exit.  If it exits with an
error, init will go to single-user mode.  If everything is OK,
init will initialize all terminals according to /etc/ttys
(this will start the gettys as necessary), which completes the
process of booting into multi-user mode.

If you're interested in details, I'd suggest that you read the
init(8) manpage.

 > AFAIK all Linux distribution use bash as their default shell.

That's because Linux is not UNIX.  :-)

 > So when I
 > got csh as my default root shell, I panic!

Traditionally, csh is root's login shell.  This is true for
every UNIX OS that I can think of, not only FreeBSD.

 > Can anyone teach me how to
 > use csh?

The manpage can.  :-)

 > I don't need to know the details, I just need to know whether
 > csh can cycle through all the commands I've executed (in bash, I can use
 > the up and down arrow),

csh has quite powerful history features.  For example, you can
type ``!!'' to repeat the previous command line, and ``!ps'' to
recall the last command line that started with "ps"  There are
a lot more possibilities, see ``man csh''.

 > and does csh support command/filename
 > completion. If yes, how do I get it? (what key do I need to press? In bash,
 > we use tab to complete command/filename)

In csh, use the <Esc> key for filename completion.

It is recommended that you log in as normal user, then use the
``su -m'' command to get a root shell.  That shell will be your
normal user shell (bash or whatever), not root's login shell
(csh).  If you do it that way, you will never have to work with
csh, not even as root.

You can also use /bin/sh instead of /bin/csh.  When you us
/bin/sh, you can type ``set -E'' to enable "emacs mode".  In
that mode, you can use the cursor keys to navigate and use the
command history.  I don't think it supports completion, though.

 > When I login as root on ttyv*, or if I login as normal user and then I
 > su - to root, I got double "message". One outputed to /var/log/messages
 > and the other outputed to my monitor (ttyv*). How can I omit the output
 > to my ttyv? I am used to Red Hat's behaviour in that messages from
 > kernel never shows up on my console...

You can modify /etc/syslog.conf to specify what gets logged
where.  See ``man syslog.conf'' and ``man syslogd''.

 > 
 > # gnuls -Al --color=auto /lkm
 > total 0
 > What's the difference between /lkm and /modules?

LKMs are old and obsolete.  The directory exists solely for
compatibility.  The new kernel modules are called KLDs.

 > I've recompile my kernel and now, /kernel size is only 1223818 (almost
 > half of the generic stock kernel). Is this size not too big?

No, that's pretty normal.

 > Sorry,
 > cause I'm used to aproximately only 400 KB size of /boot/vmlinuz.

That's because the vmlinuz kernel is compressed.  FreeBSD's
kernel is not compressed by default.  There is (or was) support
for compressing it, but it has disadvantages (e.g. kernel
symbols don't work anymore, so you can't debug it, and certain
tools don't work anymore), and there aren't really any
advantages.

 > Are
 > there other ways I should now to reduce my /kernel size and in the mean
 > time, keep my hardware working properly. I've included options LKM in my
 > kernel config, but that doesn't seem to reduce the size. Or... am I
 > missing some steps similar to make modules ; make modules_install in
 > Linux? I hope I didn't skip steps similar to that when I compiled my
 > /kernel. I do config NAMEOFMYKERNEL ; cd ../../compile/NAMEOFMYKERNEL ;
 > make depend; make ; make install 

You did the correct thing.

In general, you can omit everything from your kernel config
that you don't need (I don't think you need ``options LKM'').
If you've done that, you really shouldn't worry about the
resulting kernel size.  1.2 Mbyte is perfectly OK.  Mine is
1.8 Mbyte, and that's after removing everything I don't need.

There are a few things which can be eitehr statically linked
into your kernel, or used as a module (KLD):  most of the file
system code, the FPU emulators, the Linux emulator, etc.  See
the contents of /modules for all KLDs that are available.
For example, if you have ``options CD9660'' in your kernel
config, it will be compiled statically into your kernel.  If
you omit it, then the KLD module will be used dynamically.

 > Oh yeah... this really bugs me ;) What's the meaning of make world?

If you have a complete source tree of the system installed
under /usr/src, you can use a mechanism called "make world"
to update, recompile and re-install the complete operating
system.

See chapter 18.4. ``Using make world to rebuild your system''
of the FreeBSD Handbook for much more details.

 > 
 > # modstat
 > modstat: /dev/lkm: Device not configured
 > What should I do to make it work? I'm using FreeBSD 3.4 on Intel Pentium
 > 200 MMX...

Use kldstat.

 > How do I start single user mode?

When you boot the system, there's that countdown (from 9 to 0)
before the kernel is booted.  Abort that countdown by pressing
the Space key.  Now you're at the bootloader prompt.  Type
``boot -s''.  This will boot the kernel with the "-s" flag,
which causes it to enter single-user mode.  If your console is
marked as "insecure" in /etc/ttys, it will ask you for the
root password.  Then it will ask you for a shell (/bin/sh is
the default).

Note that, if you start single-user mode this way, only the
root partition is mounted (read-only).  Therefore, the first
thing that you probably want to do is ``fsck -p'' to (quickly)
check the filesystems, then ``mount -a'' to mount them.  Unless
there's a problem with the filesystems, of course.

If your machine is already running in multi-user mode, you can
use the ``shutdown now'' command to go to single-user mode.
If you do that, however, all filesystems are still mounted.

 > I have an Intel Pentium III 450 MHz running on ASUS P3BF motherboard
 > with ATX power supply. I have included APM support in my /kernel. But
 > everytime I halt my system it won't shutdown automatically. Is this
 > normal?

Do you use ``shutdown -p''?  That's supposed to power-off your
machine after it has been shut down properly.  If that doesn't
work:  Are you sure APM is enabled in your BIOS setup?

BTW, your English is very good, as far as I can tell (I'm not
a native English speaker either).  :-)

Regards
   Oliver

-- 
Oliver Fromme, Leibnizstr. 18/61, 38678 Clausthal, Germany
(Info: finger userinfo:olli@dorifer.heim3.tu-clausthal.de)

"In jedem Stück Kohle wartet ein Diamant auf seine Geburt"
                                         (Terry Pratchett)


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200001081305.OAA23249>