Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the common Linux boot problems and solutions?

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

It is believed that many inexperienced people are at a loss about the common Linux guided problems and solutions. Therefore, this paper summarizes the causes and solutions of the problems. Through this article, I hope you can solve this problem.

There are only three common problems encountered in Linux booting: MBR is corrupted, boot partition files are missing, or passwords are forgotten. In view of these three problems, here are three corresponding solutions.

1. The solution to the destruction of MBR:

The zero sector of the MBR located on the hard disk occupies 512 bytes.

0 bytes-446 bytes-510 bytes-512 bytes

Location of Grub bootstrapper

Hard disk partition table

End mark

If the first 446 bytes are broken, it can be repaired, but not if there is a problem with the partition table.

1) issue the command: dd if=/dev/zero of=/dev/sda bs=1 count=446; fill the first 446 bytes with blanks, do not type more! I can only fight less. If it's too much, you have to reinstall the system.

2) run reboot to restart the computer after executing the command. Dd

3) the cursor flashes in the upper left corner all the time, but the computer can't start.

4) insert the * * CD of the installation CD; prompt the installation interface to enter linux rescue; to complete the relevant settings according to the prompts.

5) then enter chroot / mnt/sysimage

6) enter sync

7) run / sbin/grub-install / dev/sda; (/ dev/sda corresponds to the hard drive you are using)

8) reboot, start the computer and have a look.

2. All boot partition files are missing:

Boot partition is a separate partition, which is mainly used to store startup-related files. If the files in boot are damaged, the computer will be paralyzed.

1) Rm-rf / boot/*; can completely destroy the contents of the boot partition through the above command.

2) put in the installation CD * to start the computer and prompt the installation interface to enter: linux rescue enter.

3) follow the prompts (network interface Setup Networking, not available)

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 will be updated through the above operation.

5) then edit grub.conf; (the newly installed kernel does not have the file grub.conf, so you need to create it yourself)

Cd / boot/grub

Touch / boot/grub/grub.conf

Vim / boot/grub/grub.conf

6) Save after editing, and restart the computer by typing multiple Exit in succession.

3. Those who cannot enter Linux normally due to incorrect password:

1) boot, install "e" when the linux selection menu appears, select the "kernel / vmlinuz-2.6.18-92.el5 ro root=LABEL=/ rhgb quiet" item, and then press "e" to enter "space 1" after the menu item. * * the appearance is "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", and press "b" to reboot the computer.

2) after startup, the computer is in single-user linux mode. When "sh-3.1#" appears, enter the "Passwd" command, enter the new password according to the prompt, and confirm it.

3) enter reboot (or init 6) to restart the computer.

After reading the above, have you mastered the common Linux boot problems and solutions? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report