In Linux system emergency handles six action
Tuesday, March 03, 2009 by rain
? ? 1. Use emergency treatment dish group undertake maintenance
? ? emergency treatment dish group (also call Boot/root dish group) ,It is the tool with systematic indispensable manager.Can be started independently with it and run a whole Linux system.Actually,Emergency treatment dish the 2nd piece in the group dish go up to have a whole Linux system,Including Root file is all;And the 1st piece dish deposited the kernel that can start.Use emergency treatment dish group maintain a system very simple.Need two pieces to use this only dish after the system that start,Enter emergency treatment mode,What use at this moment is Root account.To can visit the file on hard disk,Need installs system of hard disk file by hand.For example,Can be in with the command below / the installation in Mnt catalog / Dev/hda2 dish the Linux file system of the Ext2fs type that go up:# Monut -t Ext2/dev/hda2/mnt
? ? is noted:Root catalog is emergency treatment now dish the root catalog that go up.To visit the file in system of hard disk file,Must install it to a certain catalog to fall first.Such,If get on hard disk,file system setup is in / below Mmt catalog,Criterion on hard disk original / the method of Etc/passwd file is / Mnt/etc/passwd.
? ? 2, the processing technique when file system is destroyed
When ? ? is destroyed when file system,If use the file system that is Ext2fs type,Can carrying from floppy disk E2fsck command will amend a document is all in damaged data.To the file system of other type,Can use corresponding Fsck to command.From file system is examined on floppy disk when,Had better not Mount is installed.
? ? is noted:The common cause that file system is destroyed is super piece by attaint,Super piece be file system " the head " .It includes the condition of file system, dimension and leisure the information such as disk piece.If damaged of system of a file super piece (what kept not carefully file system directly for example is super a partition is medium) ,So the system may not identify this file system completely,Also cannot install it so,Although use E2fsck to command also mishandle this problem.Nevertheless,The file system of Ext2fs type will be super piece content undertook backup,Deposit a group at driver (Block Group) is attrib border.Can inform with the command that be as follows E2fsck is used super piece backup:# E2fsck -b 8193 it is the partition that shows file system is in,- B 8193 option is used at showing to use those who deposit 8193 in file system is super piece backup data.
? ? 3, the file that restores to lose
If ? ? did not take care to delete important file,Do not have method to restore directly so.But OK still will corresponding file from emergency treatment dish duplicate to go up to hard disk.For example,If deleted a file / Bin/login,Right now the system cannot enter entry interface normally,Can use first aid dish the group system that start,system of hard disk file installation reachs / below Mnt catalog,Use undermentioned order next:#cp - A /bin/login /mnt/bin
? ? " - A " option visits attributive with what hold a file when the copy at telling Cp.Of course if be deleted basic file is absent " emergency treatment dish group " in,Also cannot use this kind of method.If had done a system to back up before,Also can restore so with the backup previously.
? ? 4. The processing technique when function library is destroyed
If ? ? did not take care to destroy document of systematic function library,Perhaps destroyed / the symbol below Lib catalog is linked,Will bring about the command that depends on these libraries to cannot be carried out so.The simplest settlement method is to use first aid dish the group system that start, be in / system of file of hard disk of the installation in Mnt catalog,Next repair / the library below Mnt/lib catalog.
? ? 5, cannot log onto a system with Root Zhang date
? ? as a result of the neglect of systematic manager,Perhaps get as a result of the system of the hacker inbreak, systematic manager cannot log onto a system possibly with Root account.To the 1st kind of circumstance,The likelihood is systematic manager forgot Root password,With emergency treatment dish the group is OK solve a problem.To the 2nd kind of circumstance,As a result of probable it is the password was revised by the hacker,Accordingly systematic manager cannot enter a system,That is to say,Linux system lost control completely,Because this answers to regain systematic control as soon as possible,counterpoise.After gaining Root limits of authority,The case that still should examine a system to be destroyed,Be inbreaked again by the hacker in case.The password that needs the mainest work that do to install Root afresh namely,The control that gains Linux operating system counterpoises.Use first aid above all dish the group system that start,Install the file system of hard disk next / below Mnt catalog,Editor / Mnt/etc/passwd file,its correspondence adds close mouth to make region buy empty at the group of Root account,Following place are shown:Root: 0:0: ROot:/root: Bin/bash
? ? is noted:If the system uses Shadow tool,Need pair of documents / Etc/shadow has afore-mentioned operation,Make Root logs onto a system not to need password.Such,Root account does not have countersign.Should start Linux system from hard disk afresh when,Can login with Root account (the system won't ask to input a password) .After entering a system,The countersign that reoccupy commands Passwd setting is new.
? ? 6, Linux system cannot be started
? ? generally speaking,If systematic manager cannot enter a system normally,With respect to need the consideration uses first aid dish group of breakdown that enter emergency treatment mode to eliminate a system.But in did not make first aid dish below the circumstance of the group,Linux system cannot be started,How should do?
? ? when the PC uses Linux system,It is Linux and MS Windows 9x or MS Windows NT normally those who coexist.
Because ? ? reinstalls other operating systems,Cannot start via often can bringing about original Linux.Because,this basically is,These operating system silent think to there are other operating systems in the computer,Adapted consequently of hard disk advocate guide a record (MBR) ,The LILO system bootstrap that developed Linux.
If ? ? has first aid dish group,So very simple,With the first piece of Linux system that starts dish of hard disk that start,New moving LILO commands,Can write LILO system bootstrap a hard disk advocate guide a record.Switch on the mobile phone again can.
If ? ? is started without the system dish,The Linux that how restores hard disk to go up?Below this kind of circumstance,If know Linux is cut really on hard disk,install partition,And have Loadlin program,Can return Linux afresh.Loadlin program is the program below DOS,Run it to be able to issue the direct Linux that start from DOS,Enter Linux environment quickly.There is this program below the Dosutil/ catalog of CD of Red Hat Linux 6.0.Besides,The image document that still needs a Linux to start a kernel.There is this file below the Images/ catalog of CD of Red Hat Linux 6.0 -- Vmlinuz.
? ? for example,Below Windows 98 system,The odd user mode that enters DOS,Run undermentioned Loadlin to command next,Can enter Linux system afresh:The position of hard disk partition that the Root file system that Loadlin Vmlinuz Root=/dev/hda8/dev/hda8 is Linux is in.After the command is carried out,Lead Linux system.After loginning with Root,Moving LILO commands,Load LILO MBR afresh,Return much before operating system to coexist use position.