LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-06-2014, 02:46 PM   #1
worldmember
LQ Newbie
 
Registered: Aug 2014
Posts: 7

Rep: Reputation: Disabled
pxe + TFTP


https://www.centos.org/forums
http://www.linuxquestions.org/

I use VMware work station 10 & centos 6.4
I want to install centos on new virtual machine with raw hard disk
I stopped iptables & selinux

I set up local yum repository using file:///softwares, but i coludn't use it by http or ftp

I installed tftp & tftp-server & syslinux
I started httpd & xinetd services

/etc/dhcp/dhcpd.conf
in subnet options, I added
next-server IP of DHCP server (local server I use "centos")
filename ”pxelinux.0”;

/etc/xinetd.d/tftp
server_args = -svv /var/lib/tftpboot
disable = no

I copied pxelinux.0 & menu.c32 & initrd.img & vmlinuz to /var/lob/tfpboot/

/var/lib/tftpboot/pxelinux.cfg/default
PROMPT 0
DEFAULT menu.c32
TIMEOUT ....
ONTIMEOUT localdisk
MENU TITLE .....
LABEL .....
KERNEL vmlinuz
APPEND initrd=initrd.img ks=http://IP of DHCP server/kickstart file name.cfg
(I created in /var/www/html)


/var/www/html/kickstart file name.cfg
install
url --url=”http://IP of DHCP server/centosdvd/”

bootloader --location=mbr

zerombr
clearpart --all --initlabel

part / --asprimary --fstype=”ext4” --size=.....
part swap --asprimary --fstype=”swap” --size=.....

reboot

graphical
firstboot --disable
keyboard us
lang en_US
logging --level=info
timezone Egypt

firewall --disabled
selinux --disabled

network --bootproto=dhcp --device=eth0 --onboot=yes --noipv6

#(grub-crypt --sha-512
#enter new root password twice)
rootpw --iscrypted …..

authconfig --enableshadow
--passalgo=sha512
--enableldap
--enableldapauth
--ldapserver=ldap://IP of this ldap server
--ldapbasedn=”dc=.....,dc=.....” #(I use openldap)

repo –name=”.....” --baseurl=http://IP of DHCP server/centosdvd/

%packages
…...
%end
I changed permissions of /var/lib/tftpboot/ directory & /var/www/html/kickstart file
to 775


in the new virtual machine, when I boot it
it it shows error message that it's unable to download kickstart file

Last edited by worldmember; 08-06-2014 at 10:53 PM.
 
Old 08-06-2014, 04:43 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
Thanks for sharing. Did you have a question or anything?
 
Old 08-06-2014, 10:54 PM   #3
worldmember
LQ Newbie
 
Registered: Aug 2014
Posts: 7

Original Poster
Rep: Reputation: Disabled
I use VMware Workstation 10 & centos 6.4 system
I try to use PXE + TFTP to install centos on new virtual machine with raw hard disk
I stopped firewall (iptables) & selinux

I installed tftp & tftp-server & syslinux
I started httpd & xinetd services

in /etc/dhcp/dhcpd.conf
in subnet options, I added 2 lines:
next-server 192.168.2.1 # IP of DHCP server (centos)
filename "pxelinux.0"

/etc/xinetd.d/tftp contains the following lines
server_args = -svv /var/lib/tftpboot
disable = no

I changed permissions of /var/lib/tftpboot to 775

I copied pxelinux.0 & menu.c32 & initrd.img & vmlinux from centos dvd to /var/lib/tftpboot

/var/lib/tftpboot/pxelinux.cfg/default
------------------------------------------------
PROMPT 0
DEFAULT menu.c32
TIMEOUT 300
ONTIMEOUT localdisk
MENU TITLE .....
LABEL .....
KERNEL vmlinuz
APPEND initrd=initrd.img
ks=http://192.168.2.1/kickstart1.cfg
(I created kickstart1.cfg file in /var/www/html)


/var/www/html/kickstart1.cfg
--------------------------------------
install
url --url=”http://192.168.2.1/centosdvd/”
(this folder contains installation files and I created local yum repository in it using yum and I tested it with file:///softwares, but it didn't work with http or ftp)

bootloader --location=mbr

zerombr
clearpart --all --initlabel

part / --asprimary --fstype=”ext4” --size=5120
part swap --asprimary --fstype=”swap” --size=1024

reboot

graphical
firstboot --disable
keyboard us
lang en_US
logging --level=info
timezone Egypt

firewall --disabled
selinuxspace--disabled

network --bootproto=dhcp --device=eth0 --onboot=yes --noipv6

in another terminal
grub-crypt --sha-512
enter new root password twice
in current terminal
rootpw --iscrypted .....

authconfig --enableshadow
--passalgo=sha512
--enableldap
--enableldapauth
--ldapserver=ldap://192.168.2.1
--ldapbasedn=”dc=.....,dc=.....”

repo --name=”server netbios name” --baseurl=http://192.168.2.1/centosdvd/



%packages
..........
%endEnter

I changed permissions of kickstart file to 775



in the new virtual machine, when I boot it
it it shows error message that it's unable to download kickstart file

Last edited by worldmember; 08-07-2014 at 03:47 AM.
 
Old 08-07-2014, 12:25 AM   #4
worldmember
LQ Newbie
 
Registered: Aug 2014
Posts: 7

Original Poster
Rep: Reputation: Disabled
I have vmware workstation 10 and I heard that vmware has default network adapter type that has problems
if this is right, how can I change it
 
Old 08-07-2014, 09:55 AM   #5
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
Quote:
Originally Posted by worldmember View Post

in the new virtual machine, when I boot it
it it shows error message that it's unable to download kickstart file
Post the actual error message. Cut and paste or screenshot, don't retype.
 
Old 08-07-2014, 11:13 AM   #6
worldmember
LQ Newbie
 
Registered: Aug 2014
Posts: 7

Original Poster
Rep: Reputation: Disabled
I attached a pic for error message
Attached Thumbnails
Click image for larger version

Name:	Untitled.png
Views:	17
Size:	36.6 KB
ID:	16070  
 
Old 08-07-2014, 10:44 PM   #7
worldmember
LQ Newbie
 
Registered: Aug 2014
Posts: 7

Original Poster
Rep: Reputation: Disabled
/var/lib/tftpboot/pxelinux.cfg/default file has owner "root" with permissions 777
and both kickstart1 file and centosdvd directory are in /var/www/html with owner "apache" and permissions 777
Attached Thumbnails
Click image for larger version

Name:	1.png
Views:	11
Size:	15.0 KB
ID:	16073   Click image for larger version

Name:	2.png
Views:	13
Size:	188.9 KB
ID:	16074   Click image for larger version

Name:	3.png
Views:	9
Size:	22.5 KB
ID:	16075  
 
Old 08-09-2014, 10:13 AM   #8
worldmember
LQ Newbie
 
Registered: Aug 2014
Posts: 7

Original Poster
Rep: Reputation: Disabled
there is no relative errors in http logs to pxe or tftp
also local yum repository failed using http
I think there is a problem in http network sharing, but I can't realize it
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help on PXE and TFTP Protocols. mehdi_shri Linux - Newbie 3 03-26-2012 06:39 PM
PXE-TFTP Installation Server dipuasks Linux - General 6 12-04-2008 01:44 AM
PXE Boot issues - TFTP? xiaodown Linux - Server 8 07-08-2008 06:19 PM
Booting via PXE/TFTP problem freeindy Linux - Networking 7 03-01-2008 10:02 AM
PXE TFTP thin client paul_mat Linux - Networking 2 01-19-2006 06:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01: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