Kickstart Lab Not Working, Still Booting Off Of DVD Install
Comments
-
JockVSJock Member Posts: 1,118hiddenknight821 wrote: »As I'd love to write up a complete concise KVM version of Jang's lab setup here
BTW, I just notice that Michael Jang posts frequently here:
http://www.linuxquestions.org/questions/linux-certification-46/
I'm going to post a few concerns and see if he will address them.***Freedom of Speech, Just Watch What You Say*** Example, Beware of CompTIA Certs (Deleted From Google Cached)
"Its easier to deceive the masses then to convince the masses that they have been deceived."
-unknown -
varelg Banned Posts: 790I hope you got his help, meanwhile I got some spare time and tried to recreate your setup, I hope I got it right from what you are describing as the desired setup:
-two machines, one has a file server of some sorts (http or ftp) and the other one has the install dvd inside of it.
-first machine, a.k.a the server is up and running. Second machine is about to have its RH system installed and on the very first screen (Install or Repair CentOS) you are entering a boot parameter by pressing TAB and giving the file server's address where KickStart file is stored.
That in my setup worked. KS file wasn't picked up at first boot, but I switched off the NATed NIC of the server and then it worked.
Number of things can go wrong here. Prerequisites for this to work:
-both machines have to be on the same network. In my setup, server has two NIC's. First is of type NAT that provides Internet connection to the VM. Second is a host-only network. This connects server's VM to other potential clients on the internal-only network. That second NIC is assigned a static IP.
-server VM also has a running DHCP server on it that needs to be set up to dole out IP addresses within range of the network to which both machines belong.
-proper setup of the file server on the server VM. You need to properly place the ks.cfg file in the document root and also when typing the address to that file by hand you'll have to address it properly. For example, document root on my http server is /www/docs/my.domain.com (I was toying around with setting up virtual hosts in Apache), and that's where I keep ks.cfg file. To point to this file from another machine I am not typing http://my.domain.com/www/docs/ks.cfg but I'd type http://ip.address.of.my.server./ks.cfg.
-file server itself has to be set up in terms of document root, tested network connectivity, turned on and stays on while client is booting.
-firewall needs to be open for services dhcp, http, in addition to other services for which it is open by default. I have it opened for tftp as well but in this particular setup tftp is not needed so I don't think it actually matters.
-syntax of ks.cfg file. Iron it out by looking at anaconda-ks.cfg setup and follow along that setup by adjusting it to your particulars.
-turn off the NATed NIC on server's VM. I needed it for other setups to provide a gateway for my internal network.
-client VM has to be on the host-only network. This is essential if you need both VM to be on the same network.
It worked for me without having to set up TFTP, provide pxelinux.0 file, install syslinux and set up network boot. I hope this helps. -
varelg Banned Posts: 790Alternatively, you could use DHCP of your home router if you setup both server and client VMs NICs to be on of type NATnetwork, VirtualBox's new networking type. That allows all VMs of that type and on that network to see each other AND have internet connection without doing anything on the guest OS.
-
Xavor Member Posts: 161You said you already disabled iptables and set selinux to permissive on your ftp server. It really sounds like your VirtualBox networking has a misconfiguration.
On the ftp server, you can use tcpdump to watch the interfaces for traffic.
tcpdump -i eth0
On the server you're trying to build, you need to either have dhcp running somewhere to pass an ip addres to your vm or define an ip address.
If it gets an ip address and is on the network, and then it is failing to get the kickstart its an issue with your ftp server. Can you navigate to the ftp server from your browser and see the kickstart? Can you download it?
If you have a dhcp server running, verify it's passing out ip addresses in /var/log/messages. Can also use tcpdump here to verify traffic.
For PXE, the process is pretty similar. You have a copy of the kernel image in a tftpboot directory on a server running xinetd. You have a dhcp server running somewhere which points the tftp-next server address to the tftp server. Finally, you have a kickstart somewhere on nfs, httpd, or ftp.
From the virtual box website:
You would use NAT if you wanted the behavior you see at home where your computer address is translated at the router to use the address of the router your ISP gave you. Virtual box would do a NAT from your desktop to the ip of the virtual machine.
Bridged is what I would use for your purposes. You can also build both vms with just a dvd, stand up the network, and verify they can ping each other.
"
NAT Network
The NAT network is a new NAT flavour introduced in VirtualBox 4.3. See 6.4 for details.
Bridged networking
This is for more advanced networking needs such as network simulations and running servers in a guest. When enabled, VirtualBox connects to one of your installed network cards and exchanges network packets directly, circumventing your host operating system's network stack.
Internal networking
This can be used to create a different kind of software-based network which is visible to selected virtual machines, but not to applications running on the host or to the outside world.
Host-only networking
This can be used to create a network containing the host and a set of virtual machines, without the need for the host's physical network interface. Instead, a virtual network interface (similar to a loopback interface) is created on the host, providing connectivity among virtual machines and the host." -
JockVSJock Member Posts: 1,118Quick update. I finally got this to work, using Apache for the Kickstart install.
I would like to now get it to work using VSFTPD.
I can detail more of what I did later.
thanks***Freedom of Speech, Just Watch What You Say*** Example, Beware of CompTIA Certs (Deleted From Google Cached)
"Its easier to deceive the masses then to convince the masses that they have been deceived."
-unknown -
hiddenknight821 Member Posts: 1,209 ■■■■■■□□□□vsftpd shouldn't be too bad. The setup I posted above was purely done with just FTP server.
-
JockVSJock Member Posts: 1,118So I got Kickstart to work via http. What got me over the hump was the following URL:
http://modlearning.com/centos/building-a-kickstart-server-red-hat-centos-6/
I believe the two main config items on the RHEL server that I fixed were the following:
- setup DirectoryRoot on Apache to /var/www/html/pub/kickstart and from the CLI pointed it to ks=http://192.168.122.2/rhel6_server1.ks.cfg
- setup a 2nd NIC with host-only networking so that the client could get a DHCP assigned address from it
Upon booting up the client, Kickstart finds what it needs with the following parameters:vmlinuz initrd=initrd.img ks=192.168.122.2/rhel6_server1.ks.cfg ip=192.168.122.100 netmask=255.255.255.0 ksdevice=eth0
The only issue now is with the Kickstart file. I'm getting the following error:Error Partitioning Could not allocate requested partitions: not enough free space on disks. Press 'OK' to exit the installer
If I run ksvalidator against the file no errors are returned, so I'm not sure how valid it is to run this against the Kickstart file.
Here is the contents of the Kickstart file that is having an issue.install lang en_US.UTF-8 keyboard us network --bootproto-static --ip=192.168.122.100 --netmask=255.255.255.0 --device=eth0 rootpw --iscrypted (hash goes here) firewall -disabled authconfig --enabledshadow --passalgo-sha512 selinux --disabled timezone --utc America/Chicago bootloader --location=mbr --driverorder=sda --append="crashkernel=auto" clearpart --all --initlabel zerombr text logging --level=info part /boot --fstype="ext4" --size=224 part swap --recommended part pv.00 --size=40000 --grow #part pv.01 --size1 --grow volgroup Vol_Group pv.00 logvol / --fstype=ext4 --name=LogVol00 --vgname-Vol_Group01 --size=5028 logvol /home --fstype=ext4 --name=LogVol01 --vgname-Vol_Group01 --size=2028 logvol /tmp --fstype=ext4 --name=LogVol02 --vgname-Vol_Group01 --size=10052 logvol /usr --fstype=ext4 --name=LogVol03 --vgname-Vol_Group01 --size=8052 logvol /var --fstype=ext4 --name=LogVol04 --vgname-Vol_Group01 --size=4028 logvol /usr/local --fstype=ext4 --name=LogVol05 --vgname-Vol_Group01 --size=3028 logvol /opt --fstype=ext4 --name=LogVol06 --vgname-Vol_Group01 --size=4028 %packages @base @client-mgmt-tools @console-internet @core @debugging @basic-desktop @desktop-platform @directory-client @fonts @general-desktop @hardware-monitoring @internet-browser @java-platform @large-systems @network-file-system-client @network-tools @performance @perl-runtime @security-tools @server-platform @server-policy @system-admin-tools @x11 mtools pax python-dmidecode oddjob wodim sgpio genisoimage device-mapper-peristent-data samba-winbind certmonger pam_krb5 krb5-workstation perl-DBD-SQLite p11-kit-trust %end
***Freedom of Speech, Just Watch What You Say*** Example, Beware of CompTIA Certs (Deleted From Google Cached)
"Its easier to deceive the masses then to convince the masses that they have been deceived."
-unknown -
varelg Banned Posts: 790It may have to do with the size of your disk vs. minimum requirements vs. what you want installed.
-
hiddenknight821 Member Posts: 1,209 ■■■■■■□□□□
part /boot --fstype="ext4" --size=224 part swap --recommended part pv.00 --size=40000 --grow
I see you need at least 40.5 GB of storage space on the system you're attempting to kickstart this on. -
JockVSJock Member Posts: 1,118hiddenknight821 wrote: »
part /boot --fstype="ext4" --size=224 part swap --recommended part pv.00 --size=40000 --grow
I see you need at least 40.5 GB of storage space on the system you're attempting to kickstart this on.
My guest has that capability, however I can up the size a few more GB to see what happens.
EDIT: I've increased the HD space to 45 GB and still the same error.
There are some generic Kickstart files that came with the Jang book, I'm going to see if I can get it to work with these.
I've also worked with the GUI (system-config-kickstart) and I'll see what happens there.
thanks***Freedom of Speech, Just Watch What You Say*** Example, Beware of CompTIA Certs (Deleted From Google Cached)
"Its easier to deceive the masses then to convince the masses that they have been deceived."
-unknown -
Xavor Member Posts: 161Try this instead of defining your partitions to validate your kickstart process works. Then step through adding pieces to the final product until you get it where you are happy with it.
zerombr
clearpart --all
bootloader --location mbr
autopart --type=lvm -
JockVSJock Member Posts: 1,118Success!
The short answer is that I used Kickstart Configurator to generate a ks.cfg file. I ran ksvalidator against it and all appeared fine (ya right...). There was an issue when stepping thru the left-hand side navigation. Issue with Package Selection saying, "Package selection is disabled due to problems downloading package information."
Started the install and it had issues with missing repos, so I added the following to the ks.cfg file:%packages @base @core %end
During the install, also pointed it back to the DVD for the packages and it was successful.
Now I just need to repeat this again and again.***Freedom of Speech, Just Watch What You Say*** Example, Beware of CompTIA Certs (Deleted From Google Cached)
"Its easier to deceive the masses then to convince the masses that they have been deceived."
-unknown -
asummers Member Posts: 157JockVSJock wrote: »Success!
The short answer is that I used Kickstart Configurator to generate a ks.cfg file. I ran ksvalidator against it and all appeared fine (ya right...). There was an issue when stepping thru the left-hand side navigation. Issue with Package Selection saying, "Package selection is disabled due to problems downloading package information."
Started the install and it had issues with missing repos, so I added the following to the ks.cfg file:%packages @base @core %end
During the install, also pointed it back to the DVD for the packages and it was successful.
Now I just need to repeat this again and again.
Thanks for posting the solution. Chalk this down under the "Valuable Lesson Learned".