100% found this document useful (1 vote)
461 views10 pages

How To Access Virtual Console in RHEL4/RHEL5?

The document discusses how to access virtual consoles and configure network interfaces in Red Hat Enterprise Linux (RHEL) 4 and 5. It provides the following key information: - ALT-F1 through ALT-F5 access different virtual consoles during RHEL installation for tasks like choosing a text or graphical installer. - Network interfaces can be configured by editing files in /etc/sysconfig/network-scripts/ or using GUI and text-based tools like system-config-network. - USB and other drivers can be loaded on demand using modprobe and insmod, and unloaded with modprobe -r. Memory usage can be checked using the free command.

Uploaded by

Mohammed Rafique
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
461 views10 pages

How To Access Virtual Console in RHEL4/RHEL5?

The document discusses how to access virtual consoles and configure network interfaces in Red Hat Enterprise Linux (RHEL) 4 and 5. It provides the following key information: - ALT-F1 through ALT-F5 access different virtual consoles during RHEL installation for tasks like choosing a text or graphical installer. - Network interfaces can be configured by editing files in /etc/sysconfig/network-scripts/ or using GUI and text-based tools like system-config-network. - USB and other drivers can be loaded on demand using modprobe and insmod, and unloaded with modprobe -r. Memory usage can be checked using the free command.

Uploaded by

Mohammed Rafique
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 10

Labels: RHEL5

How to access virtual console in RHEL4/RHEL5?


Sunday, December 09, 2007

RHCE RHCT Exam questions – How to access virtual console in RHEL4/RHEL 5 ?


Five virtual are provided during installation process in Redhat enterprise Linux servers. Virtual console
can't be accessed using ALT-function ket
Combinations:
ALT-F1 : to access installer in text mode (RHEL4/RHEL5)
ALT-F2: to access bash shell (RHEL4/RHEL5)
ALT-F3 to view log of installer messages (RHEL4/RHEL5)
ALT-F4: to view log of kernel messages (RHEL4/RHEL5)
ALT-F5 stdout of mke2fs and grub command (RHEL4/RHEL5)
ALT-F7 : access installer in Graphical mode. (RHEL4/RHEL5)
Posted by Ipod at 7:54 PM 0 comments  

RHCE RHCT Exam questions:Howto configure the network


card in redhat enterprise Linux
Wednesday, November 28, 2007
RHCE RHCT Exam questions:Howto configure the network card in redhat enterprise 5 Linux :

Question. I’ve installed Red Hat enterprise Linux 5

and now added one more LAN card (NIC). How do I configure the network card from the command
line? I can see 2nd my network card detected while booting the IBM server.
Answer . Red hat Linux provides following tools to make changes to Network configuration such as add
new card, assign IP address, change DNS server etc.

(a) GUI tool (X Windows required) - system-config-network


(b) Command line text based GUI tool (No X Windows required) - system-config-network
(c)Edit configuration files stored in /etc/sysconfig/network-scripts/ directory

GUI can be launched using system-config-network


Posted by Ipod at 3:09 PM 0 comments  

RHCE RHCT Exam questions : How to load USB driver in


Linux
Monday, November 26, 2007
Question: RHCE RHCT Exam questions : How to load USB driver in Linux ?
Answer : in Redhat Enterprise Linux servers (RHEL3/RHEL4/RHEL5) usb drivers can be loaded on
fly using modprobe command :

$modprobe usb-uhci

$modprobe usb-ohci

similarly modules can be removed or unloaded using "modprobe -r"

also insmod can be used to add module


Question: How would you list loaded modules in Redhat Enterprise 3/4 Linux ?
Answer : lsmod

Posted by Ipod at 1:10 PM 0 comments  

RHCE RHCT Linux Certification Exam: How to check memory


usage
Thursday, November 22, 2007
while Preparing for RHCE and RHCT exam certification one should know how to check memory
utilization in redhat enterprise Linux. one useful command is free , you can get memory usage in
megabytes and gigabytes :
[root@ldev ~]# free -m
total used free shared buffers cached
Mem: 992 975 16 0 137 628
-/+ buffers/cache: 210 781
Swap: 2047 0 2047
Enable VSFTP on Redhat Enterprise Linux 4 update 3

