Dual booting Vista PE and DOS... on a USB flash drive!

Hello! I discovered EasyBCD yesterday and I'm hooked. Everything around me was getting EasyBCD'd :smile:. But today I have hit a brick wall! ow.

I'm trying to dual boot Vista PE and DOS (6.22, Freedos.. whatever) on a 4gb USB stick and I've spent all day trawling through webpages and forums trying to find a solution but no such luck :frowning:

The wiki seems to be incomplete in regards to dual booting with a legacy OS so I was hoping someone could shed some light on this.

Right, as I understand it I have install EasyBCD onto the USB drive and run it from there. Well that means I have to boot off it first, right? Since we can only install it onto the boot drive.

I got Vista PE working on the drive and ran the install from there. EasyBCD installed itself onto the ramdrive (X: ) and refused to run.

I also managed to partition the USB drive by loading the Hitatchi microdrive driver which fools windows into treating it like a fixed disk. I read in the wiki that DOS has to be at the beginning of the drive so the 1st partition is 128mb FAT and the 2nd is 3.9GB FAT32. I used mkbt to load a DOS bootsector from a DOS floppy and copied over IO.SYS, MSDOS.SYS and COMMAND.COM and installed Vista PE onto the 2nd partition.

I set the Vista partition as active and that booted fine, tried setting the DOS partition as active but got a "Non system disk" error :frowning:.

So what's the best plan for this? Put both DOS and Vista PE on the same partition and allow EasyBCD to invoke bootsect.dos when DOS is selected? I assume that would work (if I ever find a way to run EasyBCD on a flash drive!)

Surely someone has done this before and is kind enough to prevent a guy from tearing his hair out!
 
Hellow again! I spent a couple of hours on this today and I'm almost there.

I've got BCD running on the USB stick with 2 options (WinPE and DOS). WinPE boots perfectly but when I select the DOS option I just get a flashing cursor in the top left of the screen.

I know this stick can boot DOS alone (had it working with Windows 98SE files earlier today) but in order to do that I had to use the HP format tool... but of course to install VistaPE you have to format the drive in Vista using diskpart.

I extracted the bootsector using mkbt from the USB drive when it had win98 on it and saved it as bootsect.dos. I've pointed the BCD file to bootsect.dos.

Anyone know where I'm going wrong?
 
Hi Mak, thanks for the welcome :smile:

I've actually found a solution for this now! It's actually pretty simple when you know which tools work and which don't! I'm putting together a walkthrough for this right now. I'll post it up tomorrow.
 
If you could do that it would be great. Thanks for the help on getting this issue updated. Will take a look at the Wiki after we see what you got. :wink:

Do not worry. If we use your info we will ask permission and give full credit where it is due.
 
Here is the walk through as promised. I've used WinPE instead of VistaPE here but it's easy enough to add VistaPE to the boot menu. I find this set up very handy because we have a WIM install for XP which is done via PE but we also have a few ghost images that are used on some old machines and it's best to image them in DOS. So putting everyting on one USB stick is going to make the rest of the engineers here very happy!

First of all, I couldn't use EasyBCD for this. It kept complaining and throwing up a pop up box asking me to confirm my boot drive even though I was just modding the BCD file on the USB stick. I used plain old BCDedit instead.

