Article Title: three common Linux boot problems and solutions. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Linux boot has three common problems: the MBR is damaged, the boot partition file is lost, and the password is forgotten. The following three solutions are provided to address these three problems.
1. Solutions to MBR destruction:
The MBR occupies 512 bytes in the hard disk with zero track and zero sector.
0 bytes -------------- 446 bytes ---------- 510 bytes --------- 512 bytes
Location of Grub boot program
Hard Disk Partition Table
End mark
If the first 446 bytes are damaged, it can be repaired. If the partition table has a problem, it cannot be repaired.
1) run the following command: dd if =/dev/zero of =/dev/sda bs = 1 count = 446; fill the first 446 bytes with null values and do not add more! You can only play less. You need to reinstall the system.
2) execute the command and run reboot to restart the computer. Dd
3) when the cursor keeps flashing in the upper left corner, the computer cannot start.
4) place the first disc on the installation disc, and enter linux rescue on the prompt page. Complete related settings as prompted.
5) then enter chroot/mnt/sysimage
6) Input sync
7) run/sbin/grub-install/dev/sda; (/dev/sda corresponds to your hard disk)
8) Run reboot to start the computer.
2. All boot partition files are lost:
The boot partition is a separate partition used to store startup-related files. If the files in the boot system are damaged, the computer will be paralyzed.
1) Rm-rf/boot/*; use the above command to completely destroy the content of the boot partition.
2) enter the first installation disc to start the computer, and enter "linux rescue" on the prompt page.
3) operate as prompted (Network Interface Setup Networking, unavailable)
4) "sh-3.1 #" appears #
Chroot/mnt/sysimage
Mkdir/mnt/cd
Mount/dev/hdc/mnt/cd
Cd/mnt/cd/Server
Rpm-Uvh-force kernel-2.6.18-53-e15.i686.rpm
Note: The kernel is updated through the above operations.
5) EDIT grub. conf. (the newly installed kernel does not have the grub. conf file. You need to create it yourself)
Cd/boot/grub
Touch/boot/grub. conf
Vim/boot/grub. conf
6) After editing, save the settings and press multiple exits to restart the computer.
3. If the password is incorrect, the system cannot access Linux normally:
1) boot, when the linux selection menu appears "e", choose "kernel/vmlinuz-2.6.18-92.el5 ro root = LABEL =/rhgb quiet" project, then press "e" and enter "space 1" after the menu item, last look like "kernel/vmlinuz-2.6.18-92.el5 ro root = LABEL =/rhgb quiet 1" or "kernel/vmlinuz-2.6.18-92.el5 ro root = LABEL =/rhgb quiet single ", return and press "B" to reboot the computer.
2) The started computer is in linux mode for a single user. If "sh-3.1 #" is displayed, enter the "Passwd" command and press Enter. Enter the new password as prompted and confirm the password.
3) Enter reboot (or init 6) and press enter to restart the computer.