LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 09-30-2018, 11:48 AM   #1
sleepee
LQ Newbie
 
Registered: Sep 2018
Location: Caribbean
Distribution: CentOS/RHEL, Ubuntu
Posts: 6

Rep: Reputation: Disabled
virt-install + Kickstart provisioning keeps dropping to dracut shell


Hello everybody,
First time posting here on LQ.

So, I've been trying to automate the provisioning of vm's on my KVM host running CentOS7 as much as possible.
So, I created a kickstart file, and a virt-install script that calls the kickstart file.
Almost everything works as expected, but a short while after Kickstart starts doing its thing, I start getting a whole bunch of error messages that look like this:

Code:
[  188.602345] dracut-initqueue[699]: Warning: dracut-initqueue timeout - starting timeout scripts
That line repeats dozens and dozens of times until i finally get this message:

Code:
[  188.602345] dracut-initqueue[699]: Warning: dracut-initqueue timeout - starting timeout scripts
[  188.602654] dracut-initqueue[699]: Warning: Could not boot.
[  188.733354] dracut-initqueue[699]: Warning: /dev/root does not exist
         Starting Dracut Emergency Shell...
Warning: /dev/root does not exist

Generating "/run/initramfs/rdsosreport.txt"


Entering emergency mode. Exit the shell to continue.
Type "journalctl" to view system logs.
You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick or /boot
after mounting them and attach it to a bug report.


dracut:/#
Here's a link to the rdsosreport.txt

Now, as you can see, the warning says "/dev/root does not exist", and indeed, from the dracut shell, I can see that /dev/root doesn't exist.

Code:
dracut:/# ls -lh /dev/root
ls: cannot access /dev/root: No such file or directory
But I'm not sure why I get that message though. I got the ks.cfg file from an existing vm that I installed with the virt-manager GUI (although I did add/modify a few things).
And from the rdsosreport log, I can't find anything else that's going wrong.


Here's the virt-install script that creates the vm

And here's the ks.cfg kickstart file that the script calls.

I can spin up vm's with no problems whatsoever when I use the virt-manager GUI. Also, the virt-install script seems to do its job of actually creating the VM and calling the kickstart file.
So, I assume that the problem is within the kickstart file, but I just can't seem to find what I'm doing wrong.

Any help or input would be appreciated.
Thanks in advance.

Last edited by sleepee; 09-30-2018 at 05:26 PM.
 
Old 09-30-2018, 03:55 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
I am not sure if it’s relevant, but here you call partition 1 “sda1”:
Code:
part sda1 --size=1024 --fstype=ext4 --asprimary --ondisk=vda
And shouldn’t you create vda2 somewhere?
 
Old 09-30-2018, 05:22 PM   #3
sleepee
LQ Newbie
 
Registered: Sep 2018
Location: Caribbean
Distribution: CentOS/RHEL, Ubuntu
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
I am not sure if it’s relevant, but here you call partition 1 “sda1”:
Code:
part sda1 --size=1024 --fstype=ext4 --asprimary --ondisk=vda
And shouldn’t you create vda2 somewhere?

Good catch. I actually didn't see that before.
Probably a typo I left while I was tinkering with the ks.cfg file.

So, I changed the ks.cfg file so that now it reads like this:

Code:
ignoredisk --only-use=vda
#System bootloader configuration
bootloader --location=mbr --boot-drive=vda
#Clear the Master Boot Record
zerombr
#Partition clearing information
clearpart --all --initlabel 
#Disk partitioning information
part vda1 --size=1024 --fstype=ext4 --asprimary --ondisk=vda
part /boot --size=1024 --onpart=vda1
part vda2 --size=1 --grow --asprimary --ondisk=vda
part pv.00 --size=1 --grow --onpart=vda2
volgroup rootvg pv.00
logvol / --fstype=ext4 --vgname=rootvg --size=2048 --grow --name=root
So now it reads vda1 instead of sda1
And I added a line to create vda2, which fills the rest of the disk.

But I tried to spin up a VM again after changing the ks.cfg again, and I'm still getting the same "Warning: /dev/root does not exist" error.

I'm totally out of any ideas.
Thanks for the help though.
 
Old 09-30-2018, 10:13 PM   #4
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
That's hard to troubleshoot, isn't it?

Your virt-install script doesn't specify the disk bus (scsi or virtio). I would think that the default is virtio, so that your kickstart should work, but perhaps I am wrong? Best to specify virtio explicitly, e.g. --disk ${disk_image_file},bus=virtio.

How did you create the kickstart file? A good practice is basing it on a manual installation that is as close as possible to your intended automatic installation. When your manual installation is complete, find the corresponding kickstart file under /root and adapt it.
 
Old 10-02-2018, 08:17 AM   #5
sleepee
LQ Newbie
 
Registered: Sep 2018
Location: Caribbean
Distribution: CentOS/RHEL, Ubuntu
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
That's hard to troubleshoot, isn't it?

Your virt-install script doesn't specify the disk bus (scsi or virtio). I would think that the default is virtio, so that your kickstart should work, but perhaps I am wrong? Best to specify virtio explicitly, e.g. --disk ${disk_image_file},bus=virtio.

How did you create the kickstart file? A good practice is basing it on a manual installation that is as close as possible to your intended automatic installation. When your manual installation is complete, find the corresponding kickstart file under /root and adapt it.
Well, I just tried with buses virtio, sata, and scsi, and none of them worked. I still get the same "Warning: /dev/root does not exist" message and dropped to a dracut shell again.
All my other VM's (installed with virt-manager) use virtio.

I actually got the ks.cfg file from another VM. I did modify the ks.cfg and add some stuff, like a different partitioning scheme and language support. But I ran ksvalidator on the ks.cfg file I'm working with, and it gave no errors.

I'd really like this to work, but I have no idea what to even look for anymore. It doesn't seem like this should be that complicated. If it works with virt-manager, I'm not sure why it doesn't work with the virt-install command.
 
Old 06-20-2022, 05:07 AM   #6
uselesslogin
LQ Newbie
 
Registered: Feb 2011
Posts: 3

Rep: Reputation: 0
My Issue

Just for anyone who may be searching and come across this page.

In my case the actual issue was the kickstart file itself was not at the location specified by the init.ks kernel arg. Basically it was /tmp/some.ks on my system, and I accidentally set the ks.init arg to the same path, when it is actually /some.ks inside of the vm itself.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kickstart network install over a new virt network switch ending with 'pane is dead' error. KarolDworak Linux - Newbie 4 07-26-2018 10:59 PM
[SOLVED] Trouble with Kickstart when using virt-install KarolDworak Linux - Virtualization and Cloud 1 07-24-2018 12:15 AM
CentOS-7 Kickstart falls to a dracut emergency shell g.navink CentOS 2 03-04-2015 12:08 AM
Kickstart- Issues with provisioning CentOS 6.x RAID1 amora Linux - Software 1 01-17-2013 04:48 AM
Dropping to shell during install koolhandlinc Linux - Newbie 1 05-23-2007 07:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 04:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration