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

王林
Release: 2020-05-22 09:08:05
Original
4252 people have browsed it

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 -
Copy after login

2. Enter grub mode

#grub
Copy after login

3. Find the boot media

grub>find /grub/stage1
Copy after login

or

find /boot/grub/stage1
Copy after login

will generally return something similar to (hd0,0)

grub>quit
Copy after login

4. Edit grub.conf

#vim /boot/grub/grub.conf
Copy after login

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
Copy after login

6. Restart

#reboot
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!