Index: general.ent
===================================================================
--- general.ent	(revision e3b66f307fa83ff4350a96820373297c1ba2bf61)
+++ general.ent	(revision 6e4931872f9b4c462f39a66b109dce1118a4cc27)
@@ -1,5 +1,5 @@
 <!-- $LastChangedBy$ $Date$ -->
 
-<!ENTITY day          "08">                   <!-- Always 2 digits -->
+<!ENTITY day          "09">                   <!-- Always 2 digits -->
 <!ENTITY month        "01">                   <!-- Always 2 digits -->
 <!ENTITY year         "2020">
@@ -7,5 +7,5 @@
 <!ENTITY copyholder   "The BLFS Development Team">
 <!ENTITY version      "&year;-&month;-&day;">
-<!ENTITY releasedate  "January 8th, &year;">
+<!ENTITY releasedate  "January 9th, &year;">
 <!ENTITY pubdate      "&year;-&month;-&day;"> <!-- metadata req. by TLDP -->
 <!ENTITY blfs-version "svn">                  <!-- svn|[release #] -->
Index: introduction/welcome/changelog.xml
===================================================================
--- introduction/welcome/changelog.xml	(revision e3b66f307fa83ff4350a96820373297c1ba2bf61)
+++ introduction/welcome/changelog.xml	(revision 6e4931872f9b4c462f39a66b109dce1118a4cc27)
@@ -43,4 +43,13 @@
 -->
     <listitem>
+      <para>January 9th, 2020</para>
+      <itemizedlist>
+        <listitem>
+          <para>[pierre] - Add early microcode loading to the initramfs.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
       <para>January 8th, 2020</para>
       <itemizedlist>
@@ -100,5 +109,5 @@
         <listitem>
           <para>[bdubbs] - Update to seahorse-3.34.1. Fixes
-          <ulink url="&blfs-ticket-root;12985">#12985</ulink>.</para>
+          <ulink url="&blfs-ticket-root;12986">#12986</ulink>.</para>
         </listitem>
         <listitem>
Index: postlfs/config/firmware.xml
===================================================================
--- postlfs/config/firmware.xml	(revision e3b66f307fa83ff4350a96820373297c1ba2bf61)
+++ postlfs/config/firmware.xml	(revision 6e4931872f9b4c462f39a66b109dce1118a4cc27)
@@ -309,8 +309,10 @@
 
       <para>If you are already booting with an initrd (see <xref
-      linkend="initramfs"/>) you must specify the microcode initrd first, using
-      a line such as <userinput>initrd /microcode.img
-      /other-initrd.img</userinput> (adapt that as above if /boot is not a
-      separate mountpoint).</para>
+      linkend="initramfs"/>), you should run <command>mkinitramfs</command> 
+      again after putting the appropriate blob or container into <filename
+      class="directory">/lib/firmware</filename> as explained above.
+      Alternatively, you can have both initrd on the same line, such as
+      <userinput>initrd /microcode.img /other-initrd.img</userinput> (adapt
+      that as above if /boot is not a separate mountpoint).</para>
 
       <para>You can now reboot with the added initrd, and then use the same
Index: postlfs/filesystems/initramfs.xml
===================================================================
--- postlfs/filesystems/initramfs.xml	(revision e3b66f307fa83ff4350a96820373297c1ba2bf61)
+++ postlfs/filesystems/initramfs.xml	(revision 6e4931872f9b4c462f39a66b109dce1118a4cc27)
@@ -69,5 +69,5 @@
   fi
 
-  if [ -n $file ] ; then
+  if [ -n "$file" ] ; then
     cp $file $WDIR/$2
   else
@@ -209,6 +209,10 @@
 # Install libraries
 sort $unsorted | uniq | while read library ; do
-  if [ "$library" == "linux-vdso.so.1" ] ||
-     [ "$library" == "linux-gate.so.1" ]; then
+# linux-vdso and linux-gate are pseudo libraries and do not correspond to a file
+# libsystemd-shared is in /lib/systemd, so it is not found by copy, and
+# it is copied below anyway
+  if [[ "$library" == linux-vdso.so.1 ]] ||
+     [[ "$library" == linux-gate.so.1 ]] ||
+     [[ "$library" == libsystemd-shared* ]]; then
     continue
   fi
@@ -244,5 +248,29 @@
 ( cd $WDIR ; find . | cpio -o -H newc --quiet | gzip -9 ) &gt; $INITRAMFS_FILE
 
-# Remove the temporary directory and file
+# Prepare early loading of microcode if available
+if ls /lib/firmware/intel-ucode/* &gt;/dev/null 2&gt;&amp;1 ||
+   ls /lib/firmware/amd-ucode/*   &gt;/dev/null 2&gt;&amp;1; then
+
+# first empty WDIR to reuse it
+  rm -r $WDIR/*
+
+  DSTDIR=$WDIR/kernel/x86/microcode
+  mkdir -p $DSTDIR
+
+  if [ -d /lib/firmware/amd-ucode ]; then
+    cat /lib/firmware/amd-ucode/microcode_amd*.bin &gt; $DSTDIR/AuthenticAMD.bin
+  fi
+
+  if [ -d /lib/firmware/intel-ucode ]; then
+    cat /lib/firmware/intel-ucode/* &gt; $DSTDIR/GenuineIntel.bin
+  fi
+
+  ( cd $WDIR; find . | cpio -o -H newc --quiet ) &gt; microcode.img
+  cat microcode.img $INITRAMFS_FILE &gt; tmpfile
+  mv tmpfile $INITRAMFS_FILE
+  rm microcode.img
+fi
+
+# Remove the temporary directories and files
 rm -rf $WDIR $unsorted
 printf "done.\n"
@@ -399,5 +427,4 @@
       <xref role="runtime" linkend="mdadm"/> must be installed before
       generating the initramfs, if the system partition uses them.
-
     </para>
 
@@ -421,4 +448,10 @@
     current directory.</para>
 
+    <para>If early loading of microcode is needed (see <xref
+    linkend="cpu-microcode"/>), you can install the appropriate blob or
+    container in <filename class="directory">/lib/firmware</filename>.
+    It will be automatically added to the initrd when running
+    <command>mkinitramfs</command>.</para>
+
     <para>After generating the initrd, copy it to the <filename
     class='directory'>/boot</filename> directory.</para>
