Skip to main content

the avatar of Hollow Man's Blog

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

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

  • If you are on Windows, you can use UltraISO for ISO generation:
  1. open UltraISO, click on the New button, rename the disk into OEMDRV.
  1. 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.
  1. 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!

a silhouette of a person's head and shoulders, used as a default avatar

Elasticsearch 8 and syslog-ng

General availability of Elasticsearch 8 was announced last week. There were quite a few rumors that it will break compatibility with third party tools. I tested it as soon as I had a little time: I am happy to share that anything I tested with the elasticsearch-http() destination of syslog-ng still seems to work perfectly well with the latest version of Elasticsearch.

You can read the rest of my blog at https://www.syslog-ng.com/community/b/blog/posts/elasticsearch-8-and-syslog-ng

syslog-ng logo

the avatar of openQA-Bites

VS Code and poetry

poetry is (yet another) python packaging and dependency management system. In this blog post I’m gonna describe how I am working with poetry repositories within VS Codium, the freely licensed variant of VS Code.

a silhouette of a person's head and shoulders, used as a default avatar

12 years of syslog-ng (and sudo)

Those who follow me on LinkedIn might have seen an automatic post about my work anniversary. Well, almost nothing of that post is true, but I still consider it to be my real starting date. However, the official date is also impressive: 11.5 years, almost three times the industry average spent at the same workplace.

So, why do I say that the LinkedIn post is not true? Well, because all its major facts are wrong. In reality, the 12 years as open source evangelist at One Identity means that:

  • I started at Balabit, a Hungarian company. One Identity was born only seven years later, and bought Balabit a year later.
  • I started as a QA engineer for syslog-ng. My open source evangelist job was born only two weeks later, when I resigned from my QA engineer job.
  • My current full-time job started only half a year later.

Still, I consider myself to be a part of Balabit (now One Identity Hungary) for 12 years now. I started 12 years ago as a QA engineer. At that time working remotely was not that commonplace as it is now. I had to travel four hours (two hours to and from the office) each and every day. I loved my job, but still it was too much. So, after two weeks I handed in my resignation. Side note: these two weeks were the only period in my whole life when I worked in an office…

It was a Friday afternoon at the end of February. Balázs Scheidler, founder of Balabit and my line manager in the syslog-ng team told me: “Peter. It took you three difficult interviews to get into Balabit. It’s not that easy to escape from here either. I understand your concerns. However, by Monday, when we can do the paperwork, I’ll have another job for you.”. He kept his word: I quit Balabit, but I had a new job as an external consultant: working on syslog-ng Open Source Edition tasks which I could do remotely. Half a year later, I started to work on syslog-ng full time from the comfort of my home. I was the first remote worker at Balabit.

Balabit was acquired by One Identity in 2018. It turned out that sudo maintainer, Todd Miller, became my colleague through the acquisition. Until that – just like most sysadmins – I considered sudo to be just a simple prefix for administrative commands. But then I took a closer look at sudo, and I learned that it’s a lot more: session recording, plugins, LDAP support, and many more. And soon I was spreading the word about the lesser-known features of sudo.

12 years are a lot and I’m bombarded with job offers almost every day. With 20+ years of sysadmin experience, I could easily find something better paying, especially if I accepted one of the many offers I receive from banks. However, my current job is a lot more interesting and a lot more fun than managing systems. I am the public face, evangelist of a well-known open source software developed in Hungary, and for one of the best known security utilities in the Linux / UNIX world. As far as I know, it’s a completely unique position here in Hungary!

syslog-ng logo

a silhouette of a person's head and shoulders, used as a default avatar

Fugue Machine on the M8

Since the start of the year I've been doing weeklybeats. So far it's been possible mainly thanks to the Dirtywave M8's ability to be picked up, instantly turned on and creating. I have to admit to mostly composing in bed (and only occasionally waking up my better half by shaking to the beat).

I'm not going to be spamming the planet with every track, but I do want to share some that I feel worked out. This one is a jam done on the Digitakt (that I actually modified to run on a li-ion battery) and the M8 doing most of the heavy lifting. The track started by setting up Fugue Machine like sequence in the M8. A friend of mine suggested to spice the ambient with a bit of a beat, which I used a Digitakt for. I now map the mixer on the M8 onto the 8 encoders of the Digitakt, but for the jam I was still using the internal keypad.

