GRUB entry and tips: Install GRUB in MBR through Windows XP and use the Chinese menu!

Source: Internet
Author: User
Link: http://blog.csdn.net/zhangyan1981/archive/2006/12/13/1440396.aspx

I. Introduction:

1. What is GRUB?

GRUB is the boot loader-it is responsible for loading the kernel and guiding the Linux system. GRUB can also boot other operating systems, such as FreeBSD, NetBSD, OpenBSD, gnu hurd and DOS, as well as Windows 95, 98, NT, and 2000. Although booting an operating system seems to be an ordinary and trivial task, it is actually very important. If the boot loader does not work well or is not flexible, it is possible to lock the system and fail to boot the computer. In addition, a good boot loader gives you flexibility, allowing you to install multiple operating systems on your computer without having to deal with unnecessary troubles.

2. GRUB is great.

Fortunately, GRUB is a great boot loader. It has many features that can make the boot process very reliable. For example, it can directly read the Linux kernel from the FAT, minix, FFS, ext2, or ReiserFS partitions. This means that it can always find the kernel. In addition, GRUB has a special interactive console that allows you to manually mount the kernel and select boot partitions. This function is Priceless: assuming that the GRUB menu configuration is incorrect, the system can still be guided. Oh, right -- GRUB has a color boot menu. We just started.

3. Why is GRUB used?
You may wonder why GRUB is needed all over the world-after all, the Linux World has been using the LILO Boot Loader for a long time, and it allows millions of Linux users to boot the system. Yes, it does. LILO is very effective. However, LILO has a high repair rate and is not flexible. Instead of spending a lot of time describing the advantages of GRUB, it is better to demonstrate how to create your own GRUB boot disk and how to use it to guide the system. Then, I will explain some of GRUB's "cool" technical details and guide you through installing GRUB to MBR (Master Boot Record, to make it the default boot loader.
If you are a little timid, do not be afraid. You can create a GRUB boot disk and try to use GRUB instead of messing up the existing boot loader. Alternatively, you can use its secure "resident" method to familiarize yourself with GRUB. So, let's start now.

 

Ii. Basic knowledge of GRUB

The composition of GRUB, the main program file is generally in the root directory of the first partition: Grldr, and then the font is generally in (hd0, 0)/boot/grub/fonts, configuration file: the following uses Climbing as an example: (hd0, 0)/boot/grub/menu. lst

Generally, GRUB is installed through Linux, but can it be installed under existing XP conditions? The answer is yes. Because my laptop does not have an optical drive, I used Partition Magic to re-install the system and divided it into two primary partitions. (FDISK cannot be used, but XP can be used for disk management ).

The first primary partition is a 50 m DOS partition (hd0, 0), the second extended partition is a data disk (17 GB), and the third primary partition is an XP partition (hd0, 2) (23 GB), ready to use GRUB for dual startup. If GRUB is not installed, it can be started on both sides. However, in the FDISK of DOS, select 2 set active partition to activate the partition. In XP, use diskmgmt. msc disk management, right-click the DOS partition, and select "mark the disk partition as active ".

Why do I use a single primary partition for DOS installation? When you use GHOST to back up and restore the XP partition, you cannot use the XP partition to start it.

  Other partition knowledge:Open the disk management of XP and check the disk image. The first partition is (hd0, 0), the second partition is (hd0, 1), and the third partition is (hd0, 2 ), the author's note is as follows: (in xp)

(Hd0, 0)

(Hd0, 1)

(Hd0, 2)

F disk dossystem fat

D Data disk NTFS

Edisk ghost backup FAT32

Drive c xp FAT32

If it is started as DOS, the NTFS area will not be seen, but only

C :( DOS), D :( GHOST), E :( XP system) three Disks

 

3. Use GRUB (if you do not have two primary partitions, you only need to refer to 2 without any modification ):

1. Install WinGRUB. This tool allows you to configure GRUB in a Windows environment,

Home: http://grub4dos.sourceforge.net/

  After installation:Grub for Dos Files will be installed in "Program Files/wingrub". We need not these Files, but WinGrub itself can be mounted to MBR through the graphic interface, in this way, you can directly start Grub without starting XP or DOS! In this way, Grub can be used to start DOS no matter what the XP virus looks like or even the NTLDR is damaged.

2. Install grub of Climbing version. grub files of this version support Chinese fonts. (How do you use two primary partitions? XP is the first partition and no improvement is required)

Http://nufans.net/software/tools/grub_climbing_v7.exe

  After installation:Add Grub to the Boot. ini file of the c drive XP, and install the file in C:/boot/grub. Copy the Startup File GRLDR to c :/

  Improvement: 1)Since the author installed XP in the third partition (hd0, 2), grub will automatically load (hd0, 0) files at startup, therefore, copy the GRLDR in the root directory to the f disk in the DOS partition,

     2)And copy all the BOOT directories in the C: disk to the f disk.

     3)Since we started the MBR, we deleted the C:/grldr line in c:/boot. ini.

3. Modify the Menu. lst file: (depends on the partition)

If you want to start both systems, change F:/boot/grub/menu. lst:

# Default latency (seconds)
Timeout 30

# The first item is the default value.
Default 0

# Set Font files supported by Chinese Characters
Fontfile (hd0, 0)/boot/grub/fonts

# Setting a graphic Background File
Splashimage (hd0, 0)/boot/grub/bj2008.xpm.gz

Title entry Dos 7.10

# Set the start Partition
Root (hd0, 0)

# Set as active
Makeactive

# Loading the Boot Sector
Chainloader + 1

# Same as above
Title: Enter Windows Xp

Root (hd0, 2)
Makeactive
Chainloader + 1

 

4. Configure WinGrub and mount Grub into MBR,

After the instance is started, select "tools"-> "Install Grub"-> select "Boot From MBR", and select "Partition" (hd0, 0)-> "Install ".

In this way, the Grub program of Climbing can be mounted through WinGrub.

 

5. Finally, restart your machine and you will find a beautiful selection interface on your machine before starting any system!

 

Some technical documents and downloads:

Grub for DOS

Http://grub.linuxeden.com/wakka.php? Wakka = % CA % D7 % D2 % B3

Related Article

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.