openEuler 20.03 LTS SP3 Kickstart Automatic Installation on VMware Workstation

hollowman6

Hollow Man

Posted on February 17, 2022

openEuler 20.03 LTS SP3 Kickstart Automatic Installation on VMware Workstation

Introduction

As openEuler also uses Redhat Anaconda as its OS installer, we can use Kickstart for Automatic Installation. However, the guides provided in the previous documentation officially are not straightforward enough for Linux newbies who tend to use virtual machines for installation. So in this blog, I'm going to show you how to perform openEuler 20.03 LTS SP3 Kickstart Automatic Installation on VMware Workstation with only a single ISO file referring to the CentOS Kickstart Installations Documentation.

Steps

Create the Kickstart file

Copy the following code into a file named ks.cfg at somewhere on your computer.

#version=DEVEL
# Use graphical install
graphical


%packages
@^minimal-environment
@standard

%end

# Keyboard layouts
keyboard --xlayouts='cn'
# System language
lang zh_CN.UTF-8

# Network information
network  --bootproto=dhcp --device=ens160 --onboot=off --ipv6=auto --activate
network  --hostname=localhost.localdomain

# Use CDROM installation media
cdrom

# Run the Setup Agent on first boot
firstboot --enable
# System services
services --enabled="chronyd"

ignoredisk --only-use=nvme0n1
autopart
# Partition clearing information
clearpart --none --initlabel

# System timezone
timezone Asia/Shanghai --utc

# Root password
rootpw openeuler
user --groups=wheel --name=openeuler --password=openeuler --gecos="openEuler"

%addon com_redhat_kdump --disable --reserve-mb='128'

%end

%anaconda
pwpolicy root --minlen=8 --minquality=1 --strict --nochanges --notempty
pwpolicy user --minlen=8 --minquality=1 --strict --nochanges --emptyok
pwpolicy luks --minlen=8 --minquality=1 --strict --nochanges --notempty
%end
Enter fullscreen mode Exit fullscreen mode

The above Kickstart file will set Chinese as the default language, and set the root password to openeuler, with an additional account name and password both openeuler.

If you want to create your own Kickstart file, you can firstly perform a manual installation you would like, after successfully installing and logging into the system, get the generated Kickstart file that corresponds to the manual installation just performed at /root/anaconda-ks.cfg, rename it to ks.cfg.

Generate the ISO file

  • If you are on Linux, run mkisofs for ISO generation:
cd <the folder where you store your ks.cfg>
mkisofs -JR -V OEMDRV -o auto-installation.iso ks.cfg
Enter fullscreen mode Exit fullscreen mode

  • If you are on Windows, you can use UltraISO for ISO generation:
  • open UltraISO, click on the New button, rename the disk into OEMDRV.
  • Press F3 to add file ks.cfg into the ISO, then click on the Save button to save the ISO file as auto-installation.iso.

Configure the Virtual Machine

Please first create the virtual machine on VMware Workstation for openEuler 20.03 LTS SP3. If you don't know how to do this, please refer to the VMware Workstation documentation or related blogs as there're already many tutorials that exist.

  1. In the Virtual Machine's tab, click on the Edit virtual machine settings.
  2. On the prompted Virtual Machine Settings window, click on the Add... button.
  3. On the prompted Add Hardware Wizard dialogue, choose CD/DVD Drive, click on the Finish button.
  4. Then for the newly added CD/DVD Device, choose Use ISO image file:, and click on the Browse... button to select the ISO file auto-installation.iso just created in the last step, finally click on the OK button.

At last, start your virtual machine and enjoy Kickstart automatic installation!

💖 💪 🙅 🚩
hollowman6
Hollow Man

Posted on February 17, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related