I really enjoy stepping back into my tracking shoes after two decades, especially when I ran into the old Buzz crew on the Dirtywave Discord server. Shout out to Ilya and Noggin' who've made my re-entry to music super enjoyable.

a silhouette of a person's head and shoulders, used as a default avatar

Fugue Machine on the M8

Since the start of the year I’ve been doing weeklybeats. So far it’s been possible mainly thanks to the Dirtywave M8’s ability to be picked up, instantly turned on and creating. I have to admit to mostly composing in bed (and only occasionally waking up my better half by shaking to the beat).

I’m not going to be spamming the planet with every track, but I do want to share some that I feel worked out. This one is a jam done on the Digitakt (that I actually modified to run on a li-ion battery) and the M8 doing most of the heavy lifting. The track started by setting up Fugue Machine like sequence in the M8. A friend of mine suggested to spice the ambient with a bit of a beat, which I used a Digitakt for. I now map the mixer on the M8 onto the 8 encoders of the Digitakt, but for the jam I was still using the internal keypad.

I really enjoy stepping back into my tracking shoes after two decades, especially when I ran into the old Buzz crew on the Dirtywave Discord server. Shout out to Ilya and Noggin’ who’ve made my re-entry to music super enjoyable.

a silhouette of a person's head and shoulders, used as a default avatar

Droneman

Probably only a fraction of you had a chance to see Droneman in a theatre. It's available on Netflix, so perhaps not universally, but ever so slightly more available to a global audience. Why would I be plugging a movie? Because it's my only entry in IMDB and features a spectacular performance by my son, that's why!

Droneman

a silhouette of a person's head and shoulders, used as a default avatar

Droneman

Probably only a fraction of you had a chance to see Droneman in a theatre. It’s available on Netflix, so perhaps not universally, but ever so slightly more available to a global audience. Why would I be plugging a movie? Because it’s my only entry in IMDB and features a spectacular performance by my son, that’s why!

Droneman

a silhouette of a person's head and shoulders, used as a default avatar

Make Hibernation Great Again!

 I have now put the fixes from the last two blogposts into a github repository: https://github.com/seife/make-hibernate-great-again so that you can just clone it, examine what it does and then run

sudo make install

followed by

sudo dracut -f

This should do the following:

  • let resume actually work (by enabling the dracut resume module)
  • make hibernate more verbose (switch to an empty text console and increase the kernel's log level before hibernation, restore after resume)
  • make resume more verbose
Have fun!

I have also packaged it in obs://home:seife:testing, but I do not really advise to use this repo on anything but my own machines ;-) 

 

 


a silhouette of a person's head and shoulders, used as a default avatar

"hibernation fix" part 2: verbose resume

Now that I fixed hibernation to resume at all, I found another thing I had added to my old install long ago.
The "problem" is, that resume from hibernation is very quiet. So all you see is the GRUB messages "loading kernel", "loading initrd", then nothing, just the disk light may be blinking for quite some time, and if resume is successful, you'll see the unlock prompt of your screenlock.
That's a bit too little "user interface" for my taste.

The reason it is like this is, that the kernel's progress messages (in 10% steps) are printed with level "pr_info":

    if (!(nr_pages % m))
        pr_info("Image loading progress: %3d%%\n",
                                     nr_pages / m * 10);

But the default "quiet" boot suppresses KERN_INFO messages, which is good because without that, you cannot find the prompt for unlocking your crypted filesystems amongst all those KERN_INFO messages during boot... so how to fix it?

We can just adapt the systemd-hibernate-resume.service to increase the kernel log level just before starting to resume, via a dropin file in /etc/systemd/system/systemd-hibernate-resume.service.d/10-resume-verbose.conf:

[Service]
ExecStartPre=/bin/sh -c "echo 7 > /proc/sys/kernel/printk"
ExecStartPost=/bin/sh -c "echo 1 > /proc/sys/kernel/printk"

Also, add the file to your dracut config, so that it is actually included in the initrd:

install_items+=" /etc/systemd/system/systemd-hibernate-resume@.service.d/10-resume-verbose.conf "

now rebuild your initrd with "dracut -f" and enjoy :-)

Oh, and of course this only helps if you do not use things like plymouth which actually hide everything interesting during boot. Update 2022-02-12: it also works with plymouth, because image loading kicks in before plymouth can hide the interesting bits.