Install CentOS-6.2 via PXE

Posted by ALex_hha on 2012/1/18 12:51:17
I need to setup the new server (Supermicro X9SCL-F) there is no CD/DVD and I don't have any usb CD/DVD. So I decide to install CentOS via PXE.

I have installed and configured dhcp server.

    host new-fs1 {
        option host-name "new-fs1.w3.lan";
        hardware ethernet 00:25:90:70:2D:02;
        fixed-address 192.168.207.75;
        next-server 192.168.210.1;
        filename "pxelinux.0";
    }


I have installed and configured tftp server.

# cat /tftpboot/pxelinux.cfg/default
default menu.c32
prompt 0
timeout 300
ONTIMEOUT local

MENU TITLE PXE Menu

label CentOS-6.2 x86_64
        MENU LABEL ^CentOS 6.2 x86_64
        KERNEL images/centos/x86_64/6.2/vmlinuz
        APPEND vga=788 initrd=images/centos/x86_64/6.2/initrd.img -- quiet


Then I select boot from PXE in the BIOS. All go fine. In the Installation Method I have selected URL and type
http://192.168.210.1:8080


But after I have created custom disk layout in the installer and press Next I got the following error
Unable to read package metadata. This may be due to a missing repodata directory. Please ensure that your install tree has been correctly generated.

Cannot retrieve repository metadata (repomd.xml) for repository: anaconda-CentOS-201112102333.x86_64. Please verify its path and try again


So my question is - where he tries to search this file (repomd.xml)?

Re: Install CentOS-6.2 via PXE

Posted by pschaff on 2012/1/18 18:01:42
It should be in the repodata directory at the top level of your installation tree. Did you create the install tree per the InstallationGuide?

Re: Install CentOS-6.2 via PXE

Posted by TrevorH on 2012/1/18 19:38:08
This works for me

LABEL CentOS 6 x86_64 NO KS eth0
        MENU LABEL CentOS 6 x86_64 NO KS eth0
        KERNEL images/centos/x86_64/6.0/vmlinuz
        APPEND initrd=images/centos/x86_64/6.0/initrd.img ramdisk_size=100000 ksdevice=eth0 ip=dhcp url --url http://192.168.x.x/mirrors/CentOS-6-x86_64/ text


Re: Install CentOS-6.2 via PXE

Posted by ALex_hha on 2012/1/18 21:38:27
Quote:
It should be in the repodata directory at the top level of your installation tree. Did you create the install tree per the InstallationGuide?

Yeah, after reading this man I just copied repodata and Packages dirs from DVD to my www root

I have one more question. How does string looks like in pxelinux.cfg/default to boot CentOS in Rescue mode? With the following config
label CentOS-RM
        MENU LABEL CentOS 6.2 x86_64 Rescue Mode
        KERNEL images/centos/x86_64/6.2/vmlinuz
        APPEND vga=795 initrd=images/centos/x86_64/6.2/initrd.img -- rescue quiet


I need to manually specify URL of the install.img file. Can I specify this file directly in the pxelinux.cfg/default?

Re: Install CentOS-6.2 via PXE

Posted by jlehtone on 2012/1/18 22:04:36
Quote:
ALex_hha wrote:
I need to manually specify URL of the install.img file. Can I specify this file directly in the pxelinux.cfg/default?

TrevorH's version probably does it.

This does too.
LABEL CentOS6x64
        MENU LABEL CentOS 6.2 x64
        KERNEL images/Centos6x64/6.2/vmlinuz
        APPEND vga=normal initrd=images/Centos6x64/6.2/initrd.img ramdisk_size=32768 LANG=en_US.UTF-8 method=ftp://*.*.*.*/centos.org/6.2/os/x86_64 rescue

(Note to self: Add ksdevice option for multi-NIC systems.)

Re: Install CentOS-6.2 via PXE

Posted by ALex_hha on 2012/1/20 10:38:27
Thanks, all works fine except one thing. With the following config
label CentOS-RM
    MENU LABEL CentOS 6.2 x86_64 Rescue Mode
    KERNEL images/centos/x86_64/6.2/vmlinuz
    APPEND vga=795 initrd=images/centos/x86_64/6.2/initrd.img -- ip=dhcp ksdevice=eth0 ramdisk_size=32768 LANG=en_US.UTF-8 keyboard=us method=http://192.168.210.1:8080/centos/6.2/x86_64 rescue


It's always ask me to select Keyboard type, append keyboard=us don't resolve the issue

This Post was from: https://www.centos.org/newbb/viewtopic.php?forum=55&topic_id=35350