Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ GRUB and Linux system repair     - Ubuntu set Swap Space Tutorial (Linux)

- After Pydev installation, Eclipse does not display solutions (Linux)

- C ++ containers (Programming)

- Linux file and directory permissions settings (Linux)

- DRBD + Heartbeat solve NFS single point of failure (Server)

- Ubuntu is expected to allow you to install the latest Nvidia Linux drivers easier (Linux)

- linux remote control software (Linux)

- File SUID, SGID, Sticky property (Linux)

- Ubuntu UFW firewall settings Introduction (Linux)

- CentOS static IP network configuration (Linux)

- BGP routers want to play it by CentOS (Linux)

- Source Analysis: Java object memory allocation (Programming)

- Linux operating system to solve a serious fault handling (Linux)

- Nginx Performance Tuning Guidelines (Server)

- How Oracle implements random reads from specific combinations (Database)

- How to build a container cluster (Server)

- Linux System Getting Started Learning: Statistical process a number of threads in Linux (Linux)

- Oracle inline view updates problems encountered (Database)

- Digital jQuery scrolling effect (Programming)

- Difference Docker mirror and containers (Server)

 
         
  GRUB and Linux system repair
     
  Add Date : 2017-09-03      
         
       
         
  GRUB configuration parsing
Configuration files are saved in a separate division /boot/grub/grub.conf[/boot partition should preferably come out]

Soft links saved in /etc/grub.conf

1, grub.conf file analysis

default # default start system

timeout # default wait time in seconds s

splashimage # define GRUB boot background image

 # (Hd0,0) # specify where the boot partition / -> the first hard disk, first partition

hiddenmenu # Hide menu

title CentOS (2.6.32-358.el6.i686) # menu item name, its contents can be modified

 root (hd0,0) # defines the GRUB kernel root device that is where the partition, the / boot directory, on behalf of all partitions on the boot device resides

 kernel /vmlinuz-2.6.32-358.el6.i686 ro root = UU ... # define the location of the kernel Note: / here does not mean that is the root partition, but rather that the / boot directory

 initrd /initramfs-2.6.32-358.el6.i686.img # load the image file, for more information, refer to < CentOS 6.X boot process> this blog

Single-user mode applications
Case: forget the root password, abnormal power failure

1. When the system starts, press the Esc key to enter the GRUB menu

GRUB function keys:

 e: Edit the current boot menu items // edit

 c: to enter the GRUB command line // command

 b: Start the current boot menu items //

 d: delete the current line // delete

 Esc: return to the GRUB boot menu interface, cancel any modifications made to the current single

2. Click the kernel line and press e to edit the start level, starting with the corresponding end of the line run level, such as: 1 or s, Enter, b to enter single-user mode

 passwd root # to change the root password

   # Can also be used for other settings, such as abnormal after power failure, the file system repair.

Setting GRUB password
Step 1: Set the ciphertext, the cipher text and copy

Method 1. Use the built-in GRUB grub-md5-crypt command

Method 2. Use md5crypt command in the GRUB interactive command-line interface

Step two: modify the configuration file /boot/grub/grub.conf

Added: password --md5 $ 1 $ EszU60 $ Mc2BwxeWUH / 8q3iqbRknz0 # - md5 representation is md5 encrypted

After the restart

OK, we're done!

GRUB repair
Case: When the boot into the grub menu interface but no, only a grub> prompt

Solution:

grub> cat /grub/grub.conf # Found an error

Manual boot Linux system:

 grub> root (hd0,0)

 grub> kernel /vmlinuz-2.6.18-14 ro root = LABEL = / 3 # If you knock on the wrong this time, please pay attention to the message

 grub> initrd /initrd-2.6.18-14.img

 grub> boot # At this point you can use the Tab command completion

Linux ultimate recovery mode

Case: / etc / inittab file is damaged or missing, or other serious harm, cause the system to not start

Repair process

1. Place the installation disk into the drive, restart the system, F2 to enter the BIOS, the BIOS, the system is set to CD-ROM guide.

2.boot prompt, enter:

linux rescue

3. Enter into repair mode.

Follow the prompts to enter the system after:

4. Type chroot / mnt / sysimage # change the root partition

5, and then in front of the message, you can repair

6, the repair is completed, exit, reboot, done!

note:

Linux no matter how serious the damage, you can enter the CD Linux repair repair environment, like important files are deleted, root with GRUB password forgot all about it, almost all errors; this time, although you are running Linux on the disc, but can the data on existing systems to be modified.
     
         
       
         
  More:      
 
- Node.js installed on Ubuntu Upstream version (Linux)
- Oracle delete table space prompted ORA-00604 and ORA-38301 (Database)
- Linux system started to learn: Teaches you install Ubuntu 15.04 on VirtualBox (Linux)
- Install Ubuntu text editor KKEdit 0.2.10 (Linux)
- Compile and install LNMP under CentOS 6.5 (Server)
- vector C ++ sequence containers (Programming)
- Linux System Getting Started Learning: Fix ImportError: No module named scapy.all (Linux)
- Du and df show disk space usage inconsistent Causes and Treatment (Linux)
- How to install Gnome 3.10 in Ubuntu 13.10 (Linux)
- HomeKit User Interface Guidelines (Linux)
- Linux instructions and examples GPG encryption and decryption (Linux)
- 11G ASM disk group does not automatically handle MOUNT (Database)
- To install CentOS 6.5 on your hard drive under Windows 7 (Linux)
- SteamOS installation under Ubuntu 14.04 (Linux)
- The source code compiler installation Nginx 1.8.0 under Ubuntu 14.10 (Server)
- Linux user login and IP restrictions (Linux)
- Make Linux more secure server tips (Linux)
- Bash Automated Customization Linux belongs to its own CentOS system (Linux)
- using the ssh command to check the socket / Network Connections (Linux)
- To learn linux security (Linux)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.