I have a minimal Centos 7 build. When I run dracut --force, it builds a new initramfs that is 20mb smaller. The only difference in the modules section is an absence of qemu.

localhost login: [ 3322.193617] Restarting system.
[    0.000000] Cannot get hvm parameter CONSOLE_EVTCHN (18): -22!
[    0.817440] Cannot get hvm parameter CONSOLE_EVTCHN (18): -22!
[[32m  OK  [0m] Started Show Plymouth Boot Screen.
[[32m  OK  [0m] Reached target Paths.
[[32m  OK  [0m] Reached target Basic System.
[  123.897756] dracut-initqueue[273]: Warning: dracut-initqueue timeout - starting timeout scripts
[  124.410440] dracut-initqueue[273]: Warning: dracut-initqueue timeout - starting timeout scripts

The boot process for an HVM EC2 instance appears to still require xen-blkfront. However, these are not detected when dracut rebuilds, nor do they show up with modprobe on the running system. I added them using the example in this post and it successfully rebooted.

  • Why are you using HVM with a Linux server? – Rui F Ribeiro Aug 2 '16 at 1:49
  • 1
    "For the best performance, we recommend that you use current generation instance types and HVM AMIs when you launch your instances." -- docs.aws.amazon.com/AWSEC2/latest/UserGuide/… – jamie Aug 2 '16 at 2:30
  • Perhaps my problem is that they should be using the PV drivers even with HVM. So maybe that is something to look into. – jamie Aug 2 '16 at 2:32

If you want to have more generic initramfs to support various types of AWS instance, such as modern M5/C5/t3a, enhanced networking adapter (ENA), EBS optimized disk, nvme, generic xen-blkfront ... etc... You should disable dracut option host-only. (In CentOS default is on)

In short:

dracut -f -v -N


yum install dracut-config-generic
dracult -f -v

Double check: (you should see drivers for ena, xen, nvme, xen-blkfront, etc.)

lsinitrd | grep "ena\|xen\|nvme"

And remember to make sure your /etc/fstab using UUID to map partition instead of device name such as /dev/sdx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.