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
2. Enter grub mode
#grub
3. Follow the steps below
grub>find /boot/grub/stage1
or
find /grub/stage1
will generally return something like (hd0,5), remember it.
grub>quit
4. Edit grub.conf
#vim /boot/grub/grub.conf
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
6. Restart
#shutdown -r now
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!