Friday, November 1, 2013

Errors during CentOS Installation.

I tried installing the minimal CentOS some 2 days ago and had a hard time configuring it. I will try to list almost all of the problems I faced and also how I solved them.


Errors and Solutions:


1. (.iso) File not found to mount during USB installation
Copy the CentOS.iso file to the bootable USB drive and reinstall CentOS.

2. Accidentally installed boot loader in USB had to transfer it to hard-drive

Steps followed :
- boot via USB and access tty1 (CTRL + ALT + F4)
- After reaching tty1, plug off the pendrive.
- do "grub-install --recheck /dev/sda"  [ Do consider the hard-drive :) ]

3. Grub couldn't find the required Hard-drive, Unable to boot

Steps followed:
- Enter Grub
- Edit the "CentOS" tab
- Edit hard drive -> (hd0,1) [ Please follow the grub convention of naming hard-drives ]
- Boot with changes
*Remember to change it permanently if it works [ by editing grub.conf after sucessfull boot ]

4. Initial Configuration for YUM to work

Steps followed:
- add nameserver 8.8.8.8 to /etc/resolv.conf
- and force the interface to get the ip via dhcp:
   "dhclient -v eth0"

5. No desktop?

yum groupinstall basic-desktop desktop-platform x11 fonts 

6. Configure yum to our local directory

Steps followed:
- First mount image using USB,
- Go to the package
- Install vsftpd using the rpm
   "rpm -ivh vsftpd_*.rpm" 
- Start vsftpd for ftp service
  "service vsftpd start"
   or use,
  "chkconfig vsftpd on"  [ to start it always ]
We need "createrepo" command to create a repository. We begin by downloading and installing related dependency of "createrepo". 
They are:
     libxml2-python-*
     deltarpm-*
     python-deltarpm-*
 
Now, intsall "createrepo" rpm. 
Then copy all packages to ftp folder by:
"mkdir /var/ftp/pub/localrepo"
"cp -ar /mnt/Packages/*.* /var/ftp/pub/localrepo/ "
Now, we can just add  this line to our repository config file to use it:
"baseurl = file:///var/ftp/pub/localrepo "
Then create your repository using;
"createrepo -v /var/ftp/pub/localrepo/ "
Then, it will create the repository.
Now just do, "yum clean all"
and "yum update" if necessary.

6. Add window to the grub

Edit grub.conf, add
title Windows
    rootnoverify(hd0,2) #in my case
    chainloader +1
and save your work.

This is it. I hope it helps :)



0 comments:

Post a Comment