Archive for December, 2010

ifconfig

syntax: ifconfig [interface] option
Examples:
ifconfig eth0 192.168.1.50
ifconfig eth0 down
ifconfig eth0 up

ifconfig is used to configure the kernel-resident network interfaces.
ifconfig with no argument/option, displays the status of the currently active interfaces.

ifconfig -a #Displays status of all NICs

ifconfig is obsolete in RHEL6, replaced by:
ip addr
or
ip link

For statistics use:
ip -s link

Be the first to comment  Posted by Ferdy - December 21, 2010

Categories: Linux, Network   Tags: , , ,

How to mount stuff in Linux

Mounting a CDROM:
1. Make a mount point in /mnt directory
mkdir /mnt/cdrom

2. Mount the CDROM
mount /dev/cdrom /mnt/cdrom

To verify, Type: mount
display should include:
/dev/sr0 on /mnt/cdrom type iso9660 (ro)

To mount a DVD or CD .iso file:
mkdir /mnt/dvdiso # Create a folder for the mount point
mount -ro loop /tmp/iso_file.iso /mnt/dvdiso #assuming the iso file is located in /tmp

Be the first to comment  Posted by Ferdy -

Categories: Linux   Tags: , ,

How to restore Grub on RHEL6

Red Hat Enterprise Linux 6 – How to restore Grub.
1. Boot from RHEL6 DVD.
2. Select “Rescue installed system”.
3. Choose -> Language, Keyboard, and Rescue Method. Select “Local CD\DVD” for the Rescue Method.
4. Setup Networking -> Yes or No, doesn’t matter for restoring Grub.
5. Next on the “Rescue Screen”, select Continue and OK twice.
6. Next on the “First Aid Kit quickstart menu”, select “shell Start shell”.
The prompt will start:
Starting shell…
bash-4.1#

7. Type: “chroot /mnt/sysimage
8. Type: “cd /boot/grub
9. Type: “fdisk -l” to see where hd0.
10. Restore Grub, type: “grub-install /dev/sda1
If No error, it should display:
# this device map was generated by anaconda
(hd0) /dev/sda

2 comments  Posted by Ferdy -

Categories: Linux   Tags: , , ,

Next Page »