redhat drive naming conventions

1. /dev/hda – denote primary-master IDE hard disk
2. /dev/hdb – denote primary-slave IDE hard disk
3. /dev/hdc – denote secondary-master IDE hard disk
4. /dev/hdd – denote secondary-slave IDE hard disk

Redhat naming convention for SCSI hard disk is somewhat similar. For example,

* /dev/sda – denote SCSI hard disk of SCSI ID 1
* /dev/sda1 – denote first partition of SCSI hard disk of SCSI ID 1
* /dev/sdb3 – denote third partition of SCSI hard disk of SCSI ID 3
* /dev/sdd4 – denote forth partition of SCSI hard disk of SCSI ID 4

Add Extra Hard Disk To Redhat Linux

This guide is above how to add extra IDE or SCSI hard disk to a live Redhat Linux server. Although, it serves to give some ideas that applied for other Linux variants as well.

Redhat naming convention for IDE hard disk are

1. /dev/hda – denote primary-master IDE hard disk
2. /dev/hdb – denote primary-slave IDE hard disk
3. /dev/hdc – denote secondary-master IDE hard disk
4. /dev/hdd – denote secondary-slave IDE hard disk

Redhat naming convention for SCSI hard disk is somewhat similar. For example,

* /dev/sda – denote SCSI hard disk of SCSI ID 1
* /dev/sda1 – denote first partition of SCSI hard disk of SCSI ID 1
* /dev/sdb3 – denote third partition of SCSI hard disk of SCSI ID 3
* /dev/sdd4 – denote forth partition of SCSI hard disk of SCSI ID 4

Adding extra IDE or SCSI hard disk to a live Redhat Linux server is a fairly simple work. It looks lengthy as follow, but the works is not.

1. Shutdown the Redhat Linux system by typing init 0

2. Unplug the power source to ensure server board totally power off.

3. Plug in the extra hard disk physically to the IDE or SCSI port.

4. Bring up the system to single user mode, i.e init 1 or runlevel 1

* Using GRUB as boot loader

1. Select the Redhat Linux kernel version to load using the up/down arrow key.

2. Type e to enter GRUB editor mode

3. Select the line that starts with kernel and type e to edit the line.

4. Go to the end of the line, press space bar to create a space, and type single

5. Press ENTER key to exit edit mode.

6. Type b to boot into single user mode.

* Using LILO as boot loader

1. If using the graphical LILO, press CTRL+X to exit the graphical LILO screen and go to the boot: prompt.

2. At the boot: prompt, type linux single to enter single user mode.

5. Create Partition (Assuming the extra hard disk to add is a primary-slave IDE hard disk)

1. Type fdisk /dev/hdb to begin

2. Press m to get a list of command associated with fdisk program.

3. Press n follow by e to create primary partition.

4. Press 1 for partition number prompt to indicate it is the first partition of the hard disk

5. Press ENTER twice to used the default values given by fdisk, to indicate it is the first and last partition of the hard disk, that utilize whole hard disk space.

6. Press p to print the partition table information that is just created. Confirm the information and work done are correct as of this stage.

7. Press w to save the work done after confirmation.

6. Performing scan disk to check for possible hard disk bad sectors before creating a Linux ext3 file system on partition created earlier, by typing

mkfs -t ext3 -c /dev/hdb1

7. After creating the file system, perhaps it is a good chance to tune the file system before mounting it. Refer to tune2fs command for some interesting tuning parameters available for the file system.

8. Mount the ext3 file system created

1. Create a directory to serve as mount point, type mkdir /NewIDE

2. Append the following line into /etc/fstab, which is used to auto mount file systems on each reboot

/dev/hdb1 /NewIDE ext3 defaults 1 2

The digit 1 in the line indicates that the mounted file system will be backed up upon dump execution.

The digit 2 in the line indicates the order that fsck should check during its execution. Type man fstab for details related to fstab configuration file.

