Grub boot u disk boot Windows and Linux dual Systems

Source: Internet
Author: User

The specific actions are as follows:

1. Prepare a U disk, do not need to be too big (of course, the capacity of the big point is no problem, the rest of the space can continue to use), the contents of the first back up;
2. Use the HP USB drive format tool to make this USB disk as a MS DOS boot disk;

-Format and create MS-DOS boot u disk
3. Create a new folder in the U disk boot, download grub4dos, will download the grub4dos after decompression all put into the boot folder, while the folder name to GRUB (short good remember to use), at this time Grub.exe path for U disk: Bootgrubgru B.exe;
4. Edit the U disk by using a text editor (such as Notepad): Bootgrubmenu.lst The file (probably the 10th line) (The following is a comment after the # number)

The code is as follows Copy Code

Title Find and load NTLDR of Windows nt/2k/xp
Fallback 1
Find–set-root–ignore-floppies/ntldr
Chainloader/ntldr
savedefault–wait=2

Title Find and load BOOTMGR of Windows VISTA
Fallback 2
Find–set-root–ignore-floppies/bootmgr
Chainloader/bootmgr
savedefault–wait=2

Amended to

The code is as follows Copy Code

Title Windows 7 # Windows 7 Startup Items
Fallback 1
Find–set-root–ignore-floppies/ntldr
Chainloader/ntldr
savedefault–wait=2

Title OpenSUSE 2.6.37.6-0.5 Desktop # OpenSUSE boot entry, 2.6.37.6-0.5 is the kernel version number
Fallback 2
Root (hd1,5) # specify root position
# This is the hard drive number that Grub uses, written in accordance with the GRUB rules
# (hd1,5) is the Linux root partition
# that is, e disk under Windows (my machine has only C D 2 disks under Windows, and Linux root is located in the original e-disk location)
# If your position is different, it's not the same here.
Kernel/boot/vmlinuz-2.6.37.6-0.5-desktop # If the kernel is upgraded or is not OpenSUSE 11.4, the version number may need to change accordingly
Initrd/boot/initrd-2.6.37.6-0.5-desktop # ditto
Boot
savedefault–wait=2

and save it.

5. For convenience, create a batch file in the root directory of U disk to start grub. Create a text file in the root directory of the U disk and write the following command:

@echo on
C:bootgrubgrub.exe
The text file is then renamed Grub.bat (Note that the suffix is changed) (the letter is C because the disk is the use of U-boot after booting the U disk is a C disk, which is used above (hd1,5) reasons).

6. You can now use a U disk to start OpenSUSE or Windows 7 (by the way), U disk startup after the input grub.bat and return to see the boot menu.
It should be noted that every time you upgrade the Linux kernel, you need to modify the version number in the Menu.lst

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.