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

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

王林
Release: 2020-05-20 13:40:39
Original
1913 people have browsed it

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

Problem description:

Unplugging the U disk after installing Centos cannot start

Solution:

Re-establish the boot partition

Specific steps:

1. Switch to root user

#su -- root
Copy after login

2. Enter grub mode

#grub
Copy after login

3. Follow the steps below

grub>find /boot/grub/stage1
Copy after login

or

find /grub/stage1
Copy after login

will generally return something like (hd0,5), remember it.

grub>quit
Copy after login

4. Edit grub.conf

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

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

5. Re-enter grub mode and perform the following steps. Note that there are spaces between the two commands below.

grub>root (hdx,y)   
grub>setup (hdx)
grub>quit
Copy after login

6. Restart

#shutdown -r now
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 and removing the 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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template