AsyncTask – Order of Execution / Versions

Order of execution

When first introduced, AsyncTasks were executed serially on a single background thread. Starting with DONUT, this was changed to a pool of threads allowing multiple tasks to operate in parallel. Starting with HONEYCOMB, tasks are executed on a single thread to avoid common application errors caused by parallel execution.

If you truly want parallel execution, you can invoke executeOnExecutor(java.util.concurrent.Executor, Object[]) withTHREAD_POOL_EXECUTOR.

dracut host-only

If you want to create lighter, smaller initramfs images, you may want to specify the –hostonly or -H option.

Using this option, the resulting image will contain only those dracut modules, kernel modules and filesystems, which are needed to boot this specific machine. This has the drawback, that you can’t put the disk on another controller or machine, and that you can’t switch to another root filesystem, without recreating the initramfs

On RHEL-7 the hostonly mode is the default mode. Generic “non-hostonly” images are created, if the dracut-config-generic rpm is installed. The rescue kernel entry in the bootloader menu is also a generic

-N, –no-hostonly
Disable Host-Only mode

rngd service fail

by default, centos 7 enables rngd.service, but it is configured for trust module or just plain misconfigured.


We can easily rectify the problem by editing the service  unit file: /usr/lib/systemd/system/rngd.service. The ExecStart line should be edited so that it reads as in the following:

ExecStart=/sbin/rngd -f -r /dev/urandom

This is also shown in the following screenshot:


We will need to reload the unit file once it has been edited. We can use the following command to achieve this:

# systemctl daemon-reload

With the new unit loaded we can now start the service and check the status:

# systemctl start rngd
# systemctl status rngd

The following video will step you through the process.

lvm.conf – initramfs

centos uses:

dracut -f

After updating /etc/lvm.conf, it’s necessary to update the initrd so that this file will be copied there, where the filter matters the most, during boot. Perform:

update-initramfs -u -k all

Every time either /etc/lvm.conf or /etc/multipath.conf is updated, the initrd should be rebuilt to reflect these changes. This is imperative when blacklists and filters are necessary to maintain a stable storage configuration.