Use Bootmgr to boot Ubuntu (non-wubi installation)

Source: Internet
Author: User
Tags wubi
Now, I like to play with Ubuntu. I started my computer early this morning and boarded Baidu. I saw someone asking me questions about Windows and Ubuntu dual systems. I have not been playing Ubuntu for a long time. I have been playing Ubuntu for more than a year. On July 6, last November, the laptop system broke down once, And the F11 system crashed during restoration. It was restored every time it was started, and the restoration was unsuccessful. It was restarted soon ...... No way. I took the huipu gold medal and reinstalled the system. At that time, the partition table on the hard disk crashed and formatted the entire hard disk. I had a lot of things in it and lost them all.

Now, I like to play with Ubuntu. I started my computer early this morning and boarded Baidu. I saw someone asking me questions about Windows and Ubuntu dual systems. I have not been playing Ubuntu for a long time. I have been playing Ubuntu for more than a year. On July 6, last November, the laptop system broke down once, And the F11 system crashed during restoration. It was restored every time it was started, and the restoration was unsuccessful. It was restarted soon ...... No way. I took the huipu gold medal and reinstalled the system. At that time, the partition table on the hard disk crashed and formatted the entire hard disk. I lost a lot of things in it ......

At that time, I didn't know anything about the reinstallation system, I didn't think about those problems, I Don't Know How troublesome it is to guide an operating system, and I wrote the boot program in MBR and DBR (PBR, it is not in the format of a file that is invisible to the operating system. After that, I realized that it was very important to understand the operating system installation. So I downloaded a lot of operating system CDs on the Internet to contact me for installation, microsoft's original, modified, and Ghost versions have been used a lot. I accidentally saw Ubuntu on the internet, saying that the system is quite good and can be installed on a USB flash drive. This is a preliminary contact with Ubuntu. Later, my classmates in the same dormitory canceled the F11 restoration. As a result, like me, the partition table was damaged and I couldn't find the hard disk when I used the PE disc, if you want to use Ghost to install the system, the result will not work. Later, I used my Ubuntu USB flash drive to successfully start his computer and identify his hard disk. So I copied the Ghost to his hard disk through the USB flash drive on Ubuntu, A Dos toolbox containing Ghost is installed. Start Ghost in DOS and install a Ghost version of Windows XP. That incident made me think Ubuntu is really awesome! I became more interested in Ubuntu. Later I learned something about Ubuntu. It will release a new version every six months. When the new version comes out, I will download it quickly, from Ubuntu 9.10 to Ubuntu 10.10.

I used Ubuntu to make many of my USB flash drives into Boot disks. I have a lot of USB flash drives, but none of them can be used ......

A lot of USB flash drives support multiple boot modes. I think it is too wasteful to make a single system in a USB flash drive. With so many Bootstrap programs, I still think Bootmgr is the best, so I am used to guiding all systems with Bootmgr. Bootmgr was originally used to boot Vista and Windows 7, which can be guided on hard disks and CDs, and is very convenient to use. The bcdedit Command provided by Microsoft is very useful! If you want to use it to guide Windows XP and Ubuntu, it will fail. Windows XP boot on hard disks and optical disks is different. It is useless to directly copy the disc to the USB flash disk. If you want to put the disc in the USB flash disk, but you have never succeeded, you can only use the modified version, the original version does not work at all. I have always hoped to achieve the goal with the smallest changes. I don't like to use things that have been modified by others, but I don't know much about them. In addition, everyone's habits are very different, it may be redundant and cumbersome for me! Don't use others. Do it yourself! The Bootmgr Boot Windows xp cd does not seem to work, but Boot Windows XP has been installed, but it is too difficult to install Microsoft's system on a USB removable storage device, you can only use PE to load the Wim image to the memory.

Bootmgr guided Ubuntu for a long time, starting with Ubuntu Live USB. Previous versions of Ubuntu are easy to succeed. I don't know what's going on with Ubuntu 10.10. I just tried it several times, but later I got it done. In fact, the methods used are the same. It is probably a omnipotent method, but success is about probability. Create a Ubuntu Live USB with the boot program syslinux (isolinux is used for Live CD). Use bootice to extract the DBR (PBR) of the USB disk partition and name it syslinux. pbr is stored in the root directory of the USB flash drive, www.6688.cc, and then decompress the PE disc of Windows 7 to the root directory of the USB flash drive, and write the Bootmgr boot program into the MBR. Run the command "Bootsect/nt60 X: /force/mbr ", and then use the bcdedit command:


Bcdedit/store X: \ boot \ bcd/create {45c374b2-8460-11df-8950-0024814b7667}/d "Ubuntu"/application bootsector
Bcdedit/store X: \ boot \ bcd/set {45c374b2-8460-11df-8950-0024814b7667} device boot
Bcdedit/store X: \ boot \ bcd/set {45c374b2-8460-11df-8950-0024814b7667} path \ syslinux. pbr
Bcdedit/store X: \ boot \ bcd/displayorder {45c374b2-8460-11df-8950-0024814b7667}/addfirst

In this way, the Ubuntu boot item is added and displayed at the top of the menu.

In this way, Ubuntu Live USB is too slow to start. You must choose to use it each time. It is inferior to the installed Ubuntu, And the casper-rw file setting is usually not too large, this imposes restrictions on software installation, so we hope to install a Ubuntu system. We are used to placing PE and Ubuntu in Windows 7 on a USB flash disk. On the hard disk, Ubuntu has been installed and used in wubi, and has been used in virtual machines. It is the most used in virtual machines because it is difficult to solve the problem of ruijie, ubuntu cannot identify my Nic, and I need to install the NIC Driver ...... I can't connect to the Internet, and I don't know what NIC Driver I need. HP doesn't provide a Linux driver at all ...... Self-locking! No way, you have to play in the virtual machine.

It is very easy to build Ubuntu and Windows systems, but most of them install Windows first, www.linuxidc.com and then Ubuntu. Finally, the boot program in MBR is Grub or Grub2, this will automatically add Windows boot items for selection. However, we usually use Windows more frequently than Ubuntu. It is too troublesome to make such a choice every time. We hope to use Bootmgr to guide Ubuntu. This idea has been available for a long time and has never been successful. no solution has been found for searching on the Internet. Today, I saw people share the same idea with me, so I want to try again and try to solve it. I thought of using wubi. In Ubuntu installed with wubi, Bootmgr is used to guide Ubuntu. However, I copied two key wubi files-wubildr and wubildr. mbr. I think the problem lies in another file-wubildr. cfg: This is the configuration file, which contains the Virtual Disk root used for wubi installation. disk and swap. disk. Now my Ubuntu is fully installed. You cannot use this file directly. You must modify it. After several modifications, the system was finally successful. the root directory of the active primary partition contains four key files for starting Ubuntu, the above three and grub. cfg, grub. cfg is copied from the grub directory of the Ubuntu partition and does not need to be modified.

The wubildr. cfg file is modified as follows:

 

Set show_panic_message = true

Set root = (hd0, 2)
If [-e/boot/grub. cfg]; then
If configfile/boot/grub. cfg; then
Set show_panic_message = false
Fi
Else
If [-e/grub. cfg]; then
If configfile/grub. cfg; then
Set show_panic_message = false
Fi
Fi
Fi

If [$ {show_panic_message} = true]; then
Echo "It is not possible to boot from the Ubuntu image ."
Echo "Please verify that the Ubuntu installation was not removed ."
Echo "If that is not the case, please check that the Windows filesystem"
Echo "is not upted: reboot into Windows and run: chkdsk/r"
Echo "Then try again ."
Fi

 

Command to modify the BCD file:

Bcdedit/store X: \ boot \ bcd/set {bootmgr} locale "zh-CN"
Bcdedit/store X: \ boot \ bcd/set {bootmgr} description "Windows Startup manager"
Bcdedit/store X: \ boot \ bcd/timeout 10
Bcdedit/store X: \ boot \ bcd/set {default} description "Windows 7 PE"
Bcdedit/store X: \ boot \ bcd/set {default} locale "zh-CN"
Bcdedit/store X: \ boot \ bcd/set {memdiag} locale "zh-CN"
Bcdedit/store X: \ boot \ bcd/set {memdiag} description "memory detection tool"
Bcdedit/store X: \ boot \ bcd/create {45c374b2-8460-11df-8950-0024814b7667}/d "Ubuntu 10.10"/application bootsector
Bcdedit/store X: \ boot \ bcd/set {45c374b2-8460-11df-8950-0024814b7667} device boot
Bcdedit/store X: \ boot \ bcd/set {45c374b2-8460-11df-8950-0024814b7667} path \ wubildr. mbr
Bcdedit/store X: \ boot \ bcd/displayorder {45c374b2-8460-11df-8950-0024814b7667}/addfirst
Bcdedit/store X: \ boot \ bcd/enum all/v


Write to disk master boot:

Bootsect/nt60 X:/force/mbr

After writing this, everything is OK! It's not easy. It took a long time to solve the problem!

There are other ways to use bootice to extract Ubuntu partitions and save them as ubuntu. pbr. It is a versatile method for writing them into the boot file BCD, but it may not succeed. You can also use EasyBCD. This method is simple, but not transparent. It is too resistant to software and is not very good. It is best to solve the problem by yourself.

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.