Re: RHEL6.5 provisioning without DHCP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You can set the IP address from the boot line.  You may need to know the mac address of the install interface if there is more than one interface on the server.

On Dec 11, 2014 4:11 AM, "Frantisek Krecmer" <f.krecmer@xxxxxxxxx> wrote:
Hello,


I have following scenario:
- need to install very large number of physical servers
- RHEL repository is on the network filer (url install, NFS install available)
- there is no DHCP available (and it is not possible to have one - long story)
- I know serial number and IP for each server

My idea was to boot from installation image rhel-server-6.5-x86_64-boot.iso where I modified following:
- isolinux.cfg to load kickstart file

label Project
  menu label Project
  menu default
  kernel vmlinuz
  append ks=cdrom:/isolinux/ks.cfg initrd=initrd.img

add kickstart file containing network configuration in %pre script (get serial number from dmidecode, assign IP, install from network.  + configure hw raid etc etc)

Basically, something like this:


install
url --url 1.2.3.4.7/rhel-x86_64-server-6.5
...

%include /tmp/network


%pre
#!/bin/sh
#------------------------------------------------------------------------------#
#                     PRE-INSTALL NETWORK SETUP        #
#------------------------------------------------------------------------------#

echo "network --bootproto=static --vlanid=123 --ip=1.2.3.4 --netmask=255.255.248.0 --gateway=1.2.3.5 --nameserver=1.2.3.6 --device=eth0" > /tmp/network

But. System asks for network settings when booted.
I understand that I need to have stage2 loaded before anaconda starts %pre section. So, I need it to use stage2 from iso. But it looks for stage2 on the network when there is url as source in kickstart file. Is there any way how to tell installer:
- start Anaconda from CD (use local install.img), run %pre, download packages from url ?

file copied to /tmp/ks.cfg
setting up kickstart
kickstart forcing text mode
kickstartFromUrl
results of url ks, url http://1.2.3.7/rhel-x86_64-server-6.5
trying to mount CD device /dev/sr0 on /mnt/stage2
drive status is CDC_DISC_OK
transferring /mnt/stage2/images/install.img to /tmp
mounted loopback device /mnt/runtime on /dev/loop0 as /tmp/install.img   #Perfect
Looking for updates in /mnt/stage2/images/updates.img
Looking for product in /mnt/stage2/images/product.img
mounted loopback device /tmp/product-disk on /dev/loop7 as /mnt/stage2/images/product.img
umounting loopback /tmp/product-disk /dev/loop7 
umounting loopback /mnt/runtime /dev/loop0                      #Why??
no stage2= given, assuming http://1.2.3.7/rhel-x86_64-server-6.5/images/install.img   #you have it in /tmp already!
setting language to en_US.UTF-8
starting STEP_METHOD
need to set up networking
...

Do you have any idea if it possible to somehow change this stage2 behavior? I found Anaconda boot options but I am unable to set stage2 either by stage2= or inst.stage2=. 
(Any other idea how to set IP in ks.cfg and use it for packages downloading without DHCP would be also appreciated.)











_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/kickstart-list
_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/kickstart-list

[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux