Lgrub error:cannot mount selected partition Linux startup error Resolution

Source: Internet
Author: User

The above error is that the partition table has been overwritten and the original Linux boot partition code has changed, so the Grub boot error. There are many ways to solve this problem:
1. The fastest and simplest
after selecting Unbuntu in the Boot menu, do not enter, press E to enter edit Grub mode. Modify the Y value of root (hd0,y) (hd0 table The first hard disk, Y table hard disk partition number).
such as: Change the original root (hd0,7) to (hd0,8). Then Ann restarts, if you can enter the system is correct, if the same error, then repeat the above steps to modify (Hd0,y) for other values, try to succeed.
after successfully logging in to Linux, you also need to modify menu.lst to achieve a once-once effect. Open Terminal:
sudo vi/boot/grub/menu.lst
if Root (hd0,7) is modified to the correct value (hd0,y), the root=/dev/sda8 of the kernel line is also modified to the correct value y+1 (sda8 corresponds to hd0,7). Examples are as follows:

Title Ubuntu, kernel 2.6.17-10-generic
Root (hd0,8)
Kernel/boot/vmlinuz-2.6.17-10-generic root=/dev/sda9 ro Quiet Splash LOCALE=ZH_CN
Initrd/boot/initrd.img-2.6.17-10-generic
Quiet
Savedefault
Boot

2. If you have LiveCD (Ubuntu destop CD) on hand, you can start Linux with LiveCD and then modify the grub configuration and menu.lst.

$sudo Grub into Grub
Find/boot/grub/stage1 prompt for the correct boot position, e.g. (hd0,8)
Root (Hdx,y)
Setup (HdX)
Quit

Note: The X, y is the system prompt after executing the find/boot/grub/stage1 command. or perform $sudo fdisk-l to determine the correct boot area code based on each partition display information.
Then modify the Menu.lst, first you have to mount the boot partition. Such as:

$sudo Mount/dev/sda9/media
$CD/media
$sudo vi boot/grub/menu.lst modified.

Restart OK.
3. If everything under boot is damaged, it will be a bit of a hassle:

$sudo grep-v rootfs/proc/mounts >sudo tee/etc/mtab Generation/etc/mtab
$grub-install--no-floppy/dev/hda installing grub to MBR

and build Menu.lst.


This article is from the "Liu Rate" blog, please be sure to keep this source http://liushuai.blog.51cto.com/3038219/1827730

Lgrub error:cannot mount selected partition Linux startup error Resolution

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.