Troubleshooting during linux File Server Installation

Source: Internet
Author: User
When installing the linux File Server, skip the troubleshooting tutorial-Linux Enterprise Application-Linux server application information. For details, refer to the following section. Please try your best to use the tree mode.

Troubleshooting during system installation
Troubleshooting during System Configuration
Troubleshooting of emergencies
??
Troubleshooting during system installation
??
Troubleshooting during system installation is mainly to solve the problem of Linux system installation failure and system installation errors. It mainly includes the compatibility of the motherboard chip and support for external device drivers.
??
Motherboard chip compatibility
The compatibility with the motherboard chip mainly refers to whether the Linux operating system can correctly identify the chip integrated on the motherboard and install the correct driver for it. Compatibility can be roughly divided into two layers. One is completely unsupported, that is, the Linux operating system cannot identify the chip, or the chip on the motherboard does not have a driver in the Linux operating system; the second case is that the operating system can identify the chip, but requires additional Kernel patches or drivers. However, the driver is only in the test phase and the stability and performance are not guaranteed.
There are several solutions to the problem of motherboard chip compatibility:

First, choose a motherboard from a well-known manufacturer and try to choose an Intel series chipset. In general, Intel is much better at driver development than other Motherboard chipset providers such as VIA and SIS. Generally, in terms of stability and performance, the drivers of Intel chipset in Linux are much better than those of other vendors.

2. Select a Linux operating system with a higher version. The installation disc of a later version of Linux operating system is attached to the kernel Compression Image boot from the CD, with more drivers for the new chipset, therefore, it is more convenient to support new chipset and other hardware devices. However, it should be noted that the development progress of drivers in Linux is generally relatively slow. When a newer version of Linux adds drivers that are not included in the system, it is difficult to find the driver for this version.
??
External Device Driver support problems
The external devices here mainly refer to the NIC, array card or scsicard issues, which will be discussed separately.

The driver for the NIC mainly supports the core chip of the NIC. Not all NICs have drivers in Linux. There are many poor chip manufacturers who do not want the chip to be used in Linux when developing it. Therefore, they only want to develop drivers for Windows operating systems, you will not be able to use this device in Linux unless you are willing to develop your own driver. There are also some chips, because too old, and unable to use, typical such as TP-LINK TG-3220 used by the tmi tamarack TC9020 chip, manufacturers have closed down, no longer have new driver support.

Common Nic chips, such as realtek 8139/8169, Intel series chipset, and 3COM series chipset, can be directly supported without additional driver installation, because the driver is included with the release version of the operating system. The driver provided by the release version is generally a kernel module that ends with. o, such as eepro100.o. These built-in drivers are located in the/lib/modules/kernel version/kernel/drivers directory. If you need to install a device, check whether the system has the driver attached to the device according to the device type. If not, you need to download the driver of the device in Linux for installation.

The general driver installation process involves three steps: Configuring the kernel version, compiling the source program, and generating the kernel module; the second step is inserting the generated kernel module into insmod, the third step is to copy the kernel module to the system's default kernel module storage directory and edit/etc/modules. conf file so that the module can be automatically inserted when the system starts. The following describes how to install a gigabit Nic of the BCM 9.0 series chipset in Redhat 5700.

Step 1: Obtain the driver package from the drive disc or from the network. For example, bcm5700-6.0.2.tar.gz can be copied to a Linux host through sftp protocol (A 8139 Nic can be inserted first ). Unlock driver package

Tar zxf bcm5700-6.0.2.tar.gz
Go to the source code directory
Cd src
Make
Bcm5700.o file will be generated
??
Step 2: insert the kernel module
Insmod./bcm5700.o
??
Step 3: copy the kernel module to the/lib/modules/2.4.24/kernel/drivers directory.
Cp./bcm5700.o/lib/modules/2.4.24/kernel/drivers

Edit the/etc/modules. conf file so that the system can insert the kernel at startup.

Vi/etc/modules. conf
Add a row
Alias eth0 bcm5700
??
Restart the machine. When kudzu service is started, the NIC is checked and can be configured.

