Archive for the 'CentOS' Category

07
Jul
07

Reinstall Grub bootloader

1. Boot in to rescue mode (linux single)

2. Type these command
$ chroot /mnt/sysimage
$ /sbin/grub-install /dev/sda

device can be sda or hda … belong to your hardisk.
You can know  about your hard disk by command: fdisk -l

07
Jul
07

Centos Networking

1. Configure interface in centos is difference from ubuntu. The configuration file is /etc/sysconfig/network-scripts/ifcfg-eth0.
Samples configuration for eth0:
DEVICE=eth0
BOOTPROTO=static
HWADDR=00:90:27:1C:C2:CB
ONBOOT=yes
TYPE=Ethernet
IPADDR=172.24.236.152
NETMASK=255.255.0.0
BROADCAST=172.24.255.255
GATEWAY=172.24.231.1

Restart service network by command: /etc/init.d/network (or service network) restart

2. Edit host name in file /etc/sysconfig/network