User Tools

Site Tools


Next Steps and Where to Go From Here

Shutting down the system

To shut down a running BlackWeb Linux GNU/Linux system, you must not reboot with the reset switch on the front or back of your computer, or just turn off the computer. BlackWeb Linux GNU/Linux should be shut down in a controlled manner, otherwise files might get lost and/or disk damage might occur. If you run a desktop environment, there is usually an option to “log out” available from the application menu that allows you to shutdown (or reboot) the system.

Alternatively you can press the key combination Ctrl-Alt-Del . A last option is to log in as root and type one of the commands poweroff, halt or shutdown -h now if either of the key combinations do not work or you prefer to type commands; use reboot to reboot the system.

If You Are New to Unix

If you are new to Unix, you probably should go out and buy some books and do some reading. A lot of valuable information can also be found in the BlackWeb Linux Reference ( This list of Unix FAQs ( contains a number of UseNet documents which provide a nice historical reference.

Linux is an implementation of Unix. The Linux Documentation Project (LDP) ( collects a number of HOWTOs and online books relating to Linux. Most of these documents can be in-stalled locally; just install the doc-linux-html package (HTML versions) or the doc-linux-text package (ASCII versions), then look in /usr/share/doc/HOWTO. International versions of the LDP HOWTOs are also available as BlackWeb Linux packages.

Orienting Yourself to BlackWeb Linux

BlackWeb Linux is a little different from other distributions. Even if you’re familiar with Linux in other distributions, there are things you should know about BlackWeb Linux to help you to keep your system in a good, clean state. This chapter contains material to help you get oriented; it is not intended to be a tutorial for how to use BlackWeb Linux, but just a very brief glimpse of the system for the very rushed.

BlackWeb Linux Packaging System

The most important concept to grasp is the BlackWeb Linux packaging system. In essence, large parts of your system should be considered under the control of the packaging system. These include:

• /usr (excluding /usr/local)

• /var (you could make /var/local and be safe in there)

• /bin

• /sbin

• /lib

For instance, if you replace /usr/bin/perl, that will work, but then if you upgrade your perl package, the file you put there will be replaced. Experts can get around this by putting packages on “hold” in aptitude.

One of the best installation methods is apt. You can use the command line version apt-get or full-screen text version aptitude. Note apt will also let you merge main, contrib, and non-free so you can have export-restricted packages as well as standard versions.

Additional Software Available for BlackWeb Linux

There are official and unofficial software repositories that are not enabled in the default BlackWeb Linux install. These contain software which many find important and expect to have. Information on these additional repositories can be found on the BlackWeb Linux Wiki page titled The Software Available for BlackWeb Linux’s Stable Release (

Application Version Management

Alternative versions of applications are managed by update-alternatives. If you are maintaining mul-tiple versions of your applications, read the update-alternatives man page.

Cron Job Management

Any jobs under the purview of the system administrator should be in /etc, since they are configuration files. If you have a root cron job for daily, weekly, or monthly runs, put them in /etc/cron.{daily,weekly,monthly}. These are invoked from /etc/crontab, and will run in alphabetic order, which serializes them.

On the other hand, if you have a cron job that (a) needs to run as a special user, or (b) needs to run at a special time or frequency, you can use either /etc/crontab, or, better yet, /etc/cron.d/whatever. These particular files also have an extra field that allows you to stipulate the user account under which the cron job runs.

In either case, you just edit the files and cron will notice them automatically. There is no need to run a special command. For more information see cron(8), crontab(5), and /usr/share/doc/cron/README.BlackWeb Linux.

Further Reading and Information

If you need information about a particular program, you should first try man program, or info program.

There is lots of useful documentation in /usr/share/doc as well. In particular, /usr/share/doc/HOWTO and /usr/share/doc/FAQ contain lots of interesting information. To submit bugs, look at /usr/share/doc/BlackWeb Linux/bug*. To read about BlackWeb Linux-specific issues for particular programs, look at /usr/share/doc/(package name)/README.BlackWeb Linux.

The BlackWeb Linux web site ( contains a large quantity of documentation about De-bian. In particular, see the BlackWeb Linux GNU/Linux FAQ ( and the Debian Reference (http://www.BlackWeb An index of more BlackWeb Linux documentation is available from the BlackWeb Linux Documentation Project (http://www.BlackWeb The BlackWeb Linux community is self-supporting; to subscribe to one or more of the BlackWeb Linux mailing lists, see the Mail List Subscription (http://www.BlackWeb page. Last, but not least, the BlackWeb Linux Mailing List Archives (http://lists.BlackWeb contain a wealth of information on BlackWeb Linux.

A general source of information on GNU/Linux is the Linux Documentation Project ( There you will find the HOWTOs and pointers to other very valuable information on parts of a GNU/Linux system.

Setting Up Your System To Use E-Mail

Today, email is an important part of many people’s life. As there are many options as to how to set it up, and as having it set up correctly is important for some BlackWeb Linux utilities, we will try to cover the basics in this section.

There are three main functions that make up an e-mail system. First there is the Mail User Agent (MUA) which is the program a user actually uses to compose and read mails. Then there is the Mail Transfer Agent (MTA) that takes care of transferring messages from one computer to another. And last there is the Mail Delivery Agent (MDA) that takes care of delivering incoming mail to the user’s inbox.

These three functions can be performed by separate programs, but they can also be combined in one or two programs. It is also possible to have different programs handle these functions for different types of mail.

On Linux and Unix systems mutt is historically a very popular MUA. Like most traditional Linux programs it is text based. It is often used in combination with exim or sendmail as MTA and procmail as MDA.

With the increasing popularity of graphical desktop systems, the use of graphical e-mail programs like GNOME’s evolution, KDE’s kmail or Mozilla’s thunderbird (in BlackWeb Linux available as icedove1) is becoming more popular. These programs combine the function of a MUA, MTA and MDA, but can — and often are — also be used in combination with the traditional Linux tools.

Default E-Mail Configuration

Even if you are planning to use a graphical mail program, it is important that a traditional MTA/MDA is also installed and correctly set up on your BlackWeb Linux GNU/Linux system. Reason is that various util-ities running on the system2 can send important notices by e-mail to inform the system administrator of (potential) problems or changes.

For this reason the packages exim4 and mutt will be installed by default (provided you did not unse-lect the “standard” task during the installation). exim4 is a combination MTA/MDA that is relatively small but very flexible. By default it will be configured to only handle e-mail local to the system itself and e-mails addressed to the system administrator (root account) will be delivered to the regular user account created during the installation. When system e-mails are delivered they are added to a file in /var/mail/account_name. The e-mails can be read using mutt.

Sending E-Mails Outside The System

As mentioned earlier, the installed BlackWeb Linux system is only set up to handle e-mail local to the system, not for sending mail to others nor for receiving mail from others.

If you would like exim4 to handle external e-mail, please refer to the next subsection for the basic available configuration options. Make sure to test that mail can be sent and received correctly.

If you intend to use a graphical mail program and use a mail server of your Internet Service Provider (ISP) or your company, there is not really any need to configure exim4 for handling external e-mail. Just configure your favorite graphical mail program to use the correct servers to send and receive e-mail (how is outside the scope of this manual).

However, in that case you may need to configure individual utilities to correctly send e-mails. One such utility is reportbug, a program that facilitates submitting bug reports against BlackWeb Linux packages. By default it expects to be able to use exim4 to submit bug reports.

To correctly set up reportbug to use an external mail server, please run the command reportbug –configure and answer “no” to the question if an MTA is available. You will then be asked for the SMTP server to be used for submitting bug reports.

Configuring the Exim4 Mail Transport Agent

If you would like your system to also handle external e-mail, you will need to reconfigure the exim4 package4:

# dpkg-reconfigure exim4-config

After entering that command (as root), you will be asked if you want split the configuration into small files. If you are unsure, select the default option.

Next you will be presented with several common mail scenarios. Choose the one that most closely resembles your needs.

internet site

Your system is connected to a network and your mail is sent and received directly using SMTP. On the following screens you will be asked a few basic questions, like your machine’s mail name, or a list of domains for which you accept or relay mail.

mail sent by smarthost

In this scenario your outgoing mail is forwarded to another machine, called a “smarthost”, which takes care of sending the message on to its destination. The smarthost also usually stores incom-ing mail addressed to your computer, so you don’t need to be permanently online. That also means you have to download your mail from the smarthost via programs like fetchmail.

In a lot of cases the smarthost will be your ISP’s mail server, which makes this option very suitable for dial-up users. It can also be a company mail server, or even another system on your own network.

mail sent by smarthost; no local mail

This option is basically the same as the previous one except that the system will not be set up to handle mail for a local e-mail domain. Mail on the system itself (e.g. for the system administra-tor) will still be handled.

local delivery only

This is the option your system is configured for by default.

no configuration at this time

Choose this if you are absolutely convinced you know what you are doing. This will leave you with an unconfigured mail system — until you configure it, you won’t be able to send or receive any mail and you may miss some important messages from your system utilities.

If none of these scenarios suits your needs, or if you need a finer grained setup, you will need to edit configuration files under the /etc/exim4 directory after the installation is complete. More informa-tion about exim4 may be found under /usr/share/doc/exim4; the file README.BlackWeb Linux.gz has further details about configuring exim4 and explains where to find additional documentation.

Note that sending mail directly to the Internet when you don’t have an official domain name, can result in your mail being rejected because of anti-spam measures on receiving servers. Using your ISP’s mail server is preferred. If you still do want to send out mail directly, you may want to use a different e-mail address than is generated by default. If you use exim4 as your MTA, this is possible by adding an entry in /etc/email-addresses.

Compiling a New Kernel

Why would someone want to compile a new kernel? It is often not necessary since the default ker-nel shipped with BlackWeb Linux handles most configurations. Also, BlackWeb Linux often offers several alternative kernels. So you may want to check first if there is an alternative kernel image package that better corresponds to your hardware. However, it can be useful to compile a new kernel in order to:

• handle special hardware needs, or hardware conflicts with the pre-supplied kernels

• use options of the kernel which are not supported in the pre-supplied kernels (such as high memory support)

• optimize the kernel by removing useless drivers to speed up boot time

• create a monolithic instead of a modularized kernel

• run an updated or development kernel

• learn more about linux kernels

Kernel Image Management

Don’t be afraid to try compiling the kernel. It’s fun and profitable.

To compile a kernel the BlackWeb Linux way, you need some packages: fakeroot, kernel-package, linux-source-2.6 and a few others which are probably already installed (see /usr/share/doc/kernel-package/README.gz for the complete list).

This method will make a .deb of your kernel source, and, if you have non-standard modules, make a synchronized dependent .deb of those too. It’s a better way to manage kernel images; /boot will hold the kernel, the, and a log of the active config file for the build.

Note that you don’t have to compile your kernel the “BlackWeb Linux way”; but we find that using the packag-ing system to manage your kernel is actually safer and easier. In fact, you can get your kernel sources right from Linus instead of linux-source-2.6, yet still use the kernel-package compilation method.

Note that you’ll find complete documentation on using kernel-package under /usr/share/doc/kernel-package. This section just contains a brief tutorial.

Hereafter, we’ll assume you have free rein over your machine and will extract your kernel source to somewhere in your home directory5. We’ll also assume that your kernel version is 3.16. Make sure you are in the directory to where you want to unpack the kernel sources, extract them using tar xf /usr/src/linux-source-3.16.tar.xz and change to the directory linux-source-3.16 that will have been created.

Now, you can configure your kernel. Run make xconfig if X11 is installed, configured and being run; run make menuconfig otherwise (you’ll need libncurses5-dev installed). Take the time to read the online help and choose carefully. When in doubt, it is typically better to include the device driver (the software which manages hardware peripherals, such as Ethernet cards, SCSI controllers, and so on) you are unsure about. Be careful: other options, not related to a specific hardware, should be left at the default value if you do not understand them. Do not forget to select “Kernel module loader” in “Loadable module support” (it is not selected by default). If not included, your BlackWeb Linux installation will experience problems.

Clean the source tree and reset the kernel-package parameters. To do that, do make-kpkg clean.

Now, compile the kernel: fakeroot make-kpkg –initrd –revision=1.0.custom kernel_image. The version number of “1.0” can be changed at will; this is just a version number that you will use to track your kernel builds. Likewise, you can put any word you like in place of “custom” (e.g., a host name). Kernel compilation may take quite a while, depending on the power of your machine.

Once the compilation is complete, you can install your custom kernel like any package. As root, do dpkg -i ../linux-image-3.16-subarchitecture_1.0.custom_i386.deb. The subarchitecture part is an optional sub-architecture, such as “686”, depending on what kernel options you set. dpkg -i will install the kernel, along with some other nice supporting files. For instance, the will be properly installed (helpful for debugging kernel problems), and /boot/config-3.16 will be installed, containing your current configuration set. Your new kernel package is also clever enough to automatically update your boot loader to use the new kernel. If you have created a modules package, you’ll need to install that package as well.

It is time to reboot then shutdown -r

the system: read carefully any warning that the above step may have produced, now.

For more information on BlackWeb Linux kernels and kernel compilation, see the BlackWeb Linux Linux Kernel Hand-book (http://kernel-handbook.alioth.BlackWeb For more information on kernel-package, read the fine documentation in /usr/share/doc/kernel-package.

Recovering a Broken System

Sometimes, things go wrong, and the system you’ve carefully installed is no longer bootable. Perhaps the boot loader configuration broke while trying out a change, or perhaps a new kernel you installed won’t boot, or perhaps cosmic rays hit your disk and flipped a bit in /sbin/init. Regardless of the cause, you’ll need to have a system to work from while you fix it, and rescue mode can be useful for this.

To access rescue mode, select rescue from the boot menu, type rescue at the boot: prompt, or boot with the rescue/enable=true boot parameter. You’ll be shown the first few screens of the installer, with a note in the corner of the display to indicate that this is rescue mode, not a full installation. Don’t worry, your system is not about to be overwritten! Rescue mode simply takes advantage of the hardware detection facilities available in the installer to ensure that your disks, network devices, and so on are available to you while repairing your system.

Instead of the partitioning tool, you should now be presented with a list of the partitions on your system, and asked to select one of them. Normally, you should select the partition containing the root file system that you need to repair. You may select partitions on RAID and LVM devices as well as those created directly on disks.

If possible, the installer will now present you with a shell prompt in the file system you selected, which you can use to perform any necessary repairs. For example, if you need to reinstall the GRUB boot loader into the master boot record of the first hard disk, you could enter the command grub-install ’(hd0)’ to do so.

If the installer cannot run a usable shell in the root file system you selected, perhaps because the file system is corrupt, then it will issue a warning and offer to give you a shell in the installer environment instead. You may not have as many tools available in this environment, but they will often be enough to repair your system anyway. The root file system you selected will be mounted on the /target directory.

In either case, after you exit the shell, the system will reboot.

Finally, note that repairing broken systems can be difficult, and this manual does not attempt to go into all the things that might have gone wrong or how to fix them. If you have problems, consult an expert.

next_steps_and_where_to_go_from_here.txt · Last modified: 2019/07/10 18:54 by admin

(C) BlackWeb Security 2016 - 2023