So I installed windows for him and then re-guided Ubuntu. The following is a record:Repair guided by gurb:1. Take an Ubuntu system USB flash drive or a CD. If you don't have one, burn it. How can I burn this article. 2. Restart to enter the USB flash drive or CD boot. Select "try Ubuntu ). 3. View information. Open the terminal (ctrl + alt + t) and enter
Sudo-I (administrator privilege) fdisk-l (view partition and type)
Then your disk information appears.
Device Boot Start End Blocks Id System
Find the content in the Device column corresponding to the row 83 in the Id column and check the number of sda. The following is assumed to be sda *. (If there are multiple 83 partitions with IDs, you can try Step 4-6 one later ). 4. Mount the partition. Enter (note * Replacement and space) on the terminal ):
mount /dev/sda* /mnt
5. Enter at the terminal:
grub-install --root-directory=/mnt /dev/sda
Wait a moment and you will see the words Installationfinished and No Error Reported, indicating that the setting is successful. 6. restart the computer and you will be able to see the grub boot interface of Ubuntu. If not, go back to Step 1 to see if there are multiple partitions with Id 83. 7. Do not enter windows at this time. Enter Ubuntu in the terminal and enter:
sudo update-grub
After you restart your computer, you can access windows and Ubuntu normally. Then, the grub boot is fixed.
Modify the default startup items of grubThe student also asked to change the default startup Item back to windows... (This way, you can enter Ubuntu several times in a semester ...) Remember the number of windows startup items at startup. Enter Ubuntu and enter:
sudo gedit /boot/grub/grub.cfg
Change the value of 0 in set default = "0" to the number of lines in windows that you just saw to minus one. Save and exit. Restart.