Blog / Linux/ Complete Guide to Installing Debian Remotely via IPMI

Complete Guide to Installing Debian Remotely via IPMI

使用IPMI远程安装Debian系统完整指南

Prerequisites

Remote system installation via IPMI relies on mounting the installation ISO to a virtual CD/DVD drive. Ensure the following preparations are complete:

  1. Download the latest Debian installation ISO from the official Debian website (the netinst image is recommended for its smaller size).
  2. Ensure your local computer has a Java Runtime Environment (JRE) installed to run the IPMI Java console.
  3. Ensure a stable network connection between your local machine and the server. If the connection is poor, consider using a temporary cloud instance geographically closer to the server as a jump host.

Step-by-Step Procedure

1. Connect to the IPMI Management Interface

Access the server's IPMI management address via the VPN or dedicated network channel provided by your hosting provider. Login credentials are typically supplied by the provider via email.

2. Launch the Java Console

After logging in, locate and download the Java console launcher file (usually named launch.jnlp). Double-click to run it on your local machine and authorize its launch when prompted by security warnings.

3. Mount the Installation ISO

Within the Java console interface:

  1. Find and click the "Virtual Storage" or similar option.
  2. Under "CD-ROM Image" or "ISO File," select "Open Image" and choose your downloaded Debian ISO file.
  3. Set the connection status to "Connected" or click the "Mount" button.

4. Reboot and Boot from the Virtual Drive

Return to the console's main interface, find the power management options, and perform a "Restart" or "Cold Reset." During the server reboot, you may need to press a key (e.g., F11) to enter the boot menu and select the virtual CD-ROM (which may appear as "ATA CD-ROM" or similar).

5. Install Debian

The system will boot from the mounted ISO into the Debian installer. Key steps include:

  • Language & Region: Choose as needed.
  • Network Configuration:
    • Hostname: Can be customized.
    • Domain name: Can be left blank if not applicable.
    • Important: When configuring the network, set the DNS servers to 8.8.8.8 and 8.8.4.4 (or your provider's DNS) to ensure software repository addresses can be resolved during installation.
  • Mirror Selection: Choose a mirror geographically close to the server (e.g., Alibaba Cloud or Tencent Cloud mirrors for servers in China) to speed up package downloads.
  • Software Selection: For server use, deselect "Debian desktop environment" and "GNOME" (or other graphical interfaces). Select only "SSH server" and "standard system utilities."
  • Install GRUB: Install the GRUB boot loader to the hard disk (typically /dev/sda).
  • Finish Installation: After installation completes, you will be prompted to reboot. First, return to the IPMI virtual storage interface and disconnect (unmount) the ISO image, then allow the system to reboot. Otherwise, it will boot back into the installer.

Post-Installation Basic Configuration

1. Update System and Package Lists

After your first login (using the regular user created during installation), immediately update the package lists and upgrade the system.

sudo apt update
sudo apt upgrade -y

If needed, you can modify the software source configuration file /etc/apt/sources.list to use a faster local mirror (e.g., Alibaba Cloud).

2. Enable Root SSH Login (Optional, Not Recommended)

Debian disables root SSH password login by default. To enable it temporarily (only recommended for initial configuration), edit the SSH configuration:

sudo nano /etc/ssh/sshd_config

Find the line #PermitRootLogin prohibit-password and change it to:

PermitRootLogin yes

Then restart the SSH service:

sudo systemctl restart ssh

Security Warning: After completing necessary root-level configurations, strongly consider changing this setting back to prohibit-password or no and use a regular user with sudo privileges instead.

3. Configure Terminal Color Display

Edit the global bash configuration:

sudo nano /etc/bash.bashrc

Add the following lines to the end of the file:

export LS_OPTIONS='--color=auto'
eval "`dircolors`"
alias ls='ls $LS_OPTIONS'
alias ll='ls $LS_OPTIONS -l'
alias l='ls $LS_OPTIONS -lA'

Apply the changes immediately:

source /etc/bash.bashrc

Common Issues and Tips

  • IPMI Console Unresponsive: Check your local Java version and try using the latest JRE. Sometimes you need to add the IPMI address to Java's security exception list.
  • Network Failure During Installation: Verify DNS settings are correct, or manually specify available DNS servers during the installer's network configuration.
  • Server Won't Boot from Virtual Drive: Ensure the ISO is successfully mounted and connected. Check the boot order settings in the server's BIOS/IPMI and set the virtual drive as the first boot device.
  • Incorrect System Time: Install the ntp or systemd-timesyncd service to synchronize time: sudo apt install systemd-timesyncd -y.

Post a Comment

Your email will not be published. Required fields are marked with *.