Multi-boot Vista / XP and Other OSes with Grub Menu


Recommended Posts

Good news for people who use Grub loader for multi-booting to various Microsoft OSes, including the new Windows Vista, and Linux. I've modified an old trick I've used to load Grub on system startup with Windows XP as the main OS. See the post at 911cd.net Multi-boot WinXP and other OSes with Grub for this method.

Background

For those of you not familiar with Grub, here's some background information on its benefits. Why use Grub instead of Windows XP boot menu or Vista boot menu? There are several reasons.

  • First, you can't boot non-Microsoft OSes with XP/Vista boot menu. Grub loads Vista, XP, 2000, 98, Linux, BartPE on HDD or CD etc. I'm guessing you can also load WinPE 2.0 from HDD but haven't tried it yet.
  • Second, you can't boot other devices, namely floppy and CD/DVD drive, from XP or Vista menu. Grub can boot floppy, bootable CD/DVD (even if your BIOS does not support it), and floppy images from its menu.
  • Third, it's backward compatible but not forward compatible; meaning, XP can load Windows 2000, 98, and other legacy OSes but not Vista. Vista can load previous ones but not future ones.
  • Fourth, Grub does not modify the MBR or PBR. It requires no patching or hex-editing. It simply requires renaming a couple of files, which I'll explain next why renaming is required.

Why Rename?

My objective was to load Grub loader first, before XP boot menu (and now before Vista boot menu). In order to fulfill this objective, renaming two files is necessary.

You can add Grub loader to boot.ini so that you can get an option to load Grub in the XP boot menu. However, if you want Grub to load before XP boot menu, you'll have to rename two files. First, you have to rename ntldr (the XP loader) as ntldrxp and grldr (Grub loader) as ntldr. Basically, you are disguising Grub loader as the XP loader. So, the system thinks it is loading XP but it is loading Grub. Then, you can create an entry in menu.lst to load XP with the following lines:

title Microsoft Windows XP SP2 Pro (Find and Load)
find --set-root /ntldrxp
chainloader /ntldrxp

If you had edited boot.ini to load Grub from there, and then made Grub load automatically, then you would not be able to boot XP because of a circular reference. Why the circular reference? Because system loads ntldr, which reads boot.ini and loads grldr automatically (without an XP menu). Then, from Grub, you would choose to boot XP. However, ntldr will look for boot.ini and load Grub again automatically. It doesn't matter if you rename ntldr to ntldrxp. Ntldrxp will also look for boot.ini and you get a circular reference. Therefore, renaming both ntldr and grldr files solves the problem.

Booting Vista with Grub

So, with Windows Vista, is it still possible to get Grub to load before Vista boot menu? And can you boot Vista with a Grub entry? Both are yes!!

I thought since Vista's boot process had been modified, it would not be possible. But the same trick works with Vista as with XP. Let's look at the differences between Vista and XP boot process before I explain how to get a Grub menu before the Vista menu.

For XP, the MBR looks for and loads ntldr. Ntldr then read from boot.ini. If it finds two or more entries in boot.ini, then it will present a menu option for the entries (unless you set to boot an item automatically). That's the process. (I've read that ntldr serves two functions: bootmanager and bootloader. As bootmanager, it presents a menu for XP and other OSes. As bootloader it itself can boot XP.)

For Vista, the MBR looks for and loads bootmgr. You can say bootmgr has replaced ntldr. However, bootmgr serves only one function???€š???‚??Bootmgrer. Bootmgr refersbcd called bcd (probably short for boot configuration dbcdcan say <boot.inike boot.ini. It contains the menu entries for Vista's boot menu. There's a winload.exewinload.exe that actually loads Vista; this is the bootloader for Vista.

So, for our purposes, wbootmgrace grldr to get a Grub menu before the Vista menu. Then, we need to cmenu.lstin menu.lst for booting Vista, XP, other OSes, and other devices. Finally, now for the Requirementsb>Requirementsgrldr'>

[*]grldr, the file that loads Grub loader. You can find it at Grub4Dos. Download the zip file and extgrldro get grldr.

[*]WinImage or any other floppy image creator

[*]Floppy drive and a floppy

[*]A system that is currently dual-booting XP and VisBackup System>Backup System

First step is to backup your system with System Restore or Vista's backup program just in case things go haywire (if you follow directions correctly, it shouldn't). I don't use system restore but you may want to. If you are comfortable, you can skip this step. Don't blame me if things go wrong.

The worst that can happen with these simple instructions is you lose the ability to boot to either Vista or XP. If you create a Vista boot floppy in the next step, then you should be able to recover. If something worse than this happens, you did something beyond these Create Vista Boot Floppyta Boot Floppy