To lock users in home dir:


Touch vsftpd.chroot_list ; to create file of users that are allowed to ftp outside their home dirs add root
to this file
Cd /etc/vsftpd
vi vsftpd.conf
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
chroot_list_enable=YES
chroot_local_user=YES
# (default follows)
chroot_list_file=/etc/vsftpd.chroot_list ; add root to this file
service vsftpd restart
To lock users in home dir:
Touch vsftpd.chroot_list ; to create file of users that are allowed to ftp outside their home dirs add root
to this file

RHCE RHCT Exam Question: How to stop/start network ethernet interface:


[root@ice ~]# ifdown eth0

[root@ice ~]# ifconfig eth0


eth0 Link encap:Ethernet HWaddr 00:0C:29:2A:47:7F
inet addr:192.168.0.103 Bcast:192.168.0.255 Mask:255.255.255.0
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:1899 errors:0 dropped:0 overruns:0 frame:0
TX packets:833 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:923925 (902.2 KiB) TX bytes:283867 (277.2 KiB)
Interrupt:10 Base address:0x1400

[root@ice ~]# ifup eth0

Determining IP information for eth0... done.


[root@ice ~]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0C:29:2A:47:7F
inet addr:192.168.0.103 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe2a:477f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1900 errors:0 dropped:0 overruns:0 frame:0
TX packets:838 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:924267 (902.6 KiB) TX bytes:284517 (277.8 KiB)
Interrupt:10 Base address:0x1400

RHCE RHCT Exam:Create and Mount filesystem in redhat enterprise Linux:


 Redhat Enterprise 4 Linux you can use fdisk -l to list existing partitions on
your system as a part of your Lab in RH133 Course :
[root@ice ~]# fdisk -l /dev/sda

Disk /dev/sda: 21.4 GB, 21474836480 bytes


255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System


/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 1318 10482412+ 8e Linux LVM
/dev/sda3 1319 1579 2096482+ 82 Linux swap
/dev/sda4 1580 2610 8281507+ 5 Extended
 Here we have unallocated extended partition . Remember you can
have only 3 Primary partitions for a single disk in Redhat in our case
we have SCSI disk /dev/sda where we have 3 primary
partitions,with remaining unlloacted space you need to create
Extended partition if you need to create more than 3 partitions .
#fdisk /dev/sda
 ON COMMAND TYPE n to create new partition , hit enter for start
cylinder number and then on last cyliner i used +1024M you can use
+1G as well , because i am going to create 1 GB filesystem :
Command (m for help): n
First cylinder (1580-2610, default 1580):
Using default value 1580
Last cylinder or +size or +sizeM or +sizeK (1580-2610, default 2610):
+1024M
Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.


WARNING: Re-reading the partition table failed with error 16: Device or
resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
Here is a catch that would be really stupid idea to reboot your
Redhat enterprise Linux server to activate your partition table
changes. I am sure Redhat will remove this warning in their
upcoming redhat enterprise level 5 Linux version.Also you can
save time in your RHCT/RHCE Certification Exam using
partprobe. Note this how i am activating new partition table
changes using PARTPROBE magic command.

[root@ice ~]# partprobe

[root@ice ~]# fdisk -l /dev/sda

Disk /dev/sda: 21.4 GB, 21474836480 bytes


255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System


/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 1318 10482412+ 8e Linux LVM
/dev/sda3 1319 1579 2096482+ 82 Linux swap
/dev/sda4 1580 2610 8281507+ 5 Extended
/dev/sda5 1580 1704 1004031 83 Linux
 Now I have to create a directory where i need to mount new +1 GB
fileystem i am going to make ext3 filesystem .
#mkdir /home

[root@ice ~]# mkfs -t ext3 /dev/sda5


[root@ice ~]# mount /dev/sda5 /home
[root@ice ~]# df -h /home
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 966M 18M 899M 2% /home

