What should I do if Centos cannot be started after unplugging it from a USB flash drive?

coldplay.xixi
Release: 2020-07-28 13:54:22
Original
2913 people have browsed it

The solution to the problem that the U disk cannot be started after unplugging the U disk after installing Centos: first switch to the root user and enter grub mode; then edit [grub.conf] and enter grub mode again to execute relevant statements; finally restart That’s it.

What should I do if Centos cannot be started after unplugging it from a USB flash drive?

Solution to the problem that Centos cannot be started after uninstalling the USB disk after installing Centos:

1. Switch to the 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或者find /grub/stage1
Copy after login

Generally, something similar to (hd0,5) will be returned. 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 is a space 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 related tutorials: centos tutorial

The above is the detailed content of What should I do if Centos cannot be started after unplugging it 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
Popular Tutorials
More>
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!