They both are Buildpackage , complete and well structured as most modern BuildPkgonly require the net . As most BuildPkg ,the complexity is such thatit is no easy way to introduce linearly from

start ,but far better try tounderstand from the end ,and reclimb up the hill by looking here andthere in details.

The results from theBuild are either LiveXP.iso LiveXP_RAM.iso and LiveXP_WIM.iso

http://sourceforge.net/projects/toysbox/files/liveXP_Land/LiveXP_WIM.ISO/download
http://sourceforge.net/projects/toysbox/files/liveXP_Land/LiveXP.ISO.gz/download

Under Ubuntu (when I referto Ubuntu ,it means any standard modern linux distro,of course ),simply run

qemu -m 512 -cdromliveXP_xyz.iso


to observe.(qemu is aliasname of qemu-system-i386 .Allocate 512M is a minimum requirement)

The three live_winXP differonly in packaging ,but are all functional the same way :liveRamDisk

Packaging :

LiveXP.iso plain isofsstructure of a winXP_rootfs (vfat or ntfs)

LiveXP_RAM.iso thewinXP_rootfs is put inside a virtual_drive_file as a container insidethe iso

LiveXP_WIM.iso theWinXP_rootfs comes in compressed virtual_drive_file « WIM »

(like suqashfs_file in mostlivecd_linux)


The two first cases arequite common in linux ; the 2nd case container is simply araw_filedrive as

the one obtained withqemu-img .

The 3rd WIM image hascompression factor between ½ and 1/3 (better than simple gzip butless than squashfs ) It has an advantage over squashfs which isreadonly,in that it can be mounted R/W

so offline modifications arepossible ,and easy (with correct tools of course),while squashfsimage

need be mounted and copiedto somewhere before modif can be committed ,then repack back.

But both WIM and squashfs cannot be modified Inline ,when used as rootfs of the system .


So to examine the contents


mountany.iso /mntpoint

mountBootSDI.img /mntpoint (case of LiveXP_RAM image )


(under ubuntu-12.04 no moreneed to specify option -oloop ).

To examine the WIM imagethere are 3 possibilities

a usegimagex under LiveXP itself

b useimagex.exe /mount from inside winXP

c use 7zipin ubuntu to extract like


cd tmp ; 7z x../BootSDI.WIM.

To extract the image intothe tmp directory.


Alas, to reverse back toWIM,we don't know its structure ,so it is a need to use theoriginal_tool ,

namely imagex.exe or theGUI variant gimagex. (from LiveXP image)

After examination ofdifferent iso variants ,let's now experiment by creating usb_bootablefrom those iso_images.

Quite similar to linuxcases ,the only difficulty comes from the good understanding of theboot operation . Since Grub pretends to be TheGrandUnified like theTheoryOfEveryThing ,let's go for it

Livexp

and life is really simplerwith grub4dos (like grub1 or grub_legacy ,no fancy stuff asdynamically load modules ...to care about before use)


To convert LiveXP_Wim.iso toflash bootable (ufd or usb_stick) one can

1 Simply use HddBoot fromthe Build in the WimBuilder/ISO/ as explained from numerous tuto onrebootPro .

2 Under any standardlinux distro

One can also simply copy theiso_file_contents and put in a formatted fileimage,and make itbootable with grub4dos loader , as

./WimIso2Flash.shLiveXP_Wim.iso LiveXP_Flash


this will createLiveXP_Flash.img bootable image (currently limited by default to384MB).It is assumed under the current directory one has put there

grldr and NTDETECT.COM(unmodified)


The small but unpleasantthing comes from the fact that many « bootloader » inliveXP are just not

'invariant' ; they arepatched differently for each case !

For example setupldr.bin from original win2K3server is not the same as setupldr.bin inliveXP_WIM.iso ,the latter being a ntdetect.com « grafted »to the original setupldr.bin !!!!

What is called NTLDR ineach liveXP is ….quite different from yourpristine_ntldr_winxp_installed_inC. Let's just remember it ,we willget used .



The followingconvert2Livexp.tgz http://sourceforge.net/projects/toysbox/files/liveXP_Land/ConvertLiveXP2Flash.tar.gz contain


ConvertWimIso2Flash.sh

ConvertLiveXPiso2Flash.sh

grldr

NTDETECT.COM

bootlace.com


The

Convert-xyz.sh $1 $2


converts the liveIso-$1 toanyName_$2 which become anyName.img as bootable usb image.


Ex :



will create MyWimUsb.img of384M and can be booted with


qemu -m 512 MyWimUsb.img


./ConvertLiveXPiso2Flash.sh LiveXP.iso MyLiveXPusb


tested with

qemu – m 512 MyLiveXPusb.img




WimIso2Flash.sh :-------------------------------------------------------

#!/bin/bash

set -x

iso=$(mktemp -dtemp.XXXXXXXX)

loopiso=$(losetup -f)

losetup $loopiso $1

mount $loopiso ./$iso

qemu-img create $2.img 384M

fdisk $2.img <<EOF

n

p

1

a

1

t

6

w

EOF

looppart=$(losetup -f)

losetup -o 1048576$looppart $2.img

mkfs.msdos $looppart

