πŸ› οΈ Steps to Set Up a New Linux Server with Partitioning

1. Boot from Installation Media

  • Insert your Linux distribution ISO (e.g., Ubuntu, CentOS, AlmaLinux).
  • Boot from USB/DVD and start the installation process.

2. Choose Installation Type

  • Select β€œManual” or β€œCustom” partitioning when asked.
  • This gives you full control over disk layout.

🧩 Recommended Partition Scheme (for general-purpose server)

Mount PointSizeFile SystemPurpose
/boot1 GBext4Holds bootloader and kernel files
/20–30 GBext4/xfsRoot filesystem
/home10–50 GB or moreext4/xfsUser data (optional on servers)
/var10–50 GBext4/xfsLogs, mail, web data, packages
/tmp2–10 GBext4Temporary files
swap1–4 GB (or 2x RAM if <4GB RAM)swapVirtual memory fallback

Optional Partitions:

  • /srv – For hosting service data (web, FTP).
  • /opt – For third-party applications.
  • /data – If you’ll store a large amount of data separately.

3. Set Mount Points and File Systems

  • For each partition, specify the mount point, size, and file system (ext4 is common).
  • Make sure to format each partition (except for swap).

4. Set Bootloader Location

  • Usually installed to the primary disk (e.g., /dev/sda).

5. Complete the Installation

  • Set root password and configure user(s).
  • Finish installation and reboot.

πŸ”’ Tips:

  • Use LVM (Logical Volume Manager) if you want flexible resizing later.
  • Consider RAID setup for redundancy if your server has multiple disks.
  • Always have backups before repartitioning or reformatting disks.

By admin