How to fix ubuntugrubrescue

Source: Internet
Author: User
Ubuntugrubrescue repair methods symptoms: boot Display: GRUBloadingerror: unknowfilesystemgrubrescue & gt; cause: the following operations have been found to cause this problem: 1. if you want to delete ubuntu, directly... ubuntu grub rescue solution symptoms: GRUB loading error: unknow filesystem grub rescue> cause: the following operations have been found to cause this problem: 1. you want to delete ubuntu, therefore, the partition where ubuntu is located is directly deleted/formatted in windows. 2. adjust the disk and use tools to merge, split, adjust, and delete partitions to change the number of disk partitions. 3. reinstall the system and install linux to a new partition. The original partition has been formatted, but grub2 has not been re-installed. 4. use the ubuntu backup tool/derivative version manufacturing tool to restore the primary partition to the old version of 8. X. As a result, grub of the old version is grub1, and grub2 is destroyed. Generally, the operator does not know that grub2 is divided into two parts, one part (generally) written on mbr, the other part is written in the/boot/grub directory of a partition (if/boot is separately partitioned, it is directly written in the/grub Directory of the corresponding partition. As a result, the part in the mbr of grub2 cannot find the part in the/grub Directory (or the part has been deleted ). Method 1: permanently delete grub2 so that this prompt does not appear: applicable to people who do not want to use ubuntu any more and want to switch back to windows. This is very simple, as long as you have a Windows boot disk (not a Ghost), use it to start, to select the installation location, do not actually install, exit and restart it. You can also use it to start to the fault recovery platform and run fixboot or fixmbr. Run BootRec.exe/fixmbr (/fixmbr to repair mbr,/FixBoot to repair startup sector,/ScanOs to detect installed win7,/RebuildBcd to reconstruct bcd .) Method 2: reinstall and fix grub2. run the ls command to find the partition where Ubuntu is installed: Enter the following command under grub rescue>: ls will list all disk partition information, for example: (hd0, 1 ), (hd0, 5), (hd0, 3), (hd0, 2) 2. then, call the following command in sequence: X indicates the number of each partition. if/boot does not have a separate partition, run the following command: ls (hd0, X)/boot/grub if/boot is partitioned separately, run the following command: ls (hd0, X)/grub. under normal circumstances, hundreds of files are listed, and the extension of many files is. mod and. lst and. img, there is also a file grub. cfg. If the file in the folder is displayed (hd0, 5), it indicates that Linux is installed in this partition. 3. if the correct grub directory is found, try to temporarily associate the two parts of grub as follows: grub rescue> set root = (hd0, 5) grub rescue> set prefix = (hd0, 5)/boot/grubgrub rescue> insmod/boot/grub/normal. mod command for separate partitioning of/boot: (these statements need to be verified) reference: grub rescue> set root = (hd0, 5) grub rescue> set prefix = (hd0, 5) /grubgrub rescue> insmod/grub/normal. mod then calls the following command to display the lost grub menu. Grub rescue> normal, but don't be happy. if the problem persists at this time, we need to go to Linux and fix grub. Start Up. after entering ubuntu, run the following code on the terminal: sudo update-grub sudo grub-install/dev/sda (sda is your hard disk number. do not specify the partition number, for example, sda1 or sda5 are incorrect.) have you restored the grub startup menu after the restart test? Congratulations! recovery successful! 4. if the correct/grub directory cannot be found, for example, 3rd or 4 misoperations, try to find whether the linux core file exists. Then, call the following command in sequence: X indicates the number of each partition: grub rescue>, input: if/boot is not separately partitioned: ls (hd0, X)/boot if/boot is separately partitioned, then: ls (hd0, X) find a file named like a vmlinuz-3.0.0-12-generic, which is the linux core file, if found, write down the value of X in (hd0, X. Assume that the files in the folder are displayed when (hd0, 5) is found. Start with live cd or live usb, and input the following commands in sequence on the ubuntu terminal of live cd ("5" in sda5 must be changed to the value recorded above) (These two statements need to be verified): if/boot does not have a separate partition: sudo mount/dev/sda5/mntsudo grub-install -- boot-directory =/mnt/boot/dev/sda if/boot is separately partitioned, then: sudo mount/dev/sda5/mntsudo grub-install -- boot-directory =/mnt/dev/sda and restart. (The above two commands can also solve the problem of incorrect grub installation location during ubuntu installation, and the grub is not installed in/dev/sda, which causes the ubuntu startup item to directly enter windows during startup, however, you need to determine the number of "5" in sda5 .) 5. if you do not have any linux core files, reinstall them.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.