LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
LinkBack Search this Thread
Old 12-07-2012, 08:20 AM   #1
suresh.k
Member
 
Registered: Aug 2011
Location: Hyderabad, AP, India
Distribution: centos, Ubuntu
Posts: 163
Blog Entries: 1

Rep: Reputation: Disabled
not able to configure pxe server on centos to install ubuntu


Hi,
How to configure PXE server in centos to install ubuntu.

I have configure PXE server in centos, by following procedure.
and working fine for installing linux(centos).

PXE SERVER ON CENTOS

[root@suresh ~]# yum install dhcp tftp-server syslinux vsftpd system-config-kickstart

CONFIGURE DHCP SERVER :

[root@suresh ~]# vim /etc/dhcpd.conf

ddns-update-style interim;
ignore client-updates;

default-lease-time 600;
max-lease-time 7200;

allow booting;
allow bootp;
authoritative;

subnet 192.168.10.0 netmask 255.255.255.0 {
range 192.168.10.100 192.168.10.120;
next-server 192.168.10.53;
filename "pxelinux.0";

[root@suresh ~]# service dhcpd restart

CONFIGURE TFTP SERVER :

[root@suresh ~]# vim /etc/xinetd.d/tftp

service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
disable = no
per_source = 11
cps = 100 2
flags = IPv4


[root@suresh ~]# cp /media/isolinux/* /tftpboot/

[root@suresh ~]# mkdir /tftpboot/pxelinux.cfg

[root@suresh ~]# cp /tftpboot/isolinux.cfg /tftpboot/pxelinux.cfg/default

[root@suresh ~]# cp /usr/lib/syslinux/pxelinux.0 /tftpboot/

[root@suresh ~]# service xinetd restart

CONFIGURE FTP SERVER :

[root@suresh ~]# cp -rv /media/* /var/ftp/pub/

[root@suresh ~]# vim /et/vsftpd/vsftpd.conf

anonymous_enable=yes

DISABLE FIREWALL
DISABLE SELINUX

[root@suresh ~]# service dhcpd restart
[root@suresh ~]# service xinetd restart
[root@suresh ~]# service vsftpd restart

Then Created a KICKSTART FILE using following command

[root@suresh ~]# system-config-kickstart
follow the instructions

COPIED THAT KICKSTART FILE INTO /var/ftp/pub/ks.cfg

[root@suresh ~]# vim /tftpboot/pxelinux.cfg/default

label linux "Install or Upgrade an Existing system"
kernel vmlinuz
append initrd=initrd.img linux ks=ftp://192.168.10.53/pub/ks.cfg


[root@suresh ~]#

Now please help me to how to configure pxe server in centos to install ubuntu.

Thanks
Suresh

Last edited by suresh.k; 12-09-2012 at 11:54 PM.
 
Old 12-12-2012, 01:17 AM   #2
suresh.k
Member
 
Registered: Aug 2011
Location: Hyderabad, AP, India
Distribution: centos, Ubuntu
Posts: 163
Blog Entries: 1

Original Poster
Rep: Reputation: Disabled
Hi,
I have searched on google i got this solution, and working perfectly.

Install and configure the services.

DHCP
[root@fcld ]# yum install dhcp
[root@fcld ]# nano /etc/dhcpd.conf

ddns-update-style interim;
not authoritative;
option domain-name "codigolibre.org";
option domain-name-servers 196.3.81.132, 200.88.127.22;
option subnet-mask 255.255.255.0;
subnet 10.0.200.0 netmask 255.255.255.0
{
authoritative;
range 10.0.200.50 10.0.200.100;
allow unknown-clients;
allow booting ;
allow bootp ;
next-server 10.0.200.1;
filename "pxelinux.0";
}

Note: The 10.0.200.1 direction belongs to the same PXE server.

VSFTP
[root@fcld ]# yum install vsftp

TFTP
[root@fcld ]# yum install tftp-server
[root@fcld ]# nano /etc/xinetd.d/tftp
disable=no

Make the following directories
[root@fcld ]# mkdir /tftpboot/
[root@fcld ]# mkdir /tftpboot/images
[root@fcld ]# mkdir /tftpboot/pxelinux.cfg
[root@fcld ]# chmod -R 777 /tftpboot/

Copy those files to /tftpboot/
[root@fcld ]# cp /usr/lib/syslinux/pxelinux.0 /tftpboot/
[root@fcld ]# cp /usr/lib/syslinux/menu.c32 /tftpboot/

Create and edit the PXE menu config file.
[root@fcld]# nano /tftpboot/pxelinux.cfg/default
DEFAULT menu.c32
PROMPT 0
TIMEOUT 600
MENU TITLE Linux Installation

Config each one of the distros.
a) CentOS 5
[root@fcld ]# mkdir /tftpboot/images/centos/5/i386
[root@fcld ]# mkdir /var/ftp/centos/5/i386
[root@fcld ]# mount -o loop -t iso9660 ~/Centos5.iso /mnt
[root@fcld ]# cp -R /mnt/* /var/ftp/centos/5/i386/
[root@fcld ]# cp /var/ftp/centos/5/i386/images/pxeboot/vmlinuz /tftpboot/images/centos/5/i386/
[root@fcld ]# cp /var/ftp/centos/5/i386/images/pxeboot/initrd.img /tftpboot/images/centos/5/i386/

Add Centos entry on PXE menu:
LABEL Centos 5 (DVD-i386)
KERNEL images/centos/5/i386/vmlinuz
APPEND vga=normal initrd=images/centos/5/i386/initrd.img ramdisk_size=32768
METHOD=ftp://10.0.200.1/centos/5/i386/

b) Ubuntu 9.10
[root@fcld ]# mkdir /tftpboot/images/ubuntu-desktop
[root@fcld ]# mkdir /var/ftp/ubuntu-desktop
[root@fcld ]# mount -o loop -t iso9660 ~/Ubuntu-9.10.iso /mnt
[root@fcld ]# cp -R /mnt/* /tftpboot/images/ubuntu-desktop/
[root@fcld ]# cp -R /mnt/* /var/ftp/ubuntu-desktop/

Add the ubuntu entry to PXE menu:
[root@fcld]# nano /tftpboot/pxelinux.cfg/default
LABEL Ubuntu 9.10 Karmic Koala
KERNEL images/ubuntu-desktop/casper/vmlinuz
APPEND vga=normal boot=casper netboot=nfs nfsroot=10.0.200.1:/var/ftp/ubuntu-desktop/
initrd=images/ubuntu-desktop/casper/initrd.gz ramdisk_size=32768

Edit the file /etc/exports and add:
[root@fcld ]# nano /etc/exports
/var/ftp/ubuntu-desktop 10.0.200.0/255.255.255.0(rw,sync,no_root_squash)

Thanks
Suresh
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu PXE Boot/Install Server Silver565 Linux - Server 0 11-16-2011 02:34 PM
LXer: Setting Up A PXE Install Server On Ubuntu 9.10 LXer Syndicated Linux News 0 02-03-2010 05:50 PM
How to configure RHEL5 PXE Install Server santanuray Linux - General 1 01-13-2010 03:38 AM
centos 5 PXE install server w/kickstart issues swanyjim Linux - Server 10 09-01-2009 01:57 AM
LXer: Setting Up A PXE Install Server For Multiple Linux Distributions With Ubuntu Edgy Eft LXer Syndicated Linux News 0 12-20-2006 12:54 AM


All times are GMT -5. The time now is 11:59 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration