Jump to content











Photo
- - - - -

Running full winxp on usb disk.

winxp usb grub4dos winvblock

  • Please log in to reply
25 replies to this topic

#1 linuxbyexamples

linuxbyexamples

    Newbie

  • Members
  • 17 posts
  •  
    Singapore

Posted 02 August 2012 - 08:23 AM

Hi guys,

In this post, I'll show you how to make a full winxp running on usb disk. Hope it will make you love winxp for more ! :)

Objective :
To make this works, you will need to put a full winxp (full or mini or lite is up to you) installed with winVblock driver in a vhd disk image. Then use grub4dos to boot the image.

Terminologies :
vhd (Virtual Hard Disk) : It looks like a file which contains a whole harddisk (and its partitions inside).
winVblock : SCSI driver to make winxp read/write to vhd disk image. Many thanks to Sha0 for this.
grub4dos : bootloader is used to load/map the vhd file.

Primary steps :
1. Create vhd disk image includes winxp (installed with winVblock) :
+ Install VirtualBox (http://www.virtualbox.org). We will use VirtualBox to make the vhd disk.
+ Create new virtual machine using vhd harddisk format, fixed-size. Notice the harddisk size need to be smaller than the usb size (2GB for example - full winxp).
+ Install winxp to the virtual machine as usual.
+ Disable page-file.
+ Update the IDE/ATAPI controller to use Standard driver. => to boot to different machine.
+ Update the System Devices to use Standard driver.
+ Install winVblock driver.
+ Defragement the windows drive (c:)

2. Make the usb disk bootable :
+ Plug the usb disk to a real PC running winxp.
+ Format the usb with ntfs (backup it first !!!). Set it active.
+ Copy file ntldr, ntdetect.com, boot.ini to the root of usb disk.
+ Use "bootsect.exe /nt52" to place the ntloader bootcode to the boot sector of the usb disk.
+ Download grub4dos. Extract : grldr, grldr.mbr to the root of the usb drive.
+ Point the boot.ini file to load grldr.
+ Copy the vhd image (was created in step 1) to the usb disk.

3. Boot the vhd image :
+ Boot from usb disk. It will load ntldr, then load grldr. Chose command line.
+ Load the winxp by typing commands :
++ map (hd0,0)/winxpfull.vhd (hd0)
++ map --hook
++ chainloader (hd0,0)/ntldr
++ boot
+ It works !!!
+ Add menu.lst file to use menu instead of command line.

Steps in detail :
You can see steps in more detail and screenshots here : http://www.linuxbyex...nxp-on-usb-disk

Known issue :
+ Not contiguous image file : You need to defragement the image file before load it.
+ Boot hang on new machine with SATA/AHCI controllers : Enter BIOS and switch the SATA/AHCI controller to use Compatible/Legacy mode.

Feel free to feedback.
Cheers !

#2 bee4u

bee4u

    Frequent Member

  • Advanced user
  • 172 posts
  •  
    United Kingdom

Posted 02 August 2012 - 02:46 PM

Nice method will try..:)

#3 linuxbyexamples

linuxbyexamples

    Newbie

  • Members
  • 17 posts
  •  
    Singapore

Posted 04 August 2012 - 12:17 AM

Next post : Boot winxp from LAN (http server) into RAM.

Under construction.

Cheer !

#4 Michele13

Michele13

    Frequent Member

  • Tutorial Writer
  • 167 posts
  •  
    Italy

Posted 08 August 2012 - 08:58 PM

Would not be more simple to install Grub4Dos DIRECTLY to the MBR of the disk and load XP from there? :)

#5 linuxbyexamples

linuxbyexamples

    Newbie

  • Members
  • 17 posts
  •  
    Singapore

Posted 09 August 2012 - 12:18 AM

I already tried to run bootlace.com in winxp to install grub4dos to MBR but it show me error (winxp does not allow for bootlace.com writing directly to the disk ! ).

So, I switch to use NTloader as the first stage, than NTLoader will load grldr as the second stage.

Could you show me how to directly install grub4dos to MBR in winxp ? Very pleased with that !

Thanks & BRs.

#6 bee4u

bee4u

    Frequent Member

  • Advanced user
  • 172 posts
  •  
    United Kingdom

Posted 09 August 2012 - 02:25 AM

bootlace.com will not work under windows .its Dos based tool you need to work with in Dos mode not the Dos in the windows.
you can use grubinst_gui.exe to install grub4dos on usbdisk... :)

#7 linuxbyexamples