3. Type mount /dev/hdb1 to confirm the /etc/fstab configuration are correct. The mount /dev/hdb1 command will actually refers /etc/fstab to get the complete setting about the going to mount file system. This is equivalent to the complete command of

mount -t ext3 /dev/hdb1 /NewIDE

4. Type df -hTa to verify the new file system mounted successfully.

9. Done.

system report utility

Sysreport is a utility used to collect data to help Technical Support and Developers in solving problems associated with Red Hat Linux. This tool gathers as much information as possible about your system; while trying to avoid
A: creating a large file
B: invading privacy and
C: Collecting information that could be detrimental to the integrity of your system.

The idea/design of this utility is to gather all the valuable information about your system and keeping that data in a small file (.tar.gz) in case the problem is network related; the output from this can be moved to a floppy and sent from a working machine.

When sending this file created by Sysreport please be sure include the incident #/bug #, the name of the person who requested the file, as well as you name (Don’t forget to attach the tar.gz also). The e-mail to send the output to it will tell you this during the process.

Sysreport is released under the same GPL as all Software produced by Red Hat Inc and is freely distributable.

http://www.ibiblio.org/shadow/sysreport/

RHEL Network Card bonding

This describes the possibility to combine several network interface cards to one logical interface to increase redundancy and therefor stability. There is a possibility besindes redundant configuration to use bonding for increased performance, but this may be covered in further HowTos.

Network inteface card bonding is a way to combine several NICs to one logical
NIC to get more performance and/or redundancy.

In this Howto I will just describe HowTo improve redundancy.

This HowTo refers to RedHat Enterprise Linux 4 and its derivates Tao Linux 4 and
CentOS 4.

########################
#### Enable bonding ####
########################

1. Create /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
BOOTPROTO=none
BROADCAST=[BROADCAST-ADDRESS]
IPADDR=[IP-ADDRESS]
NETMASK=255.255.255.0
NETWORK=[NETWORK-ADDRESS]
ONBOOT=yes
TYPE=Ethernet

Note: This is only suitable for boxes with fixed IP-Addresses. For dhcp
use BOOTPROTO=dhcp

2. Modify /etc/sysconfig/network-scripts/ifcfg-eth0 to match
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
TYPE=Ethernet
MASTER=bond0
SLAVE=yes

3. Create /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
TYPE=Ethernet
MASTER=bond0
SLAVE=yes

4. Reboot your box

#####################################
#### Add more logical Interfaces ####
#####################################

Note: You do not have to create logical interfaces on the physical devices,
just on the bond interface.

1. Create /etc/sysconfig/network-scripts/ifcfg-bond0:1
DEVICE=bond0:1
BOOTPROTO=none
BROADCAST=[BROADCAST-ADDRESS]
IPADDR=[IP-ADDRESS]
NETMASK=255.255.255.0
NETWORK=[NETWORK-ADDRESS]
ONBOOT=yes
TYPE=Ethernet

2. Activate device
ifup bond0:1

Fedora Version Differences

Kernel Sources Differences

As of Fedora Core 3, the kernel sources come as a source RPM package that matches the version of the kernel you are running. In Fedora Core 2 and earlier, the Kernel sources came as a generic RPM package called kernel-source. (See Chapter 6, "Installing Linux Software", for details on downloading and installing.).

Here is how to do it:

1. Start with a Linux system that has a standard kernel. This should be true if you have only used RPMs or the yum utility for kernel updates.

2. Determine what version of the kernel you are using with the uname command. In this case we are running version 2.6.5-1.358.

[root@bigboy tmp]# uname -r
2.6.5-1.358
[root@bigboy tmp]#

3. Install the matching kernel-source package using the rpm command from your CDs or by using the yum utility. You may also have to also install a "C" programming language compiler package such as gcc32 to convert the source text files into an executable kernel.

If your kernel is very new and can’t wait for the updated sources RPM to be created, or your system doesn’t support RPMs, then you can also consider downloading the latest Linux kernel code from the kernel.org website.
MySQL Differences

