• Image Management Service

ims
  1. Help Center
  2. Image Management Service
  3. User Guide
  4. Creating a Private Image
  5. Creating a System Disk Image Using a Linux ECS
  6. (Optional) Configuring Console Logging

(Optional) Configuring Console Logging

Scenarios

If you want to use the ECS console logging function, you need to configure related parameters on the ECS.

Currently, ECSs running the following OSs are supported: CentOS 6 series, Red Hat 6 series, CentOS 7 series, Red Hat 7 series, Ubuntu 14 series, SUSE 11 series, SUSE 12 series, Debian, Ubuntu 16 series, Fedora, FreeBSD, and CoreOS.

Prerequisites

You have logged in to the ECS.

Procedure

Configuration methods for different OSs vary.
  • For CentOS and Red Hat 6 series, perform the following steps:
    1. Run the following command to open the configuration file:

      vi /boot/grub/menu.lst

    2. Locate the row that contains linux, linux16, or kernel (depending on the system), add console=ttyS0 to its end, and delete parameter rhgb quiet. If console=ttyS0 already exists, you do not need to add it. Save the change and exit.
  • For CentOS 7, Red Hat 7, and Ubuntu 14, perform the following steps:
    1. Run the following command to open the configuration file:

      vi /boot/grub2/grub.cfg

    2. Locate the row that contains linux, linux16, or kernel (depending on the system), add console=ttyS0 to its end, and delete parameter rhgb quiet. If console=ttyS0 already exists, you do not need to add it. Save the change and exit.
  • For SUSE Linux 11, perform the following steps:
    1. Run the following command to open the configuration file:

      vi /boot/grub/menu.1st

    2. Locate the row that contains linux, linux16, or kernel (depending on the system) and add console=ttyS0 to its end. If console=ttyS0 already exists, you do not need to add it. Save the change and exit.
  • For SUSE Linux 12, openSUSE 13, and openSUSE 42, perform the following steps:
    1. Run the following command to open the configuration file:

      vi /boot/grub2/grub.cfg

    2. Locate the row that contains linux, linux16, or kernel (depending on the system) and add console=ttyS0 to its end. If console=ttyS0 already exists, you do not need to add it. Save the change and exit.
  • For Debian and Ubuntu 16, perform the following steps:
    1. Run the following command to open the configuration file:

      vi /boot/grub/grub.cfg

    2. Locate the row that contains linux, linux16, or kernel (depending on the system) and add console=ttyS0 to its end. If console=ttyS0 already exists, you do not need to add it. Save the change and exit.
  • For Fedora, perform the following steps:
    1. Run the following command to open the configuration file:

      vi /boot/grub2/grub.cfg

    2. Locate the row that contains linux, linux16, or kernel (depending on the system) and add console=ttyS0 to its end. If console=ttyS0 already exists, you do not need to add it. Save the change and exit.
  • For FreeBSD, perform the following steps:
    1. Run the following command to open the configuration file:

      vi /boot/loader.conf

    2. Add console="comconsole". If console="comconsole" already exists, you do not need to add it. Save the change and exit.
  • For CoreOS, perform the following steps:
    1. Run the following command to check whether ttyS0 has been configured:

      cat /proc/cmdline | grep ttyS0

      • If yes, ttyS0 has been configured.
      • If no, ttyS0 has not been configured. Go to 2.
    2. Run the following command to open the configuration file to be edited:

      vi /usr/share/oem/grub.cfg

      NOTE:

      If the /usr/share/oem/grub.cfg configuration file does not exist, manually create the file.

    3. Add set linux_append="console=ttyS0". If set linux_append="console=ttyS0" already exists, you do not need to add it. Save the change and exit.
NOTE:

To prevent impact on the start of the recovery mode, you are advised to modify only the item used for the default start.