linuxbyexamples

    Newbie

  • Members
  • 17 posts
  •  
    Singapore

Posted 09 August 2012 - 02:39 AM

So, we need another tool named grubinst_gui.exe for this. Awesome.

I'll try and update the post now.

Cheers.

#8 Michele13

Michele13

    Frequent Member

  • Tutorial Writer
  • 167 posts
  •  
    Italy

Posted 09 August 2012 - 08:05 AM

Why don't you try BootICE? it is my favourite tool to make usb disks (but also hard disk) bootable. If you wish to install Grub4Dos to the MBR you only have to get the lastest package of grub here, then extract the files grldr and default, this way you can also set a default OS if you want. eg. I have a multiboot system with ubuntu and windows if you write at the beginning of the file "default/default" instead of default 0 and add a savedefault at the end of every OS entry the last OS that you have booted will became the default selection next time you reboot; homeware extract these files at the root of your hardrive and make a menu.lst file then start BootICE and select your hardisk and select "Process MBR" then select Grub4Dos, click to install/config and then you can simply leave the default options and click directly to "Save to Disk" and on OK

#9 linuxbyexamples

linuxbyexamples

    Newbie

  • Members
  • 17 posts
  •  
    Singapore

Posted 20 August 2012 - 02:40 AM

Hi,

I've updated the post with a video show here :



Cheers.

Edited by linuxbyexamples, 20 August 2012 - 02:41 AM.


#10 TheHive

TheHive

    Platinum Member

  • .script developer
  • 4197 posts

Posted 30 August 2012 - 07:16 AM

Would there be another easier way to input those commands without having to remember them. Like an automatic way. The user would only have to choose a option from a list and then the step 3. Boot the vhd image would be automatically done. Like the video.

#11 linuxbyexamples

linuxbyexamples

    Newbie

  • Members
  • 17 posts
  •  
    Singapore

Posted 30 August 2012 - 07:26 AM

Yes. You can add a grub menu entry to menu.lst like this :


timeout 5

default 0



title Boot to Winxp.vhd

map (hd0,0)/winxpfull.vhd (hd0)

map --hook

chainloader (hd0,0)/ntldr


and it will appear a menu entry, users can select it to boot.

Cheers.

Edited by linuxbyexamples, 30 August 2012 - 07:28 AM.


#12 TheHive

TheHive

    Platinum Member

  • .script developer
  • 4197 posts

Posted 30 August 2012 - 07:51 AM

Thanks for the grub input!
Can you post the setting if you have in hand the settings for making it Liter. As commented here. http://reboot.pro/17394/



You dont happen to be creating a video with the steps .

