Share my experience in recovering ubuntu10.04 after I reinstall win7

Source: Internet
Author: User

My Ubuntu is installed on a hard disk. If Ubuntu is installed on wubi, see here. I am not proficient in Linux. I belong to cainiao. Just explain some commands according to my understanding. if it is wrong, I hope the experts will not be enlightened.

There are two steps to summarize the methods.

First: Find a way to enter the Ubuntu system // There Is A livecd method (not necessarily using a CD, or a USB flash disk). This method is used by me.

Second, reinstall and update grub.


1. Download The grub4dos file and decompress the three files to the installation directory of windows, such as drive C.

 

2. Restart grub4dos and enter the command below.


1. Switch to the Ubuntu partition.

Root (hd0 ,?) //? You need to enter the number by yourself. See the note below.

Note: grub is now in the partition you just decompressed by default, such as drive C. switch the directory to the partition where your Ubuntu is located, and try the partition on your own. hd0 indicates the first hard disk. Generally, it is a hard disk.

? I tried it myself, from (hd0, 1) to (hd0, 9 ). the current filetype will be displayed after each execution. If the prompt NTFS or fat is the directory in windows. if ext or something is prompted, it is probably ubuntu.

For example, when I try (hd0, 8), I will prompt "ext2fs". Then I will ls it and see the folder under my familiar ubuntu. That's it, so my? The number is 8.


2. Load the kernel

Kernel/boot/vmlinuz -??????? Root = UUID = ????????????????????? RO quiet splash //? Enter your own number, see the following annotations

Note: vmlinuz -???? In? It is very simple, that is, when you press the code to vmlinuz, press the tab key to automatically complete, and then follow ???? The version is automatically completed.

What should I do if I don't know the uuid? Run the uuid command before executing this command.

Important Note: In grub4dos, I cannot access the Internet to view the command. What should I do if I forget to do it? This is what I did. I didn't know which website I was looking. but later I thought about the code as if I had seen it. then I found it. It's in the middle, so you can follow grub directly. run the CFG command. The UUID information is also available.

CAT/boot/GRUB/grub. cfg // view the file

However, if you don't need to repeat the code in it, just let me know the above sentence. Then, the first one is not the kernel, but the Linux one. We will repeat the kernel, because I failed to try Linux.


3. Load initrd

Initrd/boot/initrd -?????? //? When you press the command to initrd, the tab key is automatically completed.


4. Start

boot

All right, it's almost done. You can see Ubuntu, and it's already started normally. But to retrieve the boot item, you don't need to start it through grub4dos every time.

5. Enter two simple codes in the Ubuntu terminal.

  sudo grub-install /dev/sda  sudo update-grub

3. Restart. After Entering windows, delete the three files copied to the Windows disk (this file can be deleted or not)

OK, all done!

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.