What are the ways to fix the grub boot menu
This article mainly explains "what are the methods to repair the grub boot menu". The explanation in this article is simple and clear, easy to learn and understand. Please follow the ideas of Xiaobian and go deep into it slowly to study and learn "what are the methods to repair the grub boot menu" together!
Several methods are basically similar:
1) Use LIVE CD to enter graphical interface and open terminal
Enter a command:
$sudo su
$grub
grub>boot (hdx,y)
grub>setup (hdx)
/* Here's an explanation: x stands for hard disk, if you only have one hard disk, usually is, then x is filled with 0 and y is the partition where your ubuntu system/root is located, if you don't know which partition */
/* You can use the Tab key instead, and then there will be a display, fill in the corresponding correct value. The value of x below is equal to the value of x above. */
2) Use livecd to start, enter desktop system, enter in terminal
grub update
Go to the grub command line and type
root (hd0,x)
setup (hd0)
hd0 refers to the first hard disk (regardless of serial SATA, parallel port PATA), x is the Linux home directory "/" partition number, the number starts from 0, 1 less than the partition number displayed in Linux. For example, linux shows that the hard disk partition number is hda5, where x is 4. Partition number can be used in the menu of the disk really do not know how much, try one by one, to grub prompt partition format ex2fs is generally. Note that root (hd0,x) must have a space after root. The root command specifies the boot partition, and the setup command writes boot information to the MBR.
3)
1. Start with Live CD
2. Open a terminal, run $sudo grub and you'll see a prompt like 'grub>'
3. Type find /boot/grub/stage1 at the prompt 'grub>' and you will get a run result, such as (hd0,5) on my machine (this command is actually to find the partition where/boot is located)
4. Run grub>root (hd0,5) (this is where you fill in the results of running on your machine)
5. Run grub>setup (hd0) and a few lines of text appear, ending with "... succeeded"Repair succeeded!
6. Run quit
8. Restart the computer and remove the live CD.
Thank you for reading, the above is "what are the methods to repair the grub boot menu" content, after the study of this article, I believe that we have a deeper understanding of the method to repair the grub boot menu, the specific use of the situation also needs to be verified by practice. Here is, Xiaobian will push more articles related to knowledge points for everyone, welcome to pay attention!