There are some well known differences in older versions of MySQL. Here are a few of them.
Recovering / Changing Your MySQL Root Password

In Fedora Core 3 and older, the MySQL server root password recovery procedure was different. This is an especially important task if it was either forgotten or misplaced. The steps you need are:

1. Stop MySQL

[root@bigboy tmp]# service mysqld stop
Stopping MySQL: [ OK ]
[root@bigboy tmp]#

2. Start MySQL in Safe mode with the safe_mysqld command and tell it not to read the grant tables with all the MySQL database passwords.

[root@bigboy tmp]# safe_mysqld –skip-grant-tables &
[1] 4815
[root@bigboy tmp]# Starting mysqld daemon with databases from /var/lib/mysql
[root@bigboy tmp]#

3. Use the mysqladmin command to reset the root password. In this case, you are setting it to ack33nsaltf1sh.

[root@bigboy tmp]# mysqladmin -u root flush-privileges \
password "ack33nsaltf1sh"
[root@bigboy tmp]#

4. Restart MySQL normally.

[root@bigboy tmp]# service mysqld restart
Stopping MySQL: 040517 09:39:38 mysqld ended
[ OK ]
Starting MySQL: [ OK ]
[1]+ Done safe_mysqld –skip-grant-tables
[root@bigboy tmp]#

The MySQL root user will now be able to manage MySQL using this new password.
FTP Differences

There are some well known differences in the configuration of the VSFTPD package for version 8.0 and earlier of Redhat/Fedora Linux.

For one, the starting and stopping of VSFTP is controlled by xinetd via the /etc/xinetd.d/vsftpd file. VSFTP is deactivated by default, so you’ll have to edit this file to start the program. Make sure the contents look like the example. The disable feature must be set to no to accept connections.

service ftp
{
disable = no
socket_type = stream
wait = no
user = root
server = /usr/sbin/vsftpd
nice = 10
}

Fedora Linux will automatically edit this file to enable VSFTPD and restart xinetd with the chkconfig command.

[root@bigboy tmp]# chkconfig vsftpd on
[root@bigboy tmp]#

Naturally, to disable VSFTP once again, you’ll use the chkconfig vsftpd off command.
DHCP Differences

There can be problems when upgrading from Redhat 7.3 to 8.0 while maintaining the same dhcpd.conf file. You might run into a DHCP server error. This startup error is caused by not having this line at the very top of your /etc/dhcpd.conf file:

ddns-update-style interim

The error might look like:

Starting dhcpd: Internet Software Consortium DHCP Server V3.0pl1
Copyright 1995-2001 Internet Software Consortium.
All rights reserved.
For info, please visit http://www.isc.org/products/DHCP

** You must add a ddns-update-style statement to /etc/dhcpd.conf.
To get the same behaviour as in 3.0b2pl11 and previous
versions, add a line that says "ddns-update-style ad-hoc;"
Please read the dhcpd.conf manual page for more information. **



exiting.
[FAILED]

DNS Differences

You’ll notice some differences running BIND running on older versions of RedHat/Fedora Linux. For example, RedHat 9 doesn’t shutdown BIND cleanly and gives a "named: already running" error when you try to restart it.

[root@bigboy tmp]# /etc/init.d/named restart
Stopping named:
named: already running[root@bigboy tmp]#

The pkill command enables you to kill processes by referring to them by name instead of their process ID number. In this case, you can forcefully stop the named daemon and restart it by issuing the command pkill named followed by service named start.

[root@bigboy tmp]# pkill named
pkill: 29988 – No such process
pkill: 29992 – No such process
[root@bigboy tmp]# service named start
[root@bigboy tmp]#

Routing Differences

Some of the older versions the Fedora stream of Linux had different methods of updating their routes. For example, in RedHat versions 8 and 9, the file named /etc/sysconfig/static-routes was used to add permanent static routes that would be present after a reboot. The format is similar to that of the route command except that the interface comes first and the switches have no dashes in front of them. Here is a sample entry for a route to 10.0.0.0 via the 192.168.1.254 gateway:

wlan0 net 10.0.0.0 netmask 255.0.0.0 gw 192.168.1.254

The /etc/sysconfig/static-routes file is set to be deprecated in future releases and you should consider the alternative solutions for newer operating systems.
Iptables Differences

In RedHat/Fedora 9 and earlier, iptables gave different a different status message when the firewall was stopped. Instead of saying stopped, it presented a rule set that allowed all traffic through.

[root@bigboy tmp]# service iptables status
Table: filter
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

[root@bigboy tmp]#

Software Installation Differences

With some older RedHat Linux versions, source RPM files are first exported into the directory /usr/src/redhat/SPECS with the rpm command. You then have to run the rpm command again to compile the source files into a regular RPM file, which will be placed in either the /usr/src/packages/RPMS/i386/ or the /usr/src/redhat/RPMS/i386/ directories. You then have to install the new RPM file from this directory.

[root@bigboy tmp]# rpm -Uvh filename.src.rpm
[root@bigboy tmp]# cd /usr/src/redhat/SPECS
[root@bigboy SPECS]# rpm -ba filename
[root@bigboy SPECS]# cd /usr/src/redhat/RPM/i386
[root@bigboy i386]# rpm -Uvh filename.rpm

Wireless Networking Differences

Under version 8.0 of RedHat I have seen the kernel-wlan-ng-pcmcia RPM installation give errors stating that the kernel-pcmcia-cs RPM hadn’t been previously installed even when it had been. Installing the RPM with –force and –nodeps switches does the trick by forcing the installation while not checking for dependencies. Always remember that under normal circumstances this wouldn’t be a good idea, error messages are there for a reason.

[root@bigboy tmp]# rpm -Uvh kernel-wlan-ng-pcmcia-0.1.15-6.i686.rpm
error: Failed dependencies:
kernel-pcmcia-cs is needed by kernel-wlan-ng-pcmcia-0.1.15-6
[root@bigboy tmp]# rpm -Uvh –force –nodeps kernel-wlan-ng-pcmcia-0.1.15-6.i686.rpm
Preparing… ################################## [100%]
1:kernel-wlan-ng-pcmcia ################################## [100%]

Adding prism2_cs alias to /etc/modules.conf file…
Shutting down PCMCIA services: cardmgr modules.
Starting PCMCIA services: modules cardmgr.
The default wlan0 network configuration is DHCP. Adjust accordingly.

ACHTUNG! ATTENTION! WARNING!
YOU MUST configure /etc/pcmcia/wlan-ng.opts to match WAP settings!!!
[root@bigboy tmp]#

Linux-WLAN File Locations Using RedHat 8.0 RPMs

The main Linux-WLAN configuration file for version 8.0 is the /etc/wlan.conf file (PCI type NIC) or your /etc/pcmcia/wlan-ng.opts (PCMCIA type NICs) configuration file. Locate the lines containing ssid=linux_wlan, and set the SSID to whatever value you’ve decided to use on your wireless LAN. This example uses homenet.

Also modify the IS_ADHOC option to make your NIC either support Ad-hoc mode for peer-to-peer networks or Infrastructure mode if you are using a WAP.

Here is a sample snippet.

#=======SELECT STATION MODE===================
IS_ADHOC=n # y|n, y – adhoc, n – infrastructure

#=======INFRASTRUCTURE STATION START===================
# SSID is all we have for now
AuthType="opensystem" # opensystem | sharedkey (requires WEP)
# Use DesiredSSID="" to associate with any AP in range
DesiredSSID="homenet"

MRTG Differences

You will need to take the following differences into account when configuring MRTG for various versions of Fedora and RedHat.
File locations

