Symptom: The
boot display: GRUB loading
error: unknow filesystem
grub rescue>
Reason:
The following operations have been found to cause this problem:
1. I want to delete ubuntu, so I directly delete/format the partition where ubuntu is located under windows.
2. Adjust the disk, use tools to merge/divide/adjust/delete partitions, so that the number of disk partitions has changed.
3. Reinstall the system and install linux to the new partition. The original partition has been formatted, but grub2 has not been reinstalled.
4. Use ubuntu backup tools/derivative manufacturing tools, etc., to restore the main partition to the old version of 8.X. As a result, the old version of grub is grub1, so grub2 is destroyed.
All in all, because the operator does not know that grub2 is divided into two parts, one part (in general) is written on mbr, and the other part is written in the /boot/grub directory of a certain partition (if /boot is partitioned separately, write directly In the /grub directory of the corresponding partition). Due to the above operations, the part in the mbr of grub2 cannot find the part in the /grub directory (or the part has been deleted).
Idea:
Method 1, delete grub2 completely, so that this prompt no longer appears: It is
suitable for people who no longer want to use ubuntu and want to switch back to windows.
This is very simple, as long as you have a Windows boot disk (not Ghost), use it to start, to select the installation location, do not need to actually install, just exit and restart.
Or use it to boot to the fault repair station, run fixboot or fixmbr.
Under the win7 command line, it is executed: BootRec.exe /fixmbr
(/Fixmbr to repair mbr, /FixBoot to repair boot sector, /ScanOs to detect installed win7, /RebuildBcd to rebuild bcd.)
Note: In the installation interface, use shift+F10 to enter the dos interface and enter the command.
Method 2, reinstall and repair grub2
1. First use the ls command to find which partition Ubuntu is installed on:
enter the following command under grub rescue>:
Code: ls
Will list all disk partition information, for example:
Quote: (hd0,1),(hd0,5),(hd0,3),(hd0,2)
2. Then call the following commands in turn: X means each partition number.
If there is no separate partition for /boot, use the following command:
Code: ls (hd0,X)/boot/grub
If /boot is partitioned separately, use the following command:
Code: ls (hd0,X)/grub
Under normal circumstances, hundreds of files will be listed. Many of the file extensions are .mod, .lst and .img, and one file is grub.cfg. Assuming that when (hd0,5) is found, the files in the folder are displayed, which means that Linux is installed in this partition.
4. If you find the correct grub directory, try to temporarily associate the two parts of grub as follows: The
following is the command for /boot without a separate partition:
Reference: grub rescue>set root=(hd0,5)
grub rescue>set prefix=(hd0,5)/boot/grub
grub rescue>insmod /boot/grub/normal.mod
The following is the command for a separate partition of /boot: (These sentences need to be verified)
Reference: grub rescue>set root=(hd0,5)
grub rescue>set prefix=(hd0,5)/grub
grub rescue>insmod /grub/normal.mod
Then call the following command to display the missing grub menu.
grub rescue>normal
But don’t be happy. If you restart at this time, the problem still exists, we need to enter Linux to repair grub.
Start up, after entering ubuntu, execute in the terminal:
Code: sudo update-grub
sudo grub-install /dev/sda
(Sda is your hard disk number, do not specify the partition number, for example, sda1, sda5, etc. are not correct)
Has the restart test restored the grub boot menu? Congratulations on your successful recovery!
5. If you can’t find the correct /grub directory, such as the third and fourth misoperations, try to find whether there are Linux core files, and then call the following commands in turn: X means each partition number:
grub rescue>, enter:
if /boot has no separate partition:
Code: ls (hd0,X)/boot
If /boot is partitioned separately, then:
Code: ls (hd0,X)
Find a file with a name similar to vmlinuz-3.0.0-12-generic. This is the linux core file. If found, write down the X value in (hd0,X). Suppose that when (hd0,5) is found, the files in the folder are displayed.
Then start with live cd or live usb, and enter the following commands in the ubuntu terminal of live cd (the “5” in sda5 must be changed to the value recorded above) (the two sentences need to be verified):
if there is no separate partition for /boot :
Code: sudo mount /dev/sda5 /mnt
sudo grub-install –boot-directory=/mnt/boot /dev/sda
If /boot is partitioned separately, then:
Code: sudo mount /dev/sda5 /mnt
sudo grub-install –boot-directory=/mnt /dev/sda
Then restart it.
(The above two commands can also solve the problem that grub is installed in the wrong location when ubuntu is installed, and grub is not installed to /dev/sda, which causes the problem of ubuntu startup items directly entering windows during startup, but you need to determine the “5 “Change to what number.)
6. If there is no linux core file, then reinstall it completely.
Read More:
- CentOS/RHEL 7: How to Reinstall GRUB2 from Rescue Mode (EFI)
- [Solved] Mount error: Mount: unknown filesystem type ‘defaults’
- [Solved] Linux virtual machine startup error: operating system not found
- [Solved] Internal error XFS_WANT_CORRUPTED_GOTO at line 1635 of file fs/xfs/libxfs/xfs_alloc.c.
- NVIDIA SMI error after Ubuntu 20.04 restart [How to Solve]
- [Solved] Ubuntu Error: PCIe Bus Error:severity=Corrected, type=Physical Layer, id=00e8(Receiver ID)
- Ubuntu Run Error: not syncing : VFS: Unable to mount root
- How to Solve Error: “Hdaudio hdaudioc0d2: unable to bind codec”
- [Solved] gawk: error while loading shared libraries: libreadline.so.4
- [Solved] C++: fatal error: Killed signal terminated program cc1plus
- How to Fix Linux sub process /usr/bin/dpkg returned an error code (1)
- [Solved] Log Error: kernel: blk_update_request: I/O error, dev fd0, sector 0
- [Solved] Virtual Machine Boot-up Error: failed to recover intents
- Prompt “entering emergency mode. Exit the shell to continue” if the Linux operating system does not start normally
- How to Solve Ubuntu “Failed to fetch” Error
- [Solved] sed -i error: sed: -e expression #1, char 44: invalid reference \1 on `s’ command’s RHS
- Linux changing password enter new UNIX password: passwd: authentication token manipulation error
- [Solved] ffmpeg Error: fatal error: zlib.h: Not having that file or directory
- linux Ubuntu Error: No command ‘setenv‘ found
- Disk Extended Error: WARNING: Re-reading the partition table failed with error 16: Device or resource busy.