[CentOS-devel] Booting CentOS 8 in a VM - can't find the disk

Wed Oct 2 15:33:53 UTC 2019
Richard W.M. Jones <rjones at redhat.com>

On Wed, Sep 25, 2019 at 04:46:40PM +0100, Richard W.M. Jones wrote:
> I'm trying to boot CentOS 8 in a VM using my usual kickstart and
> virt-install recipes.  Dracut fails in a way that indicates it cannot
> find the install disk:
> 
> [    4.984555] IPv6: ADDRCONF(NETDEV_UP): enp1s0: link is not ready
> [    4.985509] 8021q: adding VLAN 0 to HW filter on device enp1s0
> [    5.599558] IPv6: ADDRCONF(NETDEV_CHANGE): enp1s0: link becomes ready
> [    7.058879] dracut-initqueue[926]: RTNETLINK answers: File exists
> [  134.439929] dracut-initqueue[926]: Warning: dracut-initqueue timeout - starting timeout scripts
> [  134.969517] dracut-initqueue[926]: Warning: dracut-initqueue timeout - starting timeout scripts
> [  135.488283] dracut-initqueue[926]: Warning: dracut-initqueue timeout - starting timeout scripts
> (repeated endlessly until it drops into the emergency shell)
> 
> The kernel sees the virtio-blk device, the kmod is loaded, and
> /dev/vda exists ...
> 
> So I don't really know.  Can anyone see my mistake?
> 

My colleague worked out what is going on and it does appear to be an
actual bug in CentOS 8.

The problem is fixed by adding one line to the kickstart:

> # Kickstart file for centos-8.0
> # Generated by libguestfs.git/builder/templates/make-template.ml
> 
> install
> text
> reboot
> lang en_US.UTF-8
> keyboard us
> network --bootproto dhcp
> rootpw builder
> firewall --enabled --ssh
> timezone --utc America/New_York
> selinux --enforcing
> 
> bootloader --location=mbr --append="console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH"

url --url="http://mirror.centos.org/centos-8/8/BaseOS/x86_64/os"

> zerombr
> clearpart --all --initlabel --disklabel=gpt
> autopart --type=plain
> 
> # Halt the system once configuration has finished.
> poweroff
> 
> %packages
> @core
> %end

But in previous versions of CentOS, and indeed in RHEL 8, this line is
not necessary, it is somehow inferred (from the kernel command line?
I'm not sure from where).

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW