10/10/14

on Leave a Comment

Windows XP for Bochs

Hy everyone,
I thought to make a Tutorial about how to install Windows XP and run it on Android.
------------------------------------------------------------------------
Requirment
At first you have to download Bochs for Android and PC
Android version: http://forum.xda-developers.com/show....php?t=1389700
Thanks to korvs2003
PC Version: http://bochs.sourceforge.net/getcurrent.html
Then Download Qemu: http://wiki.qemu.org/Download
You need Windows XP
Android: Install Bochs
PC: Install Bochs and Qemu
--------------------------------------------------------
Creating the bootable image!
1. Open up Bochs for PC and run bximage.exe -> you can find bximage here C:/Program Files/bochs/ | depends on where you have installed it.
2. Create a Image with following: hd, flat, 1500, c.img
hd: It is the format of your boot disk. | fd will create a bootable floppy disk image. For some odd reasons you can use with win 3.11 or something like that.
flat: It means that it has a fixed size.
1500: It is the size of your Image. | you need around 1,5 gb disk space, because the installation of winxp, even you edit it with nlite, wont let you use lower disks -.- , i am trying to solve that problem.
c.img: It is the name of your Image. | choose the name like you want to, but dont forget to edit the bochsrc.txt, else it wont start.
notice: Maybe you have to run bximage.exe as Admin.
--------------------------------------------------------
Install Windows XP in the boot image
1. Open up Qemu
2. Set up a new Virtual Machine
3. As disk use the c.img
4. Configure the cdrom
5. Give the machine around 512 MB - 1 GB RAM if possible
6. start the Virtual machine and run the installation of Windows XP
---------------------------------------------------------
Run the Image on Android
1. create a SDL folder on your SDCARD like here http://forum.xda-developers.com/show....php?t=1389700
2. copy your c.img to your SDCARD: sdcard/SDL/c.img
3. now replace the bochsrc.txt lines with:

Code:

megs: 256 cpu: count=1, ips=6000000, reset_on_triple_fault=1, ignore_bad_msrs=1 # filename of ROM images romimage: file=BIOS-bochs-latest vgaromimage: file=VGABIOS-lgpl-latest vga: extension=cirrus, update_freq=25 pci: enabled=1, chipset=i440fx, slot1=cirrus ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14 ata1: enabled=1, ioaddr1=0x170, ioaddr2=0x370, irq=15 ata0-master: type=disk, path="c.img" #ata0-slave: type=disk, path="d.img" #ata1-master: type=disk, mode=vvfat, path=/sdcard/HDD, journal=vvfat.redolog #type=cdrom, path="CD.ISO", status=inserted boot: c config_interface: textconfig #display_library: x # other choices: win32 sdl wx carbon amigaos beos macintosh nogui rfb term svga log: bochsout.txt sb16: enabled=1 mouse: enabled=1 sb16: wavemode=1, dmatimer=500000 clock: sync=none, time0=1

For more Information about bochsrc configuration visit http://bochs.sourceforge.net/doc/doc...r/bochsrc.html
megs: ram in MB you will give the machine.
I use 256 (Xperia Play) 300mb will crash your windows after a while.
4. Run bochs on Android.
Boot will take around 30 min, yeah it is really slow
---------------------------------------------------------
Notice
I used Nlite to resize and optimize windows xp before installing it.
here some screenshots:
http://imageshack.us/photo/my-images...7566148311.png
http://imageshack.us/photo/my-images...7565583563.png
http://imageshack.us/photo/my-images...7569555412.png
http://imageshack.us/photo/my-images...7569773009.png
http://imageshack.us/photo/my-images...7569992581.png

 

xda-developers.com

9/10/14

on Leave a Comment

Boot WINPE over PXE on a UEFI computer

Here below some drafts notes on how to boot WINPE on a UEFI computers.

1/Files you need from your windows x64 dvd

-\efi\boot\bootx64.efi file (1)
-\efi\boot\bcd file (2)
-\efi\boot\boot.sdi file (3)
-\efi\microsoft\boot\fonts folder (4)
-\sources\boot.wim (5)

If you dont find bootx64.efi, you can use bootmgfw.efi which is in install.wim on your dvd (sources folder).
Use 7zip to extract this file from the wim file and rename it to bootx64.efi

 

2/Files you need in your tftp root

-get in your tftp root
put bootx64.efi (from 1)
-create a SOURCES folder
put boot.wim in there (from 5)
-create a BOOT folder
put boot.sdi in there (from 3)
put bcd in there (from 2) / applies for Win8
-create a EFI/MICROSOFT/BOOT folder
put bcd in there (from 2) / applies for Win7
put the FONT folder in there (from 4)

You should end up with the following :
=>ROOT
-bootx64.efi
==>SOURCES
==boot.wim
==>BOOT
==boot.sdi
==bcd (for win8)
==>EFI/MICROSOFT/BOOT
==bcd (for win7)
===>FONTS
===*.ttf

3/Things you need to do on your boot.wim

Add the following winpeshl.ini (create it with notepad) file in your boot.wim (system32), making it a « cheap » winpe.

To modify your boot.wim, you can either mount/change/commit it with DISM (from the command line), or withCloneDisk or else modify it with wimlib :
wimlib-imagex update boot.wim 1 --command="add CustomWinpeshl.ini \Windows\System32\winpeshl.ini"


[LaunchApps]
%SYSTEMDRIVE%\Windows\system32\startnet.cmd
%SYSTEMDRIVE%\windows\system32\cmd.exe

4/Things you need to do in your PXE Server :

Set bootx64.efi as the bootp filename.

The UEFI + PXE boot process will be the following :
-pxe->bootx64.efi (from windows install dvd)->bcd (pointing to winload.efi)->boot.wim (x64 only)

as opposed to a legacy bios computer :
-pxe->pxeboot.n12 (from windows install dvd)-> bootmgr.exe -> bcd (pointing to winload.exe) -> boot.wim

Site note : you can use option dhcp 252 to decide which BCD file to load.
Can be handy when you want to switch from a UEFI computer to a legacy BIOS computer : efi\microsoft\boot or boot\bcd

tps_howto_uefi

side note : you can check if you booted on uefi with the following reg query HKLM\System\CurrentControlSet\Control /v PEFirmwareType Will output 0x1 for bios, 0x2 for uefi.

Cheers,
Erwan

Note that the following would aso work : PXE-> IPXE.efi ->MS Bootx64.efi ->BCD (winload.efi) ->Boot.wim (x64).

Ipxe script

#!ipxe
#change with you dhcp or proxydhcp server
set next-server 192.168.1.11
set filename boot/x64/bootmgfw.efi
chain tftp://${next-server}/${filename}

And changes to apply to your BCD : bcdedit.exe /store my.bcd /set {bootmgr} nointegritychecks yes

Mrbaduong. Được tạo bởi Blogger.