Coexistence of Linux and RescueandRecovery

Source: Internet
Author: User
Let Linux and RescueandRecovery coexist-general Linux technology-Linux technology and application information. The following is a detailed description. My laptop is thinkpad X60, very light and thin, no optical drive. I bought a GB hard drive some time ago and installed it myself. A minor fault occurred while installing windows. After the installation is completed, gentoo (a release version of linux) will be installed. The installation method is quite special. Some code is downloaded and compiled by yourself online. The specific process is skipped, "grub" is installed at the end. It is a boot program. After configuration, the system selection menu will appear at startup. The manual is based on the IDE hard disk. I use the SATA hard disk. It's almost succeeded, and it's not too early. At half past one in the evening, I have to go to work the next day. I just want to finish loading and shut down and go to bed! I copied the commands in the manual and ran them. Then I couldn't wait to shut down. After turning it off, I couldn't help but want to see if the installation was successful. Press power and go directly to windows. Try again. thinkpad's unique rescue and recovery are still running.

Long night dreams and long days. Suddenly, after installing linux, Rescue and Recovery will be suspended. grub is not installed successfully this time. Instead, you can use Rescue and Recovery. If two of them can coexist, that would be nice! After all, I have no optical drive and it is quite troublesome to install windows. Besides, R & R is something that IBM is proud of. It is very convenient and powerful to use, it's a pity that you just got down!

After discussing with colleagues, I checked some information and found a great way to guide linux without damaging R & R!

Introduction:
Rescue and Recovery is a Recovery and Recovery system unique to thinkpad. This feature is based on Windows. When the system is started, press the blue "ThinkVantage" button on the notebook to interrupt the normal startup of windows and enter the rescue recovery system.

The Master Boot Record (MBR) is called the "Master Boot Record" in Chinese and is located in the first physical sector of the hard disk. Some people also call MBR "primary Boot Sector", but I think this statement is not accurate. MBR is the first 446 bytes of the primary Boot Sector, and the next 64 bytes are the partition information of the hard disk, the last two bytes indicate the end of the partition. The entire 512 bytes is the primary Boot Sector. When the computer is started, it first enters the BIOS. After the BIOS is run, it jumps to the MBR. MBR does not belong to any operating system. It is transferred to the memory before all operating systems, and then the control is handed over to the operating system based on the user's choice.

Grub is one of the commonly used multi-system boot programs (the other is lilo, which has never been seen before ). The common method is to allow grub to overwrite MBR so that you can enter the system selection menu at startup.

The problem is that after LILO or GRUB is rewritten to MBR, the "ThinkVantage" button cannot be captured, and the Rescue & Recovery will not be available. So how can we solve this problem?

The idea is as follows: Disable grub from rewriting MBR, and plug grub into windows bootloader.

In other words, my local file is X60, the linux boot partition is/dev/sda8, and the windows system disk is C. Some changes may be required in different situations.

The method is as follows:
1. Do not allow grub to be written to MBR, but include it with other partitions, such as the boot partition.
# Grub-install -- no-floppy/dev/sda8

2. dump the first 512 bytes of the partition.
# Dd if =/dev/sda8 of = gentoo_grub.bin bs = 512 count = 1

3. Get the generated gentoo_grub.bin to the c root directory by any means.

4. Change boot. ini under the C-drive root directory.
My changes are as follows:
[Boot loader]
Timeout = 30
Default = c: \ gentoo_grub.bin
[Operating systems]
C: \ gentoo_grub.bin = "Gentoo Grub Bootloader"
Multi (0) disk (0) rdisk (0) partition (1) \ WINDOWS = "Microsoft Windows XP Professional"/fastdetect

Okay! Now you can restart your computer. You will find that Rescue and Recovery can be used. If you do not press ThinkVantage, a selection menu will appear to go to gentoo or windows. If gentoo is selected, the information in grub is entered, because your/boot/grub. conf is different. If you do not set the residence time of the grub menu to 0, you will see another menu. In this menu, you can even return to the previous one, the grub settings are beyond the scope of this article!

This article is inspired by my colleagues and draws on a lot of information on the Internet, especially thinkwiki. The motivation for writing down the article is: I have not found any Chinese articles, and I hope they will help you.

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.