1. Create vhd disk image includes winxp (installed with winVblock) :
+ Install VirtualBox (http://www.virtualbox.org). We will use VirtualBox to make the vhd disk.
+ Create new virtual machine using vhd harddisk format, fixed-size. Notice the harddisk size need to be smaller than the usb size (2GB for example - full winxp).
+ Install winxp to the virtual machine as usual.
+ Disable page-file.
+ Update the IDE/ATAPI controller to use Standard driver. => to boot to different machine.
+ Update the System Devices to use Standard driver.
+ Install winVblock driver.
+ Defragement the windows drive (c:)



#13 linuxbyexamples

linuxbyexamples

    Newbie

  • Members
  • 17 posts
  •  
    Singapore

Posted 30 August 2012 - 08:24 AM

Oops ! I did forget to save the setting file. But the hint is removing all components except for the red one. Screenshots is here : http://www.linuxbyex...with-nlite.html

1. Create vhd disk image includes winxp (installed with winVblock) :
+ Install VirtualBox (http://www.virtualbox.org). We will use VirtualBox to make the vhd disk.
+ Create new virtual machine using vhd harddisk format, fixed-size. Notice the harddisk size need to be smaller than the usb size (2GB for example - full winxp).
+ Install winxp to the virtual machine as usual.
+ Disable page-file.
+ Update the IDE/ATAPI controller to use Standard driver. => to boot to different machine.
+ Update the System Devices to use Standard driver.
+ Install winVblock driver.
+ Defragement the windows drive (c:)


This step will take alot of time, so it's hard to make screencast video for it. You can see detail steps screenshot instead here : http://www.linuxbyex...n-usb-disk.html

Cheers.

#14 linuxbyexamples

linuxbyexamples

    Newbie

  • Members
  • 17 posts
  •  
    Singapore

Posted 06 September 2013 - 02:57 AM

Update with the new domain : http://www.tipstuff....n-usb-disk.html

 

Cheers.



#15 Gerolf

Gerolf

    Member

  • Members
  • 75 posts
  •  
    Germany

Posted 05 April 2019 - 01:19 AM

Kidding? Following this tutorial, I get a Windows XP on VHD that is in fact bootable from a USB disk... inside a virtual machine, like Qemu when started from RMPrepUSB, so that the device is dismounted before. But when I plug the pendrive into a real machine that is switched to legacy IDE mode, it hangs with a 0x0000007B stop code and a blue screen of death. As expected, to be honest.

 

Gerolf



#16 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 05 April 2019 - 09:53 AM

Kidding? Following this tutorial, I get a Windows XP on VHD that is in fact bootable from a USB disk... inside a virtual machine, like Qemu when started from RMPrepUSB, so that the device is dismounted before. But when I plug the pendrive into a real machine that is switched to legacy IDE mode, it hangs with a 0x0000007B stop code and a blue screen of death. As expected, to be honest.

 

Gerolf

Most probably the Winvblock driver doesn't work or was not properly installed.

 

The 0x0000007b error means inaccessible boot device, and in this case the boot device is the .vhd mapped in grub4dos that should be "hooked" by Winvblock.

 

Review the verson and installing method of Winvblock:

http://reboot.pro/to...8168-winvblock/

 

Or try using SVBUS instead:

http://reboot.pro/to...r-for-grub4dos/

 

:duff:

Wonko



#17 Gerolf

Gerolf

    Member

  • Members
  • 75 posts
  •  
    Germany

Posted 05 April 2019 - 09:01 PM

Thank you, Wonko, for pointing me to SVBUS, which I will definitively have a closer look at the next days! What I mean here: How could Windows XP be made bootable from USB, without running a tool like USBoot (which is currently down) or USB_XP_Fix.exe (where Windows Defender gives false alert), if such a lot of drivers must be registered anew for this task?

 

Gerolf



#18 Gerolf

Gerolf

    Member

  • Members
  • 75 posts
  •  
    Germany

Posted 06 April 2019 - 11:30 PM

I repeated it. Following this tutorial (post #1, section 2), I ran "bootsect.exe /nt52" on a 8 GiB FAT32 superfloppy pendrive. I got an error message, and booting a real machine with it failed. So using RMPrepUSB, I created two partitions (NTFS and FAT) and let install NTLDR. I added GRLDR and GRLDR.MBR. In VirtualBox, I created a 2 GiB virtual disk on the pendrive named \_SYS\WNT510\WNT510-C.VHD  and installed Windows XP to it. I temporarily mounted that file as ImDisk Virtual Disk in Windows Explorer, and installed WinVBlock using the Add Hardware wizard. There was a reboot and a restart of the wizard. Afterwards Device Manager showed two instances of WinVBlock, the second one at fault, but the first one working.

 

To the pendrive's root folder, I copied BOOT.INI from VHD and added the line:

c:\grldr="Grub4DOS"

Following Shao's example, I created MENU.LST as follows:

title Windows NT 5.1
map (hd0,0)/_SYS/WNT510/WNT510-C.VHD (0x80)
map --hook
map --rd-size=2048
map --mem (rd)+4 (0x55)
map --rehook
write (0x55) #!GRUB4DOS\x00v=1\x00_SYS/WNT510/WNT510-C.VHD\x00\x80\x00
rootnoverify (hd0,0)
chainloader /ntldr

Then I replaced NTDETECT.COM in the root folder of both VHD and pendrive with Dietmar's modified variant, since you recommended it for ghostbusting 0x7B death screens, Wonko. I got it anyhow, though, when booting in Qemu, started from RMPrepUSB, whereas on the real machine, I got a 0x7E stop error on pci.sys. This is why I feel that this tutorial might be missing something important. User comments to part 1 and part 2 of the elaborated version also show some irritation.

 

Gerolf

 

 



#19 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 07 April 2019 - 09:33 AM

Gerolf,

The original way to install on USB (and run from) a "full" XP was "invented" by Dietmar in later 2005/early 2006, and - one way or the other - has always (more or less) worked.

 

The USBoot automates the needed Registry settings and adds a couple of services that help in some cases[1].

 

What you are doing here is however yet a further step, it is running XP from a .vhd hosted on a USB, so there is an added complication.

 

The WimB's tool is AFAIK perfectly fine, like a lot of files containing AutoIt code it is periodically flagged by this (or that or that other) antivirus heuristics. that is unfortunately perfectly normal.

 

If you want to try but your stupid antivirus/whatever prevents you form downloading it and you cannot find a way to workaround this issue, say so and we will find a way for you to get it.

 

Normally there is no need for the "modified" NTDETECT.COM, it is needed only in some particular setups/on some particular machine, but if it is needed and it works, it works.

 

This tutorial, like most other ones, is from someone that tried *something* and found that it worked for him (and we have no reason to doubt this) and decided (without further tests) that the same *something* would work for everyone on every machine, whilst as we have seen over the years, whilst the methods work for most machines/setups, in some cases additional/different settings/services/modified files/whatnot are needed to successfully boot.

 

IMHO, you could stop insisting on this tutorial (that as said may work for someone and not work for someone else) and start fresh.

 

:duff:

Wonko

 

 

[1] BTW only to say "I told you", as expected it is down (had to happen before or later) and thanks to the totally senseless two-way communication and "challenge code" it is dead (probably forever).



#20 Gerolf

Gerolf

    Member

  • Members
  • 75 posts
  •  
    Germany

Posted 07 April 2019 - 10:34 PM

As a workaround, I booted a virtual Puppy Linux machine in VBox, having mounted another VHD for file exchange, to download and extract VHD_XP_Setup_85.exe that way. I got a directory with 444 files, 61 folders and 26.300.658 bytes. Windows Defender scanned 1015 files therein and had no objections this time. Could it be helpful to offer the download as a ZIP file to avoid this infamous rating as malware? Currently, there should be a comment to this problem at the download page. Without it, you cannot any longer write a tutorial advising a user to download a file that gets tested as containing "Trojan:Win32/Tiggre!rfn". I would also appreciate a direct link for USB_XP_Fix.exe as this seems to be an essential file needed for Steve's XP-to-Go tutorial.

 

Gerolf



#21 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 08 April 2019 - 12:47 PM

Yep, good :), though unfortunately (from past experience) it is not the .exe or .zip that make a difference, it is the actual heuristics of this (or that) antivirus that (randomly or periodically) flag a given file.

Maybe Windows Defender can be tricked by the change of format, but I doubt it :dubbio:.

The USB_XP_Fix.exe is only a compiled AutoIt script, it uses/needs a number of other files that are included in the "whole" VHD_XP_Setup_85.exe, of course it is possible to "separate" it with the needed files, but I would say that the best route would be to PM Wimb asking for it.

 

:duff:

Wonko



#22 Gerolf

Gerolf

    Member

  • Members
  • 75 posts
  •  
    Germany

Posted 09 April 2019 - 03:33 PM

Today I see that the malware alert problem in fact cannot be confined to the outer package: Windows Defender just found "Trojan:Win32/Occamy.C" in USB_XP_Fix.exe and VHD_XP_Create.exe, and "Trojan:Win32/Bitrep.A" in PS.exe.

 

Gerolf



#23 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 09 April 2019 - 04:55 PM

 

Today I see that the malware alert problem in fact cannot be confined to the outer package: Windows Defender just found "Trojan:Win32/Occamy.C" in USB_XP_Fix.exe and VHD_XP_Create.exe, and "Trojan:Win32/Bitrep.A" in PS.exe.

 

 

 

These are all false positive alerts that you can ignore. 

For now just disable Defender temporarily ....



#24 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 09 April 2019 - 04:56 PM

 

Today I see that the malware alert problem in fact cannot be confined to the outer package: Windows Defender just found "Trojan:Win32/Occamy.C" in USB_XP_Fix.exe and VHD_XP_Create.exe, and "Trojan:Win32/Bitrep.A" in PS.exe.

 

Gerolf

 

Yep, as said the issue is a known one and it usually revolves (as in this case) around AutoIt compiled files.

 

Ilko_t (Author of WinsetupfromUSB) had a lot of issues with something similar if I recall correctly

 

I have no idea if "shipping" the source .au3 (provided that wimb is fine with this idea) and a suitable AutoIt runtime making the final user run the script instead of the compiled tool would solve the problem, surely even if the script is compiled locally the stupid Wndows Defender (or whatever other antivirus in a "bad day") will flag the resulting .exe :(.

 

:duff:

Wonko



#25 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 09 April 2019 - 05:00 PM

I can fix it probably by recompiling the AutoIt code, as done already for some of my other programs.

 

But give me some time, since I need to test and have no environment ready for XP and I am rather busy just now ....







Also tagged with one or more of these keywords: winxp, usb, grub4dos, winvblock

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users