Ubuntu uses livecd to fix grub2

Source: Internet
Author: User
Ubuntu uses livecd to fix grub2 first starts with livecd, and then switches to the root permission under the terminal: (If you are not too troublesome, skip this step and add sudo before each step) www.2cto. comsudo-I Next, find the partition where your ubuntu10.04 is located, and use: fdisk... ubuntu uses livecd to fix grub2 first starts with livecd, and then switches to the root permission under the terminal: (skip this step if you are not bothered, and add sudo before each step) www.2cto.com sudo-I. Next, find the partition where your ubuntu10.04 is located and use: fdisk-l to output the following parts: device Boot Start End Blocks Id System/dev/sda1 1 914 7341673 + 12 Compaq diagnostics/dev/sda2 * 915 4967 32554359 7 HPFS/NT FS/dev/sda3 4968 8006 24410767 + 83 Linux/dev/sda4 8007 19457 91980126 + 5 Extended/dev/sda5 8007 14085 48829536 83 Linux/dev/sda6 14086 14328 1951866 82 Linux swap /Solaris/dev/sda7 14329 14344 128488 + 83 Linux/dev/sda8 18485 19457 7815591 B W95 FAT32/dev/sda9 14345 18308 31839232 83 Linux/dev/sda10 18308 18484 82 Linux swap/Solaris has a lot of content, because I am a 3 system --!, The partition where my ubuntu10.04 root directory is located is/dev/sda9. if you are not sure, find the id 83. Mount the root directory of the original system under www.2cto.com: mount/dev/sda9/mnt mount/dev/sda9 to/mnt. of course, you can choose other places, note that if you have a separate/boot partition, you need to mount the/boot file once separately. for example, if your original/boot file is mounted to/dev/sda12, enter mount/dev/sda12/mnt/boot. I didn't separate it here, so I don't need it anymore. Www.2cto.com is the last step: grub-install -- root-directory =/mnt/dev/sda here I wrote grub-install-root-directory =/mnt/dev/sda9 as my own claim at the beginning, do not learn from me ,--! If you see Installation finished. No Error Reported. it indicates that it has been successful! Restart and check if the familiar grub boot screen is back again? Finally, I liked the powerful man. the first time I fixed grub, it was basically solved by man.

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.