Now, make a Vista boot floppy. Follow the instructions: Vista Boot Floppy Disk. I advise you not to skip this step. It will not only help you now, but also if in the future you can't load Vista or XP, it will come in handy.

Note: you can create a Vista-only boot floppy, XP-only boot floppy, or Vista/XP dual-boot floppy by modifying your boot options in Vista. If you want a Vista-only boot floppy, modify your boot options to boot Vista automatically (without a timeout). If you want XP-only, set Vista boot options to boot XP automatically (that'll do it! Then you can't boot Vista, right? Need to create a dual boot floppy or Vista boot floppy first before you set boot options to boot XP only). If you want dual-boot, specify a timeout before loading your default choice. The changes you make arebcd in the bcd file. Therefore, all files will be same on these flbcdept the bcd file. For the purpose of these instructions, you're better off creating a Vista/XP dual-boot floppy so you can boot tRename bootmgrRename bootmgr

After creating a boot floppy, boot into XP. Give yourself perbootmgrify bootmgr. You may have to take ownership. (I took ownership of the file and then modified permissions. I now realize maybe that was not necessary. bootmgrame bootmgrvas Rename grldrb>Rename grldgrldrenambootmgr as bootmgr. Just like in XP, we're going to fool the system into thinking it is loading Vista, but it is loading Grub lbootmgropgrldr (grldr in disguise) to where thebootmgreal bootmgr was, usually in the root folder of your active primaCreate Vista Entry in Menu.lstry in Menu.lstntldrxphow ntldrxp wasbootmgrvP, bootmgrv can also boot Vista from Grub menu. Menu.lst goes in the same place as bootmgr (grldr in disguise), which is the root of your active partition. If you're not sure where to place it, try placing it in both the root of Vista partition and the XP partition.

Create the folmenu.lstin menu.lst. The # indicates comments. Take a look at the comments if you are menu.lstth menu.lst.

# Sets colors, timeout before default selected and default value
color black/cyan yellow/cyan
timeout 5
default 0

# Boot Vista by finding and loading bootmgrv
title Microsoft Windows Vista
find --set-root /bootmgrv
chainloader /bootmgrv

# Boot XP by finding and loading ntldr
title Microsoft Windows XP
find --set-root /ntldr
chainloader /ntldr

# Boot BartPE by finding setupldr.bin
title BartPE with XPE 1.0.4 (from HDD)
find --set-root /minint/setupldr.bin
chainloader /minint/setupldr.bin

# Boot BartPE from USB HDD by swap method; note your USB HDD number may be
# different. I have two internal HDD's ((hd0) and (hd1)), making my USB HDD
# (hd2). Therefore, I have to swap (hd0) with (hd2).
title Boot BartPE from USB HDD
map (hd2) (hd0)
map (hd0) (hd2)
chainloader (hd0)+1

# Boot whatever is in CD/DVD drive, even if your BIOS does not support
# booting from CD/DVD drive. You need a file called sbootmgr.dsk.
# It's a very small SBM disk image. See the end of guide for download link.
title Boot CD using Smart Boot Manager
find --set-root /sbootmgr.dsk
map --mem /sbootmgr.dsk (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)

# Example of how to boot a floppy image by finding and loading the image file
# This is much faster than booting from the actual floppy.
title Boot Ghost 2003 (ghost.img)
find --set-root /ghost.img
map --mem /ghost.img (fd0)
map --hook
chainloader (fd0)+1

# Boot whatever is in the floppy drive
title Floppy on (fd0)
chainloader (fd0)+1
rootnoverify (fd0)

Note, we do nntldrenamntldrxp as ntldrxp in this case. You can also add Linux and other OSes supported by Grub. I don't use Linux. You can search for instrucReboot>Reboot

Voila! Reboot and you should see Grub menu with your boot menu options!

Please post if you found this useful and worked for you, there are any errors in above, anythings that needs clarification, or discussion points.

Don't post that your system is screwed up. I warned you to backup. If you did, restore your backup. Otherwise, the only modifications you are making are renaming a couple of files, one of which is a system file, and modifying your menu.lst file; so I don't see how you can really mess up.

__________________________________________________________________

Here's a great download for all: sbootmgr.dsk.

It allows you to boot from a CD-ROM, even if your BIOS does not support booting from CD-ROM.

It's a great tool for even those who CAN boot from CD-ROM because you can add it to a Grub menu. No more chaning your BIOS boot sequence or pressing F8 to boot from alternative devices.

Simply download the file, add it to the root of your OS, add the following code to menu.lst.

title Boot CD using Smart Boot Manager
find --set-root /sbootmgr.dsk
map --mem /sbootmgr.dsk (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)

Edited by spacesurfer

Nice guide, spacesurfer.

One thing: you don't mention where one should create the menu.lst file. Does it go in C:\ ?

You mention that the Vista bootloader cannot boot into non-Windows operating systems. EasyBCD is a full GUI tool used to make the Vista bootloader do just that, with support for older versions of Windows, Linux, and OS X. Depending on your needs, you may find it easier to use EasyBCD instead, without having to go through manual menu files and stuff.

Yes, the menu.lst goes in the same place as your grldr would go. So, in most cases it's in the root of C:\ of your active partition.

About EasyBCD: Yes, with help from EasyBCD, you can load other OS's; but you cannot boot from CD-ROM or Flopy using EasyBCD. With Grub4Dos, it's all there - your CD-ROM, Floppy all in one place. I have tried EasyBCD but I can't add BartPE (which is on my HDD) to it like I can with Grub.

EasyBCD also does not allow booting floppy images. I have created a Ghost.ima floppy image and the image is stored on my HDD. With Grub, I can load Ghost and it's much faster than using the actual floppy.

Editing Grub menu is also easier since all you have to do is edit menu.lst. If you have an error, then when Grub is loaded, you can edit it right there and try again. You don't have to boot to Windows, then edit menu.lst, then restart. With EasyBCD, I'm sure if you messed up an entry, you'll have to restart to Windows and try again.

Anyway, this is an alternative. I've been using this for a long time and I like that it can boot multiple OS's and multiple devices.

Note that if you BIOS does not CD-ROM booting, you can still use Grub using sbootmgr.dsk as mentioned above. However, USB booting is not supported if you BIOS does not support it.

Edited by spacesurfer
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • A different thing with Russia. When you say is it better, depends on things. It is better that we don't have the E.U making rules and laws that have nothing to do with them. Is the trading part better? No, that is really mucked up, but then we knew that was going to happen and we would have make agreements, like we do with other parts of the world. Freedom of movement is certainly better, but could be improved, we still need more control over our borders. do you live in the U.K?
    • So what am I quoting from them? I never listened to what Farage or his cronies said. I wanted the U.K to leave the E.u years before the referendum and it had nothing to do with Farage and his cronies. So what country do you live in? Did we work much better together? We were always at logger heads with the E.U because we disagreed with them so much. Maggie was always on at them. I would have thought the E.U was glad to get rid of us as we stopped the integration or made it a two tier. Now without us they can integrate more. I would not have voted out if it was just a trading block and we can still work together on somethings.
    • MPC-BE 1.9.0 by Razvan Serea Media Player Classic - BE is a free and open source audio and video player for Windows. Media Player Classic - BE is based on the original "Media Player Classic" project (Gabest) and "Media Player Classic Home Cinema" project (Casimir666), contains additional features and bug fixes. The BE mod (Black Edition Mod) is a skinned version of Media Player Classic Home Cinema, much better looking than the plain old MPC. MPC-BE 1.9.0 changelog: Splitters Fixed crashes in some situations. AudioSplitter Added support for the RF64 format. Fixed reading of channel layout for some WavPack files. Added support for ID3 tags for Wave64 files. Unknown Wave64 chunks are now ignored. AviSplitter Added support for 'y408' video. Improved support for 'HEVC' video. FLVSplitter Added support for VVC video. MP4Splitter Improved handling of corrupted files. MatroskaSplitter Expanded support for V_UNCOMPRESSED video codecs. Fixed support for frame rotation (ProjectionPoseRoll). Improved support for "V_MS/VFW/FOURCC / HEVC". MpcDvdVideoDecoder Fixed conversion to YUY2. Fixed display of menus for some DVD-Videos. RoQVideoDecoder Output in NV12 and YV12 formats is allowed. Full range is used. MPC Video Decoder RGB32 format will be output as a top-down bitmap by default. Added support for the "IID_MediaSideDataDOVIMetadataV2" interface. Removed support for the deprecated "IID_MediaSideDataDOVIMetadata" interface. Fixed retrieving the name of the video adapter when using NVDEC. Fixed crashes in some situations. MPC Video Converter Added support for AYUV video format. MpcAudioRenderer Improved input format validation. Optimized retrieval of supported formats for exclusive mode. Added the "Keep audio device active when paused" setting. Fixed crashes and freezes in various situations. Subtitles Added the ability to open the properties of an external subtitle renderer in the "Subtitles" settings panel. Fixed external subtitle connections for VSFilter. Fixed a crash when rendering PGS/SUP subtitles when using AVX2. YouTube Improved support for yt-dlp. The built-in YouTube parser is no longer used. Player The HTTP read strategy has been changed. If the playlist contains one entry, more key combinations can be used to control the player (jump through chapters, adjust volume). Improved support for reading ASX playlists. The translation of the MediaInfo report for Chinese, Korean and Japanese has been removed. Added blocking of 32-bit filter "PICVideo Lossless JPEG Decompressor" (pvljpg20.dll), because it crashes. Added blocking of the system filter "AVI Decompressor", which will eliminate the crash of VFW codecs. Fixed a rare crash when using the "/slave" key. Fixed a crash when getting a list of fonts for OSD. Added the ability to load an external audio file using hotkeys. Fixed opening a network path starting with \?\UNC. The "Determine duration when adding" playlist setting now works for YouTube video URLs. The "Online media services" settings panel has been redesigned. Added a "Merge files using FFmpeg" option to the file saving dialog. This option is activated when playing multiple streams obtained using yt-dlp. Added loading of local .dpl playlists ("DAUMPLAYLIST"). Fixed a hang when the user closes the player during the URL opening process. Various interface fixes. Installer Updated MPC Video Renderer 0.10.5. Updated MPC Script Source 0.2.17. Added MPC Image Source 0.3.6. Translations Updated Japanese translation (by tsubasanouta). Updated Chinese (Traditional) and Dutch translation (by beter). Updated Romanian translation (by Andrei Miloiu). Updated Hungarian translation (by mickey). Updated Turkish translation (by cmhrky). Updated German translation (by Klaus1189). Updated Chinese (Simplified) translation (by wushantao). Updated Italian translation (by mapi68). Updated Korean translation (by Hackjjang). Updated Chinese (Traditional) (by udfbe). Updated libraries dav1d 1.5.3-6-g04b69f9; ffmpeg n8.2-dev-1857-g4653e68aab; libpng git-v1.6.55-9-g7d52a8087; Little-CMS git-lcms2.18-26-gf739cda; MediaInfo git-v26.05-38-g702c9b7fd; ZenLib git-v0.4.41-91-g073f297; zlib 1.3.2. Download: MPC-BE 64-bit | Portable MPC-BE 64-bit | ~20.0 MB (Open Source) Download: MPC-BE 32-bit | Portable MPC-BE 32-bit Link: Media Player Classic - BE Home Page Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Apple reportedly looks to blacklisted Chinese memory chips as RAM prices climb by Karthik Mudaliar Image via Apple Apple is reportedly trying to get a clearance from the Trump administration to buy memory from ChangXin Memory Technologies (CXMT) to get some relief from soaring DRAM prices. As per a report by the Financial Times, Apple approached the Commerce Department more than a month ago and also spoke to other officials and allies in Washington. For starters, CXMT is a company that's already been placed on the Pentagon's list of Chinese military companies. The Chinese company is the country's top DRAM maker. For Apple, the timing is certainly awkward but not surprising. Tim Cook had recently warned that Apple would have to raise prices because AI companies are buying up large amounts of memory for data centers, and just like that, Apple raised MacBook and iPad prices. Micron also recently revealed that customers have committed billions of dollars to secure memory supply years in advance, which shows us how aggressive securing infrastructure has become. This gives suppliers such as Samsung, SK Hynix, and Micron more leverage, while pushing hardware makers to look for alternatives. CXMT is one of those alternatives, but not the simplest one. Apple has spent many years trying to diversify parts of its supply chain away from China, especially for final assembly, while still depending heavily on Chinese manufacturing and suppliers. Even domestic brands from China are moving towards CXMT and YMTC instead of relying on Samsung, Micron, and SK Hynix. For Apple, though, it would invite more scrutiny than local Chinese companies. For now, this is more like a lobbying effort rather than a confirmed supply deal. There's no official statement from either of the parties. What is clearer, though, is the pressure behind such a request. AI demand has certainly made hardware a bottleneck, and companies are trying everything they can to bring things back to normal, even if that means making politically sensitive choices. Source: Financial Times
    • I did test it a month or so back, but ... the results I expect to be on the first page are not there.
  • Recent Achievements

    • Week One Done
      flexorcist earned a badge
      Week One Done
    • One Month Later
      Woland13 earned a badge
      One Month Later
    • Week One Done
      Woland13 earned a badge
      Week One Done
    • One Year In
      bernmeister earned a badge
      One Year In
    • Week One Done
      Scoobystu earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      486
    2. 2
      +Edouard
      220
    3. 3
      PsYcHoKiLLa
      147
    4. 4
      Steven P.
      74
    5. 5
      FloatingFatMan
      70
  • Tell a friend

    Love Neowin? Tell a friend!