In RedHat 9 and older, MRTG files are located in the /var/www/html/mrtg/. In Fedora Core, the files are located in the /var/www/mrtg/ directory. In both cases, the MRTG graphs can be accessed using a default Apache installation via the URL http://server-ip-address/mrtg.
Indexmaker MRTG_LIB Errors With RedHat 9 and 8.0

RedHat versions 8 and 9 give an error when running indexmaker.

[root@bigboy mrtg]# indexmaker –output=index.html \
/etc/mrtg/mrtg.cfg
Can’t locate package $VERSION for @MRTG_lib::ISA at /usr/bin/indexmaker line 49
main::BEGIN() called at /usr/bin/../lib/mrtg2/MRTG_lib.pm line 49
eval {…} called at /usr/bin/../lib/mrtg2/MRTG_lib.pm line 49
[root@bigboy mrtg]#

This is caused by an incompatibility between MRTG and PERL 5.8, which MRTG uses to generate files. The MRTG site claims this was fixed in version 2.9.22, but this version of MRTG seems to fail under RedHat.

The fix is simple: edit the file /usr/lib/mrtg2/MRTG_lib.pm replacing the line

@ISA = qw(Exporter $VERSION);

with

@ISA = qw(Exporter);

You’ll then have to run indexmaker again.
Precedence Bitwise Error With RedHat 9

indexmaker may also give an error like the one below related to a bitwise operation. It doesn’t seem to affect the operation of MRTG or the HTML index page output. For example:

Possible precedence problem on bitwise | operator at /usr/bin/../lib/mrtg2/BER.pm line 601

Webalizer Differences

Older versions of Webalizer, especially those found with RedHat 8.0 and earlier, have a tendency to create this message in your logs.

Error: Unable to open DNS cache file /var/lib/webalizer/dns_cache.db

According to the documentation on Webalizer’s Web site, this is not a critical error. You can make the software run in quiet mode by editing the configuration file and changing the Quiet parameter to yes.

Quiet yes

Quick and dirty Samba setup

Quick and dirty Samba setup

Samba is an open source project that allows Windows users to connect to a Linux server from which to share data. If you are looking for a simple, affordable home file server, or need more disk space on your office network, a Linux server with Samba is the way to go. Linux along with Samba offers a stable, secure environment that is available at no cost, along with features such as remote administration, immunity to Windows viruses, and the ability to run on low-end machines. Here’s how you can set up a simple Samba server on Slackware for SOHO use.

<A TARGET="_top" HREF="http://ad.doubleclick.net/click%3Bh=v8/34be/3/0/%2a/d%3B24045140%3B2-0%3B0%3B12233542%3B4252-336/280%3B18522226/18540121/1%3B%3B%7Efdr%3D61253868%3B0-0%3B0%3B13357575%3B255-0/0%3B19247511/19265406/1%3B%3B%7Esscs%3D%3fhttp://www.cdw.com/shop/products/default.asp?edc=982097&cm_mmc=DTNB-_-OSTG-_-swf-_-1006_ACE_DTNB_336x280"><IMG SRC="http://m1.2mdn.net/1008847/1006_ACE_DTNB_336x280.gif" BORDER=0></A>

Most current Linux distributions, including Slackware 11, have Samba already installed and running after the system boots. This article assumes that Samba has been installed. The commands work for Slackware version 11 and 10.2, and likely many other Linux distros.

The first step is to create a share folder on your hard drive; for instance, /disk2/data. After that, you need to edit the smb.conf file, found in /etc/samba, and make it look something like this:

# Global parameters
[global]
workgroup = HOME
netbios name = SAMBA
server string = Samba Server %v
map to guest = Bad User
log file = /var/log/samba/log.%m
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
preferred master = No
local master = No
dns proxy = No
security = User

# Share
[Data]
path = /disk2/data
valid users = joel
read only = No
create mask = 0777
directory mask = 0777

You can copy and paste this into your conf file or make changes to your existing one.