The main problem turned out to be how the USB drive is formatted. I was using an 8GB Sony flash drive (I'll refer to this as a UFD from now on). The instructions for installing VistaPE to a UFD were to format it on a Vista machine using diskpart. This worked fine as far as getting the boot loader working and booting into PE but it refused to boot into DOS. I'd just get a flashing cursor in the top left of the screen and nothing happened.

So this is what I did:

Obligatory download list:

-BCDedit.exe, bootsect.exe, bootmgr and the fonts folder (optional) from your c:\Windows\Boot. These files can be found on any Vista machine.
-HP USB format tool (google is your friend)
-HDhacker - Dimio's Tools
-Win98SE or WinME boot disk - http://www.bootdisk.com/bootdisk.htm
-Winimage (to extract the DOS boot disk files from the IMG file) - Gilles Vollant software

Note: DOS 6.22 won't work on a FAT32 partition and the HP format tool doesn't allow you to use PC-DOS or FreeDOS etc. I also tried the popular MS-DOS 7.1 but this just gave me a flashing cursor in the top left corner when booting from the USB drive. I used Win98SE.

If you want to stop the annoying Win98 boot logo from appearing edit MSDOS.SYS and make sure the only thing in the file is ;SYS


1. Set up some temp folders on your local machine and unzip everything you've just downloaded.

2. Format your USB drive using the HP tool. Select FAT32, quick format and point it at your Win98/WinME boot files (command.com, io.sys, msdos.sys).

3. Load up HDhacker and select the drive letter of your UFD. Press Read sector and then Save sector and call it bootsect.dos. Save it to a temporary folder, we'll come back to this later.

4. Now we need the Vista boot sector on the UFD. Run this command:

bootsect.exe /nt60 G:

sub G: for the letter of your UFD, mine happened to be G.

5. Next we have to set up the boot menu. You might be able to do this with EasyBCD but I used the command line because I kept getting errors with EasyBCD while trying to edit a secondary BCD store. You could also use one of the many batch scripts out there. Anyway, this is how I set up my boot menu (I am dual booting WinPE and DOS):

bcdedit /createstore c:\temp\bcd
;this creates an empty BCD store

bcdedit /store c:\temp\bcd /create {bootmgr} /d "Boot Loader"
bcdedit /store c:\temp\bcd /set {bootmgr} locale en-US
bcdedit /store c:\temp\bcd /set {bootmgr} displaybootmenu Yes
bcdedit /store c:\temp\bcd /set {bootmgr} timeout 30
;creates an entry for the boot manager


bcdedit /store c:\temp\bcd /create {ntldr} /d "Windows PE"
bcdedit /store c:\temp\bcd /set {ntldr} device boot
bcdedit /store c:\temp\bcd /set {ntldr} path \MiniNT\setupldr.bin
;creates an entry for Windows PE and points it to setupldr.bin


bcdedit /store c:\temp\bcd /create /d "MS-DOS" /application osloader
;creates and entry for DOS. This returns a GUID like {xxxxxxxx-xxxx-xxxx-xxxxxxxxx} which you will need later. I hope you have copy and paste enabled on your DOS window :tongueout:


bcdedit /store c:\temp\bcd /set {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} device boot
bcdedit /store c:\temp\bcd /set {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} path \bootsect.dos
;tells the boot menu that DOS is on the boot partition and to look at bootsect.dos for the DOS boot sector


bcdedit /store c:\temp\bcd /displayorder {ntldr}
bcdedit /store c:\temp\bcd /displayorder {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} /addlast
;sorts out the display order


bcdedit /enum all /store c:\temp\BCD
;this displays all of the info about your BCD store, use it to check your settings.

Here's one I did earlier :grinning:


Windows Boot Manager
--------------------
identifier {bootmgr}
description Boot Loader
locale en-US
displayorder {ntldr}
{fe2ca119-12fc-11dd-8da0-000ffe75edbd}
displaybootmenu Yes

Windows Boot Loader
-------------------
identifier {fe2ca119-12fc-11dd-8da0-000ffe75edbd}
device boot
path \bootsect.dos
description MS-DOS

Windows Legacy OS Loader
------------------------
identifier {ntldr}
device boot
path \i386\setupldr.bin
description Windows PE



6. Create a folder called Boot on the root of the UFD and drop your newly created BCD file and the Fonts folder into it. Put bootsect.dos, bootmgr and NTDETECT.COM on the root of the UFD. Also copy over your WinPE folder (mine is MiniNT).


Done.

Note: if you use DOS for running Ghost, be sure to use Ghost 2003 or newer. Older versions don't support USB 2.0 so imaging would be very slow.

Mak, feel free to use this in the Wiki.
 
Last edited:
Welll thank you for the write up. I will get with the Main Man and see what he has to say. We appreciate your help and input in this manner. It is always apprecaited to get outside feedback. :grinning:
 
teamxtreme, thanks for your contributions and feedback on this matter..

You've done an awesome job documenting your steps - great work there!

EasyBCD 2.0 is planned to have bootsect.dos generation capabilities - but I've been facing an issue with generating a reliable bootsect.dos image from within Vista (vs. booting into a real-mode DOS terminal and doing it from there)

I'll take a look at your steps, perhaps there's something in there I've been missing......
 
Back
Top