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

Thu Oct 3 04:15:57 UTC 2019
Orion Poplawski <orion at nwra.com>

On 10/2/19 9:33 AM, Richard W.M. Jones wrote:
> 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.
> 

Interesting that that ever worked.  However,
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/performing_an_advanced_rhel_installation/kickstart-commands-and-options-reference_installing-rhel-as-an-experienced-user

does note:

To actually run the installation, one of cdrom, harddrive, hmc, nfs, 
liveimg, or url must be specified.

-- 
Orion Poplawski
Manager of NWRA Technical Systems          720-772-5637
NWRA, Boulder/CoRA Office             FAX: 303-415-9702
3380 Mitchell Lane                       orion at nwra.com
Boulder, CO 80301                 https://www.nwra.com/