The workgroup name needs to be the workgroup of your Windows computers, or your domain name. The netbios name is what will appear when you access the Linux computer from Windows. I am currently running a Windows domain with this setup, so I have the preferred master and local master set to no to avoid both servers from attempting to be the master browser. This will eliminate network conflicts on your Windows computers that can cause network-related outages.

For the share details, specify the valid users, or set them up later. In that section you can allow users to create their own folder and files for all to access.

The next step is to add users by the following command:

# useradd -c "Joel Nahrgang" joel
# smbpasswd -a joel
New SMB password: secret
Reenter SMB password: secret
Added user joel

Next, run the testparm command to ensure that the conf file is valid. If it returns no errors, restart Samba with the command /etc/rc.d/rc.samba restart. You should also make Samba executable when the server is rebooted with the command chmod 755 /etc/rc.d/rc.samba.

If you would like to tidy up your smb.conf file, the following commands will back up the file, then remove all the comments for easier reading:
# cd /etc/samba
# cp -a smb.conf smb.conf.master
# testparm -s smb.conf.master > smb.conf

Now you’re ready to test Samba. On a Windows computer, you can either map a drive to the Samba server or access the drive using the Start-Run command and typing \\Samba\data, "Samba" being the server name and "data" being the shared folder.

One disclaimer: this setup serves a small network or a home network. For a larger user base and more complex network configuration, you may want to use the documentation provided on the Samba Web site.

Using YUM to update software

How do I install software for Fedora? (How to use yum or an RPM) (Updated 9 May 2006)
A: The easiest way to install software in Fedora is to use yum.

Configuring Yum

Here’s how to configure your yum:

1. Open a Terminal.
2. Become root:

su –
3. Run these commands to remove your yum.conf file and replace it with a fresh one (Updated 1 May 2006):

cd /etc
mv -f yum.conf yum.conf.bak
wget http://www.fedorafaq.org/samples/yum.conf
4. Now, install my yum configuration (Updated 9 May 2006), using this command:

rpm -Uvh http://www.fedorafaq.org/yum http://rpm.livna.org/livna-release-5.rpm

NOTE: The yum configuration provided here is updated from time to time, for various reasons.
Using Yum

To use yum, open a terminal, become root, and then you can use the following commands:

* To see a list of available software:

yum list available
* To install some software, you type:

yum install packagename
* To update some software, you type:

yum update packagename

If you leave out "packagename" yum will update all your software.
* To see what updates are available, you can do:

yum check-update
* To search for a package, you can do:

yum search word

IPMItool

IPMItool is a utility for managing and configuring devices that support the Intelligent Platform Management Interface (IPMI) version 1.5 and version 2.0 specifications. IPMI is an open standard for monitoring, logging, recovery, inventory, and control of hardware that is implemented independent of the main CPU, BIOS, and OS. The service processor (or Baseboard Management Controller, BMC) is the brain behind platform management and its primary purpose is to handle the autonomous sensor monitoring and event logging features.

The ipmitool program provides a simple command-line interface to this BMC. It features the ability to read the sensor data repository (SDR) and print sensor values, display the contents of the System Event Log (SEL), print Field Replaceable Unit (FRU) inventory information, read and set LAN configuration parameters, and perform remote chassis power control.

get it here:
http://sourceforge.net/project/showfiles.php?group_id=95200

Sample use
# /usr/sfw/bin/ipmitool -I bmc (or lan or open) -H -U root (or admin) fru list
# /usr/sfw/bin/ipmitool -I bmc (or lan or open) -H -U root (or admin) sel elist

redhat drive naming conventions

1. /dev/hda – denote primary-master IDE hard disk
2. /dev/hdb – denote primary-slave IDE hard disk
3. /dev/hdc – denote secondary-master IDE hard disk
4. /dev/hdd – denote secondary-slave IDE hard disk

Redhat naming convention for SCSI hard disk is somewhat similar. For example,