loopdev=$(losetup -f)

losetup $loopdev $2.img

./bootlace.com $loopdev

part=$(mktemp -dtemp.XXXXXXXX)

mount $looppart ./$part

cp -a ./$iso/* ./$part

x86dir=$(ls ./$part | grep86)

cat > menu.lst <<EOF

default=

timeout=15

chainloader/$x86dir/SETUPLDR.BIN

EOF

cp grldr NTDETECT.COMmenu.lst ./$part

umount ./$iso

umount ./$part

losetup -d $looppart

losetup -d $loopdev

losetup -d $loopiso

rm -fr $part

rm -fr $iso

exit



ConvertLiveXPiso2Flash.sh : ---------------------------------------------------------

#!/bin/bash

set -x

iso=$(mktemp -dtemp.XXXXXXXX)

loopiso=$(losetup -f)

losetup $loopiso $1

mount $loopiso ./$iso

qemu-img create $2.img 384M

fdisk $2.img <<EOF

n

p

1

a

1

t

6

w

EOF

looppart=$(losetup -f)

losetup -o 1048576$looppart $2.img

mkfs.msdos $looppart

loopdev=$(losetup -f)

losetup $loopdev $2.img

./bootlace.com $loopdev

part=$(mktemp -dtemp.XXXXXXXX)

mount $looppart ./$part

cp -a ./$iso/* ./$part

cat > menu.lst <<EOF

default=

timeout=15

title 'LiveXP on usb'

chainloader/minint/SETUPLDR.BIN

title 'grub4dos'

chainloader +1

EOF

cp grldr./$iso/i386/ntdetect.com menu.lst ./$part

mv ./$part/i386 ./$part/minint

umount ./$iso

umount ./$part

losetup -d $looppart

losetup -d $loopdev

losetup -d $loopiso

rm -fr $part

rm -fr $iso

exit


In the following image

LiveXP-Iso-usb-wimIso2013-02-10 13:25:01.png


we see Three examples ofbooting LiveXP

qemu livexp.img one sees :

disk local (C:) virtual VHD represented by fileDRV livexp.img

lecteur CD (D:) virtual cdrom drive

imDisk (R:) virtual drive ramdisk as RW_temporary storage

BootDisk (X:) Ramdisk_LiveXP_proper (The winXP_live)

qemu -cdrom liveXP_wim.iso one sees :

WimPE (D:) virtual VCD represented by fileDRV_cdrom live_wim.iso

ImDisk (R:)

BootDisk(X:)

qemu LiveXPusb.img

Lecteur CD (D:) virtual Hd FileDrive a.k.a LiveXPusb.img

ImDisk (R:) R/Wstorage

Disk local (X:) Ramdisk_LiveXP_proper

when Livexp boots intoramdisk it requires imDisk to store all the needed RW when the systemruns (including at boot -networking pci_driver_IPstuff..)

The Bootdisk -although basedon ramdisk- mostly are not writable from inside the livexp system.

Since we boot under qemu,the Main_disk_rootfs is represented by fileDRVimage (either C:file.img / or D: file.iso above )


To produce a small liveXP ,Ibuilt with just explorer and what is needed ,from the Nuno's package

LiveXP#153.zip ,probably anupdated from the 20aug2011_livexp.zip

(the 1st « revival »of livexp).

Since our knowledge aboutthe Build itself is almost close to Nil,we need a lot of trials tokeep the

livexp_wim.iso down to 3OMb.

Doing this withLX-061412.zip is just matter of time,trials to understand which iswhat .

But more interestingly,doing the same thing with Nuno's LiveXP#153.zip you happen to learnmore !

Simply because the very 1sttime you will get into trouble ,the final Livexp_wim.iso does notboot !


Following the messageramdisk.sys is corrupted on the boot_screen ,try to understand in thefollowing way :


compare with theramdisk.sys that works (in the LX-061412 pkg.)

Compare the 2 scripts WimBoot.script folder_/Projects/LiveXP/Finish/2 Create Image#

compare theramdisk.sys_patch (read a little the script to get use of )

replace the good ramdisk.systo the right place a.k.a WimBootWaikFiles in folder/Workbench/Common

(have fun!)



Some more Tips :


A Once you have produced aworking piece of livexp.iso ,just run_script wimboot to getlivexp_wim.iso ,no need to restart from the beginning 'PlayBlueButton' or vice versa


B If you want to have readymany ppapps don't put them all on the livexp.iso

I would make a livexp nottoo big < 150Mb compressed , then remaster the live_iso by adding

a separate directory filledwith all the apps you build as portable ppapps zipped individually.

A simple minded menu.lst andthe following line as example is enough to remaster !


mkisofs -b grldr-no-emul-boot -boot-load-size 4 -boot-info-table -iso-level 2 -J-joliet-long -l -D -relaxed-filenames -N -V LiveXP_RAM -v -o../LiveXP_RAM31jan2013.iso .



My pc is by no wayhi-tech :

dualcore 2.4Ghz Ram 2Gb withinstalled

winxp 3.8Gb (very small,but if careful can be used to produce the 1st Livexp

from one of the 2 pkg above)

tinycorelinux-4.7.3 andubuntu12.04