Ubuntu9.10 and XP dual system, fix ubuntu9.10 boot

Source: Internet
Author: User

========================================================== ========================

This article is reprinted. You must ensure that this article is complete and the original author information and the link to this Article are fully retained.

E-mail:Khler@163.com

QQ: 23381103

MSN:Pragmac@hotmail.com

Original article: http://blog.sina.com.cn/s/blog_59929ec30100e9o4.html ###

Statement: Repost is only intended to spread knowledge, so that more people can enjoy the wisdom of the author!

For exampleIf you have any objection, please immediatelyContact me, I will

I am sorry to delete it immediately!

========================================================== ========================

 

Ubuntu9.10 is on the XP dual system. It was recruited by XP two days ago. After reinstalling XP, grub boot is lost and cannot be repaired from live-cd in the conventional way. I tried many methods and finally got it done, share it with you.

1) partition structure
   
 Ubuntu9.10 is mounted to the ext4 partition, sys is the NTFS partition, installed XP, app is the NTFS partition, and Bak is the FAT32 partition.

2) guided repair
   Download the latest grub4dos my under is a grub4dos-0.4.4-2009-06-20.zip
   Open the compressed file and put grldr and grldr in it. MBR, menu. the lst files are extracted to the root directory of the Windows system partition. For example, for my partition, the three files are extracted to the C root directory.
   Open the c: \ menu. LST file (it is best to open it with a UltraEdit-32, if you open with a text file, you can have a lot of square), add the following content:

Title ubuntu9.10
Root (hd0, 6)
Kernel/boot/vmlinuz-2.6.30-8-generic root = UUID = 28d5eac5-c42c-49ef-8537-0b280ff87de1 Ro quiet splash rootfstype = ext4 ACPI = off noapic nolacip
Initrd/boot/initrd. img-2.6.30-8-generic
Boot

Note: 1. The drive letter information followed by the root depends on the actual situation. In Linux, (hd0, 0) to (hd0, 3) are left to the primary partition. Taking My partition as an example, drive C (sys) is the primary partition of the entire hard disk, therefore, the ID is (hd0, 0), and there are no other primary partitions. Therefore, disk D (APP) is the first partition of the extended partition. The ID is (hd0, 4 ), the number of the edisk (BAK) is (hd0, 5), followed by the ext4 partition of ubuntu, whose number is (hd0, 6 ). The correspondence between these numbers and the above image is also very simple, because the name given to them under/dev starts from 1, so you just need to add 1 to the drive letter number of the above numbering method, for example, (hd0, 6) is/dev/sda7 (which will be used later ).

2. kernel and initrd
/Boot/vmlinuz-2.6.30-8-generic
/Boot/initrd. img-2.6.30-8-generic
These two files are started from livecd and started with the livecd hard disk. You only need to add the virtual optical drive to the ISO file of ubuntu, and then execute the top button of wubi in it, select Start from CD for me.

3. UUID
I have just started livecd. If it is the installation interface, click exit to enter the demo system. In addition to determining the path and name of the above two files, you also need to create something, UUID.

Sudo LS-Al/dev/Disk/by-UUID

In the previous method, you should have known Which partition your Ubuntu is installed in. In the demo system, open the menu under your drive C. modify vmlinuz and initrd. imgfile path and name, and modify the UUID. If it is an ext4 partition, add the rootfstype = ext4 parameter. Because the APIC in my notebook seems to be a little faulty, The ACPI = off noapic nolacip parameter should not be added to most people, so we do not need to add these three parameters.

Now, restart. Select grub in the operating system list and then ubuntu9.10. You should be able to access your Ubuntu if you don't have an accident. If you want to fix the problem caused by grub, perform the following operations:

Sudo upgrade-from-grub-Legacy

I have never tried this because I think Windows boot. the guidance of INI is quite good. If the development machine uses Ubuntu, it will be quite painful to use it. Besides, other people use Windows for development. If you use Ubuntu, it will be quite different, this may cause some problems.

In case of an accident .....

Study it for yourself !~~~

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.