For the installation process of drivers for other external devices, see install the NIC.
??
Installation of RAID card, scsicard, and SATA driver
The installation of storage devices is special. Therefore, we separate them from the External Device Driver Installation. The installation of storage devices is generally divided into two categories: the first category, the system is guided by the IDE hard disk, and the SCSI devices (RAID cards and SATA devices are both simulated or similar to SCSI devices, these devices are collectively referred to as SCSI devices. The same below) are only installed after the system is installed. The second type means that the boot needs to be directly installed on the SCSI device, and the driver needs to be installed when the system is installed. Otherwise, the installer cannot find a valid storage device to install the system.
??
Install the SCSI device driver under the guidance of the IDE.
That is, the system is guided by the IDE, while the SCSI device is only used as an external device to install the driver. In this case, you can refer to the driver Installation Method for general external devices in the previous chapter. Note that if the SCSI device is connected to the system without the driver installed, the system may crash. Because the system cannot correctly drive the SCSI device, it is easy to cause kernel confusion. Therefore, we recommend that you unplug the scsicard before installing the driver. If it is a SCSI device integrated with the motherboard, disable the SCSI device from the motherboard BIOS settings. After the driver is installed, shut down the computer, plug in the SCSI device, or enable the SCSI device from the BIOS, and then restart the computer.

For how to install the SCSI driver in this case, refer to the driver installation section of the common external device. We will not describe it here.
??
Driver Installation on the SCSI Device
If the system needs to be installed on a SCSI device, such as a SCSI hard disk, an ide raid card, or a SATA hard disk, A special method is required to install the driver of the SCSI device. Of course, this step is not required for general SCSI devices. For example, the aic7xxx series SCSI interface card of Adptec, or Intel's ata_piix series SATA interface chipset and other general Linux releases all come with these drivers, these SCSI devices can be identified and supported in the kernel image decompressed during the boot of the operating system installation CD. If some chips are not very common, you need to manually install the driver. We have installed the driver of the VIA VT8237/6420 series sata raid control chip for your specific second.

Step 1: Get the driver package, such as from the drive disc or from the network. Currently, the driver package provided by VIA official website for the RedHat system is via_raid_linux_v100_20040412.zip. Unbind the package through Winrar on Windows, and copy the Driver directory in the installation package to a server with Redhat9.0 installed through sftp.

Step 2: generate the drive disk image. imgfile.
Chmod + x dd. sh
./Dd. sh

In this way, a viamraid. img image file is generated under the driverdisk directory. Note that currently, VIA only supports the Redhat 9.0 driver, which cannot be installed on RHAS. In addition, this process can only run on a Linux machine with Redhat 9.0 installed. If it is running on another version of the operating system, the installer cannot read the driver information from the generated. imgfile. If your existing Linux server is not Redhat 9.0, you can directly use the viamraid. imgfile already provided in the Driverdisk subdirectory in the Driver directory.

Step 3: Write the generated imgfile to the disk.

Insert a blank disk into the drive to disable write protection.
Dd if = driverdisk/viamraid. img of =/dev/fd0

If you do not have an existing Linux operating system, you can use the Disk Mirroring software in Windows to write the viamraid. IMG files provided in the Driverdisk subdirectory to the disk.

Step 4: Use Redhat 9.0 to install the CD boot. When the boot prompt is displayed, enter the linux dd or do not enter the boot information so that the system prompts you to insert the drive disk. If you enter the linux dd boot installer, the system will prompt, Do you have a dirver disk? Select Yes. Then select/dev/fd0, and the system will read the driver information to the kernel. The installer will be able to find the SATA hard disk normally, and the installation can follow the usual steps.

It must be noted that the VT8237 chip driver provided by VIA currently has poor performance in Linux. This is caused by driver design and cannot be set to improve performance. Therefore, we do not recommend that you use this motherboard to install Linux servers.
?
Troubleshooting during System Configuration
??
Troubleshooting in the system configuration process mainly includes the configuration of services that the online entertainment platform depends on and the configuration of several commonly used configuration files in the system.
??
/Etc/fstab Configuration
The/etc/fstab file is the configuration file automatically mounted by the file system. During the startup of the Linux operating system, the file system is automatically mounted Based on the fstab and mtab files. Fstab is common during normal use.

The file structure of/etc/fstab is as follows:
LABEL = // ext3 defaults 1 1
None/dev/pts devpts gid = 5, mode = 620 0 0
LABEL =/home/download ext3 defaults 1 2
LABEL =/home/menu ext3 defaults 1 2
LABEL =/home/mp3/home/mp3 ext3 defaults 1 2
None/proc defaults 0 0
None/dev/shm tmpfs defaults 0 0
/Dev/hda8 swap defaults 0 0
/Dev/hdc1/game ext3 defaults 1 2
/Dev/hdd1/game2 ext3 defaults 1 2
??
Each row indicates a mount point. The format is
Device Name mount point File System Format option backup check

Note the relationship between the device name and the mount point. If the mount point does not exist, you need to manually create the mount point. The method for creating a mount point is simple. You can directly use the Directory Creation command.

Mkdir/test

