tier1.jp

Debian basic settings and tools

STATUS: Frozen (2019-11-17)

No more updates for this guide.

Please refer to the TOC page.

If you install Debian GNU/Linux in expert mode, like this guide in this site, some of the essential tools are not be installed.

Rev11

Add buster gpg related note.

Basic tools

The most biggest problem with minimum system installation might be a lack of man-db and less.

root# apt install less man-db # at least
root# apt install exfat-fuse # if you want it

gpg package

Debian stretch has gpg but buster does not on this minimal installation process.

If you need it, install gpg manually (buster).

Hint

exfat-fuse and using external USB storage formatted by exFAT is a simple way to backup tarballs.

We use gpg to encrypt those backup tarballs.

  • In the box, data is encrypted by LUKS.
  • Out of the box, data is encrypted by gpg.

Suspend to RAM (optional)

To suspend to RAM, we need s2ram in uswsusp package.

root# apt install uswsusp

Tip

To make machine suspended by power button, edit /etc/systemd/logind.conf, HandlePowerKey=suspend.

Make sure you enabled CPU C state support on BIOS.

System temperature

System temperature monitoring is very important.

Warm hardware does not last so long. Keep them cooled.

root# apt install lm-sensors
root# sensors-detect # follow its instruction.
...
Do you want to add these lines automatically to /etc/modules? (yes/NO)yes # your choice
root# /etc/init.d/kmod start
[ ok ] Starting kmod (via systemctl): kmod.service.

and then, you can know the temperatures by,

user$ sensors

It also tell you voltages and fan speeds provided the firmware support is available.

S.M.A.R.T. and NVMe device monitoring (optional)

To monitor HDD/SSD/NVMe health status, we need two packages.

root# apt install smartmontools nvme-cli

You should at least test your new HDD once.

It takes times, but it pays. Same could be said for SATA SSDs.

root# smartctl --test=extend /dev/sdX # e.g.

To check health status of storage device,

root# nvme list
root# nvme smart-log /dev/nvmeX # for NVMe
root# smartctl --all /dev/sdX # for SATA HDD and SSD

Cron for SSD/NVMe status check

It would be good to have some cron jobs to monitor SSD/NVMe health.

This tells us installed NVMe basic health status everyday, as syslog "nvme" entry (which would be sent as a part log logcheck summary mails).

For SATA SSDs, simply use smartmontools.

Debian handy tools (optional)

apt-file can search package by a file name.

root# apt install apt-file
root# apt-file update # should do this after upgrades
user$ apt-file search FILENAME # try ``s2ram`` for example.

Automatic System Upgrades (optional)

unattended-upgrades allows you to keep the box updated.

root# apt install unattended-upgrades
root# dpkg-reconfigure unattended-upgrades

Though it is quite rare, automatic-upgrades could be problem.

  1. You should subscribe to the debian security mailing list.
  2. You should do upgrades manually; know what and how, then do it.

Use this package with care.

Various Firmware binaries (optional)

There are two firmware packages, free and non-free.

  • Typically, non-free firmware includes various hardware drivers.
  • Especially, NVidia Video boards needs non-free binaries.

Warning

It become an important license issue when you re-distribute the system.

Free firmwares are installable without license issues.

root# apt install firmware-linux-free

For non-free firmwares, you have to add non-free in sources.list.

Warning

Again, please be careful when you re-distribute.

You only can do that without those non-free packages.

root# apt install firmware-linux-nonfree
published: MODIFIED: