Ubuntu-Ubuntu manual configuration guided by XP

Source: Internet
Author: User

Last night, I tried to install Ubuntu 8.04 in my notebook to wait for ding to wake up.

Because I have already tried to dress (unbuntu hard drive installation), everything is just a breeze. This time, we hope to launch a charge to the unsolved problem: Use the XP boot program to guide ubuntu.

According to the old rules, grub is not written to MBR during installation. First, UBUNTU will sleep in the system, and then configure Windows XP to guide ubuntu.

After some exploration, we found that there should be two methods in theory:

Method 1: use XP to directly guide Ubuntu, that is, the Ubuntu boot file (sector?) is configured in Boot. ini ?), I have not succeeded in this method.

Method 2: The experiment is successful, but it is not really XP guidance, because grub is used in essence. That is, XP directs grub, and then grub directs ubuntu.

My boot. INI is as follows:

[Boot loader]
Timeout = 10
Default = multi (0) disk (0) RDISK (0) Partition (1) \ WINDOWS
[Operating systems]
Multi (0) disk (0) RDISK (0) Partition (1) \ Windows = "Microsoft Windows XP Professional"/noexecute = optin/fastdetect
C: \ grldr = Ubuntu

Grldris copied to the C root directory at installation time. The copied files include initrd.gz and menu. lst. The menu. lst is as follows:

1 default 0
2 timeout 0
3
4 title Ubuntu
5 kernel (hd0, 6)/boot/vmlinuz-2.6.24-16-generic root =/dev/sda7 Ro quiet splash
6 initrd (hd0, 6)/boot/initrd. img-2.6.24-16-generic
7 boot
8
9 Title Windows XP
10 rootnoverify (hd0, 0)
11 makeactive
12 chainloader + 1

Among them, Lines 9-12 only allow grub to re-boot XP. What really matters is that lines 4-7 and timeout is set to 0 to skip grub selection. This is equivalent to abolishing the option of re-booting to XP.

The first thing to note is the name and location of the kernel file. The two files in the/boot directory are later displayed in the system. You can also use the default link: /vmlinuz and/initrd. IMG, these two links always point to the updated kernel, so that even if the kernel changes, there will be no problem.

Next, you must point to the correct disk partition. Here (hd0, 6) is Because ubuntu is installed after the XP partition on my machine. My partition is as follows:

XP primary partition (NTFs) | XP logical partition 1 | XP logical partition 2 | Ubuntu partition.

Two logical partitions are in one extended partition. Without looking at the relevant documents carefully, my inference is: the primary partition is (hd0, 0), the extended partition is (hd0, 1), because MBR can put four partitions in total, therefore (hd0, 2) and (hd0, 3) are reserved for them. The following rows are displayed: (hd0, 4) indicates logical partition 1, (hd0, 5) indicates logical partition 2, and Ubuntu partition is (hd0, 6.

Because it is a SATA hard disk, the partition is identified as/dev/SDA * by Ubuntu, and * number starts from 1. The natural Ubuntu partition is/dev/sda7.

The above grub Partition Number and Ubuntu partition ID are just my assumption and must be authenticated by authority.

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.