Here is your +1GB home filesystem (type is ext3) ready to use . you can
add this in yout /etc/fstab file to make change permanent where it will
mount /home automatically and persistent to server reboots.
RHCE RHCT Exam: How to mount USB drive on Redhat
enterprise Linux server (RHEL4) :
Make Sure USB drive is connnected right to your Linux machine/server , i have plugged in USB thumb
drive. Before connecting USB drive do a tail -f /var/log/messages , Redhat Linux sees USB drive as a
SCSI device so device will be named as "sdxxx" :
[root@ice ~]# tail -f /var/log/messages
Apr 27 21:52:30 ice kernel: Attached scsi removable disk sdb at scsi1, channel 0, id 0, lun 0
Apr 27 21:52:30 ice kernel: usbcore: registered new driver usb-storage
Apr 27 21:52:30 ice kernel: sdb: assuming drive cache: write through
Apr 27 21:52:30 ice kernel: sdb: sdb1

#df -h
/dev/sdb1 124M 101M 24M 82% /media/usbdisk

USB is mounted as /dev/sdb1

RHCE RHCT Exam questions : How to check kernel in RHEL4 ?

[root@ice ~]# file /sbin/init


/sbin/init: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5,
dynamically linked (uses shared libs), stripped

How can you Check availale Memory on RHEL4 (Redhat Enterprise Linux
servers) :

[root@ice /]# grep Mem /proc/meminfo


MemTotal: 255972 kB
MemFree: 5896 kB
Create partition on RHEL :Redhat Enterprise Linux without reboot :

[root@ice ~]# fdisk /dev/sda

The number of cylinders for this disk is set to 2610.


There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/sda: 21.4 GB, 21474836480 bytes


255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System


/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 1318 10482412+ 8e Linux LVM
/dev/sda3 1319 1579 2096482+ 82 Linux swap

Command (m for help): n


Command action
e extended
p primary partition (1-4)
e
Selected partition 4
First cylinder (1580-2610, default 1580):
Using default value 1580
Last cylinder or +size or +sizeM or +sizeK (1580-2610, default 2610):
Using default value 2610

Command (m for help): p

Disk /dev/sda: 21.4 GB, 21474836480 bytes


255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System


/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 1318 10482412+ 8e Linux LVM
/dev/sda3 1319 1579 2096482+ 82 Linux swap
/dev/sda4 1580 2610 8281507+ 5 Extended
Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.


WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.

Finally type partprobe to make parition change available to Redhat enterprise Linux
(RHEL4) without reboot :

[root@ice ~]# partprobe /dev/sda

For RHCT and RHCE exam questions, you should know How to
check installed packages :
For example to check whether you have firefox installed you can use rpm utility available on RedHat
enterprise Linux :
[root@ice ~]# rpm -qa |grep firefox
firefox-1.0.7-1.4.3
How to enable telnet services on Redhat enterprise Linux :

# chkconfig telnet --list


#chkconfig telnet on
#chkconfig --level 35 telnet on

where 3 and 5 are run levels , so telnet will run when Linux is running in runlevel 3 and 5
only.
You shoud know how to change Redhat Linux system default run level for RHCE and RHCT
exam preparation and questions :

1. edit /etc/inittab file and changerun level from level 5 (which is X or GUI mode ) to run
level 3

# vi /etc/inittab
id:3:initdefault:

2. simply reboot the server and your default run level changes to level 3 which is text based
linux session.

3.How to dynamically change the runlevel of Linux system without rebooting


 e.g: switch to single user mode :
# telinit S
 e.g: switch to X or GUI (desktop) mode
#telinit 5
 e.g:If you have made changes to the /etc/inittab file to change the default runlevel and want to
change the system to that new default you can do so by using the telinit with the q command-
line option:
# telinit q

For RHCE and RHCT exam you should know RHEL4 boot sequence as follows:
 Bios Initialization
 Loading Boot Loader phase
 Kernel initialization
 init startup which is first process to run in Linux during startup
 Launching X or GUI if enabled
To create new Virtual machine for installing linux using VMware workstation:
 Click Ctrl+N or select create new Virtual machine from File menu
Select Typical in Vmware Wizard
 Under new machine virtual wizard select LINUX as guest operating system and version as
redhat enterprise Linux 4 or 1,2,3.
 For Fedora select other as an option in VMWARE wizard:
 You can choose location for to save configuration for virtual location , i used my documents:

 Select "use bridged networking" in VMWARE wizard to provide guest os direct access to an
external network:

You might also like