Jump to content











Photo
- - - - -

Explain boot windows XP from a USB flash disk.


  • Please log in to reply
3 replies to this topic

#1 Levellak

Levellak

    Newbie

  • Members
  • 11 posts
  •  
    Czech_ Republic

Posted 05 January 2014 - 12:42 AM

Hi all,

 

trying to understand in depth booting Windows XP but I do not know. I read a lot of topic but everywhere is the only code and no explanation how it worked.
 
I modified code (only deleted lines :) ) from Easy2Boot from steve6375. thx .
 
title XP Step 1

#In this case, does not matter FIRA settings
set FIRA = 3

call /_iso/e2b/grub/DPMS/dpms2.g4b 2

# map -- mem /newwinvblock.ima.gz (fd0)
# map -- mem /newwinvblock.ima.gz (fd1)

map /winXP.iso (0xff)
map (hd0) (hd1)
map (hd1) (hd0)
map --e820cycles=3
map --hook
root (0xff)
chainloader (0xff) /i386/setupldr.bin | | chainloader (0xff)
I understand that in dpms2.g4b is set driver for hdd and firadisk (winvblock) to (fd0) (fd1) drive. But I do not understand how to activate firadisk (winvblock) when installing windows without any text file as autounatend.xml for win7 .
 
 
And next code.
title XP Step 2
map --mem /newwinvblock.ima.gz (fd0)
map /winXP.iso (0xff)
map (hd0) (hd1)
map (hd1) (hd0)
map --hook
map --rd-size = 2048
map --mem (rd) +4 (0x55)
map --rehook
write (0x55) #!GRUB4DOS\x00v=1\x00/winXP.iso\x00\xA0\x00
root (hd0,0) || root (hd0,1) || rootnoverify (hd0,0)
chainloader (hd0) +1
And here's when and how to activate winvblock ? Or how is it possible that the installation works?
 
And the last question, why you need map newwinvblock.ima.gz to (fd0) drive and (fd1)?
 
Can someone explain to me, please ?
 
Thank for some reply.


#2 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 05 January 2014 - 11:15 AM

Hi

XP has a mechanism similar to autounattend.xml which is txtsetup.oem.

txtsetup.oem allows you to install a driver automatically by setting a [Default] driver. XP Setup only reads two floppies, thus you can install two default drivers using 'F6' floppies.

 

In the case of FiraDisk, this causes the FiraDisk driver to load.

When the FiraDisk driver loads it searches the first sector of all 'floppy' real-mode devices for a [Firadisk] string which contains commands for Firadisk, in our case the string is

cdrom,vmem=find:\_ISO\Windows\XP\XP.ISO;

So this tells firadisk to look for this ISO in memory

 

 

Also, if you look at the firadisk.inf file created by DPMS2, you will see a section

[Config.firadisk]
   
###E2B###################################################################################################=PATCHED WITH ISO NAME

This is patched by the code to

[Config.firadisk]
   
value=Parameters,StartOptions,REG_SZ,"cdrom,vmem=find:\_ISO\Windows\XP\XPPROSP3.iso;"
;#################=PATCHED WITH ISO NAME

This also writes the registry entry showing firadisk the ISO name for the 2nd boot (though this reg write should also be done by the firadisk driver too???).

 

 

newwinvblock.ima.gz is an F6 floppy too, when the driver is loaded it also looks for a string on a 'floppy'

 

(any grub4dos device below 128 (80h) is a 'floppy' device.)

 

 

Firadisk seems to require the ISO to be loaded into memory on the first boot which is a shame.

WinVblock does not, however by experiment it does not always work on every type of system (may be due to connection with the USB drive being lost during early PnP enumeration?)

 

Firadisk project is here.

P.S. There is an (old) Firadisk guide here.

 

 

HTH

Steve



#3 Levellak

Levellak

    Newbie

  • Members
  • 11 posts
  •  
    Czech_ Republic

Posted 05 January 2014 - 01:08 PM

Hi,
thank,  I completely understand step one.
For step two I have one last question.
 
This code for winvblock set iso.
 
map --rd-size = 2048
map --mem (rd) +4 (0x55)
map --rehook
write (0x55) #!GRUB4DOS\x00v=1\x00/winXP.iso\x00\xA0\x00
But you say that it is used firadisk. But where taking setting for firadisk? 
 
Bye.


#4 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 05 January 2014 - 02:39 PM

no,

#!GRUB4DOS is looked for by WInVblock

[Firadisk] is looked for by Firadisk

 

Firadisk will write the path of the ISO to the registry in Step 1.

On Step 2, when the Firadisk driver is loaded, it will use the registry to find the vmem ISO loaded by grub4dos using --mem






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users