Home >Operation and Maintenance >CentOS >What should I do if centos cannot be started after installing CentOS from a USB flash drive?

What should I do if centos cannot be started after installing CentOS from a USB flash drive?

王林
王林Original
2020-05-22 09:08:054459browse

What should I do if centos cannot be started after installing CentOS from a USB flash drive?

Cause analysis:

When installing the system, grub is installed on your U disk by default. Therefore, when you turn on the computer and do not insert the U disk, the system is Unable to boot into the system through grub.

The solution is as follows:

1. Switch to the root user

#su -

2. Enter grub mode

#grub

3. Find the boot media

grub>find /grub/stage1

or

find /boot/grub/stage1

will generally return something similar to (hd0,0)

grub>quit

4. Edit grub.conf

#vim /boot/grub/grub.conf

and copy the file Replace all occurrences of (hdx, y) in with the values ​​obtained in the third step.

5. Re-enter grub mode and perform the following steps

grub>root (hdx,y)
grub>setup (hdx)
grub>quit

6. Restart

#reboot

Recommended tutorial: centos tutorial

The above is the detailed content of What should I do if centos cannot be started after installing CentOS from a USB flash drive?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn