Problem scenario
You are configuring a new physical server without an image, without an automated unattended installation script or a remote ghosting-type tool (such as Ghost or the NIM tool). How should you format it, install Linux and configure it?
Solution
- Gather the requirements for what its purpose will be and how the monitoring/maintenance and support will be done.
- Configure the BIOS/iLOs/iDRACs first. You will want to lock down the BIOS with a password. In the case of some hardware vendors two or more user accounts will control different aspects of the BIOS/CMOS/UEFI; one account can serve as a backup to the other (if you do not mind having two or more accounts). If you lock yourself out with some unfamiliar options (as few I.T. professionals protect BIOS/UEFI and other pre-boot menus with credentials on a regular basis), it will be best if you have done no work yet. The process for bypassing the credentials could involve losing data.
- Choose your OS. Make an .iso file on some bootable media with the computer you are using to view this website. Remember that CentOS is not what it used to be. Odd versions of Ubuntu are often end-of-lifed sooner than an even-numbered version that is smaller! (Yes, Ubuntu 21.x has a shorter life than 20.x.)
- Configure your RAID array. The one or ones you chose depend on the hardware you have and the future purpose of the server.
- Configure partitioning when you install your OS. There is (usually) no good reason to not have partitioning. Even with one hard disk, partitioning directories can isolate a future file system corruption; this gives your server greater robustness. Suggested partitions (logical volumes): /tmp, /etc, /usr, /home, /var, and /opt. (With an Ubuntu installation look for the "Installation type" menu. You will want to choose "Something else" (not "Erase disk and install Ubuntu"). We know this specific install step because of this page https://www.tecmint.com/install-ubuntu-20-04-desktop/.)
- For Ubuntu some sources disagree, but here are ball park estimates for a typical Debian installation as of 2023:
- boot should be 600 MB (sometimes 250 MB is enough)
- tmp should be the same as the swap partition (unless you need to download very large files to /tmp)
- usr should often be 15% of the available disk space.
- If you are going to be doing considerable development or verbose logging, make sure your /var/ directory is quite large. Some development involves extensive logging.
- If there will be many users, the /usr/ and /home directories should be larger than many regular (website) estimates. Some servers will have very few users, and these directories can be much smaller. Some people use the /opt directory for various third party packages or their own development. But some people use other directories and avoid /opt too.
- Many sources recommend committing all extra space to /home.
- The /usr partition is not for new users. This is where many new packages and many dependencies go by default. Normally it is good to have at least 7 GB for a desktop environment. But we think 10 to 15 GB is preferred. It is possible, but tedious, to install packages and dependencies in other partitions. Some packages like Wine, Darling, graphics tools, Libreoffice may go into /usr or their dependencies will go there. These packages can be quite big.
- It is ideal to encrypt at the beginning when you are installing the OS. It is more secure and manageable to do full disk encryption at the time of the installation.
- Once you encrypt it, you will enter a passphrase before logging in. Servers that get to an OS passphrase prompt are generally usable even if you do not enter a passphrase. But some types of encryption, at the firmware level or with some special hardware module, may require someone to enter the passphrase locally at the "master console."
- You are done. For more details on a partition scheme, see these external pages:
- https://www.dell.com/support/kbdoc/en-us/000131456/the-types-and-definitions-of-ubuntu-linux-partitions-and-directories-explained
- https://www.tnpi.net/wiki/Proper_sizing_of_disk_partitions
- https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/installation_guide/s2-diskpartrecommend-x86