In this way, you can create a mount point named/test.
??
Another issue that needs to be noted is that if a mount problem occurs in the name marked in fstab, the system will not be able to start normally, generally, you will be prompted to enter the root password to enter the file system repair mode or press ctrl + D to restart. In this case, you only need to enter the root password and then edit the fatab file to comment out a "#" before the mounting project.
??
/Etc/modules. conf configuration file
The/etc/modules. conf configuration file is the configuration file that the system automatically inserts into the kernel module. If the driver of some peripheral devices is designed as a dynamic module type and is not included in the kernel, You need to manually use the insmod command to insert the kernel module to drive these devices. If you want the system to automatically Insert the dynamic kernel module at startup and set the parameters of the module, You need to configure the module in this file.

The/etc/modules. conf file structure is as follows:
Alias eth0 e1000
Alias scsi_hostadapter ata_piix
Alias usb-controller usb-uhci
Alias sound-slot-0 i810_audio
Alias usb-controller1 ehci-hcd
??
Each line in the/etc/modules. conf file indicates the insertion of a kernel module or the parameter settings of the module. Here we only discuss how to configure automatic insertion of the kernel dynamic module. In the first example, alias eth0 indicates that after this module is inserted into the kernel, the corresponding device alias is eth0, and e1000 indicates inserting the kernel module File e1000.o under the system's default kernel module storage directory.
??
/Etc/sysconfig/network-script/directory and/etc/sysconfig/networking Directory

The/etc/sysconfig/network-script/directory stores system network-related configuration files in the/etc/sysconfig/networking Directory. It mainly refers to the IP address, subnet mask, MAC address, and gateway of the NIC. Note that files such as ifcfg-ethx are stored in the/etc/sysconfig/network-script/directory; /etc/sysconfig/networking/devices directory and/etc/sysconfig/networking/profiles/default directory. Make sure that all ifcfg-ethx files are consistent. Otherwise, the Network may fail to be connected.

The Ifcfg-ethx file corresponds to ethx. For example, the configuration file for the first ENI eth0 is a ifcfg-eth0. If you need to specify multiple IP addresses for a network card, you just need to create a file like ifcfg-eth0: 1 in this directory. File Content, with reference to the ifcfg-eth0 to modify it.

The specific structure of the Ifcfg-eth0 is as follows
# 3Com Corporation | 3c905C-TX/TX-M [Tornado]
DEVICE = eth0
ONBOOT = yes
BOOTPROTO = static
IPADDR = 192.168.1.101
NETMASK = 255.255.255.0
GATEWAY = 192.168.1.1
HWADDR = 00: 06: 5B: BE: 0C: AD
??
Note that if a computer has two NICs during installation and a NIC is removed after installation, sometimes the system cannot detect hardware changes in the system, therefore, you need to manually modify the configuration file. At this time, you need to manually delete all the ifcfg-ethx files under the three directories. Otherwise, it will be messy.
??
/Etc/samba/smb. conf configuration file
/Etc/samba/smb. conf is the main configuration file of the samba service. It is also a file that we usually deal. Although the installation can complete all the configurations through the installation program, we still hope that you will be familiar with the configuration method of this configuration file to cope with special situations.

The content format of Smb. conf is as follows:
Unix charset = cp936
Dos charset = cp936
Display charset = cp936
Netbios name = ECOFE2
Server string = Samba Server % v
Encrypt passwords = Yes
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
Printcap name = cups
Dns proxy = No
Guest account = admin
Valid users = admin, user, super, oface, cface, update
Admin users = admin, super, update
Write list = admin, super, update
Printer admin = @ adm
Printing = cups
[Menu $]
Path =/home/menu
Write list = admin, user, update
Read only = No
Browseable = No
??
[Mp3 $]
Path =/home/mp3
Browseable = No
??
[Game $]
Path =/game
Browseable = No ??
[Game2 $]
Path =/game2
Browseable = No

As this file is important, I will explain in detail the various settings.

Unix charset = cp936
Dos charset = cp936
Display charset = cp936

These three lines are used to ensure that Samba 3.0 can normally display Chinese characters. If the three lines are removed, Chinese characters are garbled.

Netbios name = ECOFE2

This setting specifies the server's netbios machine name. Do not change this setting. Otherwise, other machines cannot access the server normally.

Valid users = admin, user, super, oface, cface, update
Admin users = admin, super, update
Write list = admin, super, update

These three lines are very important. Only the user name specified in valid users can access the server. Otherwise, access will be denied. Admin users specifies which users have management permissions and write list specifies which users can have write permissions. These two rows are generally the same.

[Game $]
Path =/game
Browseable = No

This section specifies a share. If you need to specify a share, use the [] sign to expand the share name. If you end with the $ symbol, it is an implicit share. Then, use path =/game to specify the shared mount point or directory. Other parts of the configuration are dispensable, but they are written for rigorous consideration.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.