How to restore LINUX boot

Source: Internet
Author: User
Article Title: how to restore LINUX boot. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Start with a linux installation disk. After boot =, enter linux rescue root =/dev/hd? <----- Related to which partition Linux is located

1. boot = enter linux rescue (I don't know where the linux partition is, so I have to perform this operation)

2. A series of keyboards and several simple configurations

3. The following characters are displayed:

"Your operating system is mounted in the/mnt/sysimage directory. Please exit the shell and your operating system will be restarted"

4.

Sh-2.05b #

Sh-2.05b # su-

The sh-2.05b # gurb-install/dev/hda

Sh-2.05b # reboot

Note:

1. If you have two hard disks, run gurb-install/dev/hda if Linux is mounted on the first disk; otherwise run gurb-install/dev/hdb, and so on. You can use the tab key to select a partition!

2. The configuration file of gurb is located in the/etc/gurb. conf file.

How to restore LINUX boot

When GRUB. EXE is used, GRUB. EXE is completely GRUB, but it is repackaged so that it can run in DOS. Therefore, GRUB. EXE has all the excellent features of GRUB that you are familiar with before. Currently, the latest version of grub_for_dos (V0.1.1) can be obtained from:

Ftp://ftp.cosoft.org.cn/incoming/grub_for_dos-0.1.1.tar.gz or go to the directory to view: ftp://ftp.cosoft.org.cn/incoming/

After decompression, copy the grub.exe file to the DOS hard disk partition (fat/fat32) or DOS floppy disk.

Usage:

Restart the computer and start it with a DOS boot disk. Go to the grub.exe.exe directory and execute grub.exe.

Tip: grub>

Example:

Grub> find/boot/vmlinuz; find/boot/vmlinuz

(Hd0, 7); run the result to inform/boot/vmlinuz of the position

Grub> root (hd0, 7)

Grub> kernel/boot/vmlinuz root =/dev/hda8; note that it is hda8, not hda7. Add 1

Grub> boot

After restarting, You can reinstall grub to mbr and use ntloader as the startup manager.

Use ntloader:

After entering Linux, run dd if =/dev/hda (X) of = path and file name bs = 512 count = 1

Note:

A. This command saves the Linux Startup sector as a file

B. (X) refers to the Boot partition installed in Linux (for example, Hda8 corresponds to Redhat)

C. The path and file name are the location and file name of the file to be stored.

Example:

A. dd if =/dev/hda8 of =/redhat. lnx bs = 512 count = 1

B. Copy the prepared file redhat. lnx to Windows C drive (Hda1)

C. Modify the boot. ini file on drive c to add the last two lines, for example:

[Boot loader]

Timeout = 15

Default = multi (0) disk (0) rdisk (0) partition (1) WINDOWS

[Operating systems]

Multi (0) disk (0) rdisk (0) partition (1) WINDOWS = "Microsoft Windows 2000 Professional"/fastdetect

Multi (0) disk (0) rdisk (0) partition (2) WINDOWS = "Windows XP Professional"/fastdetect

C: Redhat. lnx = "Redhat 9.0"

D. Restart and the menu will appear.

The advantage of this installation is that Linux and Windows do not interfere with each other, even if you want to reinstall Windows, it will not affect Linux, as long as you back up the two files (redhat. lnx and Magic. lnx), re-install the C disk, and then modify the boot according to the above method. ini.

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.