I am now installing the Windows 7+ubuntu 10.10 dual system. Today, I want to put a Mac on my bad PC, so I split two areas, and none of them are formatted. Use the Leopard hard drive installation tool to load the DMG image into the new partition (it should now be formatted as a hfs+ partition), install the macdrive, and then reboot the system.
And then, it's a tragedy.
Grub cannot boot into the system and appears on a large black screen:
Unkown filesystem
Grub Rescue>
OK, that's a tragedy: estimate that the partition activity of Windows just made grub miserable and grub entered the rescue mode. After that, the mobile phone Google a bit, found that "love-Jianghongyang" a blog written very well. Now turn it over.
My Linux has a grub rescue> after the partition is adjusted this means that the GRUB2 configuration file is broken, and the GRUB2 does not start properly due to zoning adjustments or partition UUID changes, and thus into the repair mode (Grub rescue) is also called rescue mode.
In rescue mode, only a few commands can be used: set, ls, insmod, root, prefix
(1) Set view environment variables, where you can view the boot path and partition. (2) LS viewing device (3) Insmod load module (4) root specifies the partition used to start the system, set the GRUB boot partition (5) in rescue mode prefix set the GRUB boot path
One, zoning chaos, I do not know where the boot directory in LS #查看一下设备状态 as shown:
Grub rescue> ls (HD0,MSDOS3) Error:bad filename. Hint: wrong filename, I found in the test must be followed by A/
Grub rescue> LS (HD0,MSDOS3)/./.. /lost+found/
Find a boot directory in (HD0,MSDOS1)/below by viewing
Two, set grub boot partition and path set root= (HD0,MSDOS1) #设置grub启动分区 set prefix= (HD0,MSDOS1)/boot/grub/#设置grub启动路径 See settings: Grub Rescue > Set prefix= (hd0,msdos1)/boot/grub root=hd0,msdos1
Third, load the basic module Insmod/boot/grub/normal.mod #加载基本模块
Four, into the normal mode #进入正常模式, the menu appears, if loading grub.cfg (wrong) may be a problem, press shift can appear menu, and then press C to enter the console into the normal mode will appear grub> such a prompt, There are a lot of commands to support here.
V. Guide system set root= (HD0,MSDOS1) #设置正常启动分区 linux/boot/vmlinuz .... ro text root=/dev/sda1 #加载内核, enter console mode Initrd/boot/init Rd .... #加载initrd. IMG Boot #引导
VI. Update GRUB Installation: GRUB-INSTALL/DEV/SDA update: Update-grub
Virtual machine Experiment: Through the above experience, I carried out the experiment in the virtual machine, deepen the consolidation. First, move the boot directory to another partition mv/boot//home/the Grub rescue> Rescue mode appears after this reboot. Second, manual START Process records ls (HD0,MSDOS6)/#找到了boot所在的分区 set root= (HD0,MSDOS6) #设置grub启动分区 set prefix= (HD0,MSDOS6)/boot/grub/#设置grub启 Dynamic path Insmod/boot/grub/normal.mod #加载基本的模块 normal #从救援模式进入正常模式
Set root= (HD0,MSDOS6) #设置系统启动分区, which points to the partition where the kernel resides linux/boot/vmlinuz-2.6.35-22-generic ro text root=/dev/sda1 #加载内核 initrd/ Boot/initr. #加载initrd. IMG Boot #启动
The test starts normally and the logon dialog box appears.
Dual system, Win7 next key ghost, get into grub rescue solution
I installed the win7+ubuntu10.10, the hard drive directly installed. Because Win7 installed a few large software, so decided to a key ghost backup, the results after the restart, entered the Grub Rescue interface:
Error:unknown filesystem
Grub Rescue>
Studied for half a day before solving the problem. Let's talk about what's going on.
When installing Ubuntu, boot is started with GRUB2. My win7 is in C, the Ubuntu space is separated from D disk. We know that every time the system starts, it goes into grub, which is the first choice to enter the system in the Ubuntu startup directory, if by partition, GRUB2 (HD0,MSDOS7) is the partition where my Ubuntu resides. Then the root should be at boot (HD0,MSDOS7), a key ghost will be modified to boot, it changes the root (HD0,MSDOS9), this is a Windows partition, that is, NTFS partition, Ubuntu is not recognized this file system, So there is a error:unknown filesystem, this situation can not start naturally, then GRUB2 will start Grub Rescue mode, is the repair mode. So all we have to do is point grub back (HD0,MSDOS7).
The following are the specific steps:
① View Partitions
Because everyone's partitions are different, so we want to view the partitions, using the LS command
Grub Rescue>ls
When you enter, you will appear
(hd0) (HD0,MSDOS9) (HD0,MSDOS8) (HD0,MSDOS7) (HD0,MSDOS6) (HD0,MSDOS5) (HD0,MSDOS1)
Grub Rescue>
Note: I use GRUB2, for grub users, no MSDOS before partition
The above is my partition, everyone's different.
Grub Rescue>set Carriage Return
prefix= (HD0,MSDOS9)/boot/grub
Root=hd0,msdos9
It can be seen from above that my system is now starting from (HD0,MSDOS9).
So how do you know which partition Ubuntu is in? Enter the second step
② Find ubuntu partition
This step we want to try one by one,
or using the LS command
Let's try it in (HD0,MSDOS8)
Grub Rescue>ls (HD0,MSDOS8)
Return will find, no, or unknown filesystem
Come on, then.
。。。。。。。。。
When I try to
(HD0,MSDOS7), you can see a lot more words, these are my Ubuntu Home folder folder and file name. OK, we found the partition.
③ Modify boot partition
Grub rescue>root= (HD0,MSDOS7)
Grub Rescue>prefix=/boot/grub//grub Path settings
Grub Rescue>set root= (HD0,MSDOS7)
Grub Rescue>set prefix= (HD0,MSDOS7)/boot/grub
Grub Rescue>insmod Normal/start normal start
Grub Rescue>normal
In turn, typing the above instructions, see the familiar boot menu. After selecting Win7, a key Ghost will start to back up the system. Don't be so happy, it hasn't even started yet. If you do not enter grub rescue because of a key Ghost problem, you can skip to step ⑤
④ again.
When you wait for a key ghost backup system, reboot, you find
Error:unknown filesystem
Grub Rescue>
Don't worry, just go through the first three steps again.
⑤ into the command line to start Ubuntu
After entering the system startup options interface, you find that either the point or the entry is not going to go through because you haven't really modified grub, this is going to be modified in Ubuntu
After entering the system boot interface, press C to enter command line mode
Grub >set Root=hd0,msdos7
Grub >set prefix= (HD0,MSDOS7)/boot/grub
Grub >LINUX/VMLINUZ-XXX-XXX ROOT=/DEV/SDA7//inside of XXXX can press the TAB key, if there is an ACPI problem, add a sentence at the end Acpi=off
Grub >INITRD/INITRD.IMG-XXX-XXX
Grub >boot
Ubuntu is starting up normally.
⑥ into ubuntu fix Grub
It's going to be high.
After entering Ubuntu, fix grub
Running in the terminal.
sudo update-grub
Rebuilding grub to first hard disk MBR
sudo grub-install/dev/sda
All right, reboot, all done.
Thanks to Jianghongyang's solution.