* /dev/sda – denote SCSI hard disk of SCSI ID 1
* /dev/sda1 – denote first partition of SCSI hard disk of SCSI ID 1
* /dev/sdb3 – denote third partition of SCSI hard disk of SCSI ID 3
* /dev/sdd4 – denote forth partition of SCSI hard disk of SCSI ID 4

Add Extra Hard Disk To Redhat Linux

This guide is above how to add extra IDE or SCSI hard disk to a live Redhat Linux server. Although, it serves to give some ideas that applied for other Linux variants as well.

Redhat naming convention for IDE hard disk are

1. /dev/hda – denote primary-master IDE hard disk
2. /dev/hdb – denote primary-slave IDE hard disk
3. /dev/hdc – denote secondary-master IDE hard disk
4. /dev/hdd – denote secondary-slave IDE hard disk

Redhat naming convention for SCSI hard disk is somewhat similar. For example,

* /dev/sda – denote SCSI hard disk of SCSI ID 1
* /dev/sda1 – denote first partition of SCSI hard disk of SCSI ID 1
* /dev/sdb3 – denote third partition of SCSI hard disk of SCSI ID 3
* /dev/sdd4 – denote forth partition of SCSI hard disk of SCSI ID 4

Adding extra IDE or SCSI hard disk to a live Redhat Linux server is a fairly simple work. It looks lengthy as follow, but the works is not.

1. Shutdown the Redhat Linux system by typing init 0

2. Unplug the power source to ensure server board totally power off.

3. Plug in the extra hard disk physically to the IDE or SCSI port.

4. Bring up the system to single user mode, i.e init 1 or runlevel 1

* Using GRUB as boot loader

1. Select the Redhat Linux kernel version to load using the up/down arrow key.

2. Type e to enter GRUB editor mode

3. Select the line that starts with kernel and type e to edit the line.

4. Go to the end of the line, press space bar to create a space, and type single

5. Press ENTER key to exit edit mode.

6. Type b to boot into single user mode.

* Using LILO as boot loader

1. If using the graphical LILO, press CTRL+X to exit the graphical LILO screen and go to the boot: prompt.

2. At the boot: prompt, type linux single to enter single user mode.

5. Create Partition (Assuming the extra hard disk to add is a primary-slave IDE hard disk)

1. Type fdisk /dev/hdb to begin

2. Press m to get a list of command associated with fdisk program.

3. Press n follow by e to create primary partition.

4. Press 1 for partition number prompt to indicate it is the first partition of the hard disk

5. Press ENTER twice to used the default values given by fdisk, to indicate it is the first and last partition of the hard disk, that utilize whole hard disk space.

6. Press p to print the partition table information that is just created. Confirm the information and work done are correct as of this stage.

7. Press w to save the work done after confirmation.

6. Performing scan disk to check for possible hard disk bad sectors before creating a Linux ext3 file system on partition created earlier, by typing

mkfs -t ext3 -c /dev/hdb1

7. After creating the file system, perhaps it is a good chance to tune the file system before mounting it. Refer to tune2fs command for some interesting tuning parameters available for the file system.

8. Mount the ext3 file system created

1. Create a directory to serve as mount point, type mkdir /NewIDE

2. Append the following line into /etc/fstab, which is used to auto mount file systems on each reboot

/dev/hdb1 /NewIDE ext3 defaults 1 2

The digit 1 in the line indicates that the mounted file system will be backed up upon dump execution.

The digit 2 in the line indicates the order that fsck should check during its execution. Type man fstab for details related to fstab configuration file.

3. Type mount /dev/hdb1 to confirm the /etc/fstab configuration are correct. The mount /dev/hdb1 command will actually refers /etc/fstab to get the complete setting about the going to mount file system. This is equivalent to the complete command of

mount -t ext3 /dev/hdb1 /NewIDE

4. Type df -hTa to verify the new file system mounted successfully.

9. Done.