Simple method to SDI booing ....
#1
Posted 08 October 2006 - 08:32 PM
Advantage of SDI Image :
1.Windows drive is writable
2.So,No need for the extra ramdrive
3.NTFS supports compression
4.So no need to UPX individual files anymore
Needed tools :
1.WinBuilder package
2.Windows XP-SP2 setup disk,Some files from w2k as required by ramboot
3.RoboCopy.exe -> Free from microsoft or internet
4.Microsoft windows embedded studio -> Get windows xp embedded from microsoft (Free but Reg required).
Procedure :
1.Install Microsoft windows embedded studio
2.Use WinBuilder to build a standard project,Make iso,RamBoot necessary.
3.Use SDI Loader to create a new SDI image "WINPE.SDI" of the size ~45MB (To hold all your target folder + some extra space)
4.The image will already be mounted as an unformated & unpartitioned HDD.
5.Use DiskManagement tool to create an NTFS compressed partition on the newly created image & give it drive letter "X:"(Can be anything you like).
6.Use RoboCopy to copy folders target\I386 & target\programs to your newly mounted HDD.
Use -> Robocopy.exe "c:\WinBuilder\target\I386" X:\I386 /e /e /w:1
Use -> Robocopy.exe "c:\WinBuilder\target\programs" X:\programs /e /e /w:1
(Normal explorer cannot copy as the NTFS compression algorithm takes a little long).
RoboCopy will complain about image full !!.But dont worry it will retry & copy them nicely.
7.UnMount the SDI using SDI Loader.
8.Create a temporary folder "SDICD"
9.Create a text file "WINNT.SIF" in SDICD\WINNT.SIF with the following contents
[SetupData]
BootDevice = "ramdisk(0)"
BootPath = "\i386\System32\"
OsLoadOptions = "/noguiboot /fastdetect /minint /rdimageoffset=36352 /rdpath=WINPE.SDI"
In the above the /rdpath must specify the name of your SDI file
10.Copy C:\WinBuilder\Target\BOOTSECT.BIN to SDICD\BOOTSECT.BIN
11.Create a Sub folder in SDICD\I386
12.Copy C:\WinBuilder\Target\I386\NTDETECT.COM & SETUPLDR.BIN to SDICD\I386
13.Run mkisofs.exe -iso-level 4 -volid "SDIPE" -A PEBUILDER/MKISOFS -sysid "Win32" -no-emul-boot -b BOOTSECT.BIN -hide BOOTSECT.BIN -hide boot.catalog -o C:\WinBuilder\ISO\SDIPEISO.ISO "SDICD"
I used MagicISO to create the ISO & used the BOOTSECT.BIN as bootimage file with no emulation & 4 sector counts.
Files in WINPE.SDI :
[I386]
-----[Fonts] -> No further subfolders / files shown
-----[inf] -> No further subfolders / files shown
-----[system32] -> No further subfolders / files shown
-----[WinSxS] -> No further subfolders / files shown
-----SETUPLDR.BIN
-----explorer.exe
-----WindowsShell.Manifest
-----NTDETECT.COM
-----BIOSINFO.INF
-----TXTSETUP.SIF
[programs] -> No further subfolders / files shown
[System Volume Information] -> No further subfolders / files shown
Files in final ISO :
WINNT.SIF
WINPE.SDI
[I386]
NTDETECT.COM
SETUPLDR.BIN
My kind request to the authors of MakeISO,RamDrive,AutoLocalization,Shortcut and other scripts :
Can you please make an option to use the SDI method.
I would like to,
1.Remove RamDrive
2.Disable UPX on all scripts otherwise during running it will have to be decompressed twice once by NTFS then by self.
3.Make AutoLocalization work without ramdrive
I tested it with Windows XP-SP2 source with english language
proton
#2
Posted 09 October 2006 - 03:54 AM
I only began using them recently, and what a delight. There are solutions that use VMware disks for a writeable medium, but .sdi technology from MS offers an easy route to building flexible images for use in ram, it's quickly becoming a standard for the PE community. I finally built a silent setup for just the SDI loader after using it so much.
Testing such projects can be tiresome as the builds don't run correctly out of SDI format.
Thankfully, use of the FBWF (from Vista) will facilitate a test platform.
However, plugins posted for FBWF have caused BSODs in many cases, and I have yet to get it running well.
As for addapting plugins for SDI use, it not that difficult. With a working plugin to start with, it's a matter of restructuring things to use only X:...(or not!...SDI runs everything after all!) I've done this for many apps and now have plugins broken into two groups.
Mind you 'plugins' referring to pebuilder plugins.
I found bouncing the build between 2 - 3 SDI volumes (copying from one to the next, & next) will allow for increasing compression with each dub, up to a point. I don't know where the ntfs compression level is set in xp, but that'd be nice to know. Anyone know 'bout that?
#3
Posted 09 October 2006 - 09:37 AM
@protonFiles in final ISO :
WINNT.SIF
WINPE.SDI
My kind request to the authors of MakeISO,RamDrive,AutoLocalization,Shortcut and other scripts :
Can you please make an option to use the SDI method.
I would like to,
1.Remove RamDrive
2.Disable UPX on all scripts otherwise during running it will have to be decompressed twice once by NTFS then by self.
3.Make AutoLocalization work without ramdrive
My congratulations
I'd like to add that "no-RamDrive" and "no UPX" are also needed to run the Build from HD
Also, it's not easy to get "XP embedded" stuff without installation, though it can be done
In addition I found this info http://blog.project84.net/ that may be useful. I believe, (temporary?) installation of the driver is not a big deal. I hope, SDI image of NTFS formatted disk can be encoded into the script.
Alexei
#4
Posted 09 October 2006 - 10:12 AM
1st) You can boot an SDI image with the setupldr from Win2003
2nd) You don't need to download the hole XP Embedded but only a little cab(I think its disk1.cab and it is 300kb )
3rd) I have already tried to create a FULLY automated script to load and create an SDI image but the existing scripts in 911 forums work only with english host. Ferengi said that he will try to create a complete script with VBS using the above VBS scripts.
Smiley
#5
Posted 10 October 2006 - 10:58 AM
http://www.911cd.net...mp;#entry121788
jaclaz
#6
Posted 10 October 2006 - 02:02 PM
#7
Posted 10 October 2006 - 02:46 PM
Thats a good point.Why not keep UPXing the files? I mean, even though it loads compressed, once it's expanded, it's essentially taking up RAM, so wouldn't it be better if we kept UPXing the file? Or does that break functionality somehow?
#8
Posted 10 October 2006 - 03:12 PM
Why not keep UPXing the files? I mean, even though it loads compressed, once it's expanded, it's essentially taking up RAM, so wouldn't it be better if we kept UPXing the file? Or does that break functionality somehow?
I don't get your point.
When the SDI image is NTFS formated with compression then all the files get compressed including UPXed one.
If we use UPXed files then here is what happens,
During build :
1.UPXed files compressed once during UPX.----> NOT Necessary
2.NTFS Compresses them again.-----> Ok acceptable
We may accept the above as it is done only during build.
During running (Reading the file for execution):
1.NTFS Decompresses & loads it into RAM ----> ok
2.The file itself Decompresses during execution by UPX decompress algorithm---> NOT OK
3.I hope that a compressed file will take more time to compress again as RLE compression algorithm will search very hard to compress it.I don't know if this same will apply during decompression also.
4.Double compression may only increase the size of the file instead of decreasing it.Because both compressions will add their own stuff (like compression table or somthing).During the second compression it will not be able to compress but will only add some extra stuff to the file.Try to Zip a file many time to find out.
So anyway the double compression is not required as it will only take more time to access the file both during writing & reading...
proton
#9
Posted 10 October 2006 - 04:18 PM
#10
Posted 10 October 2006 - 04:49 PM
Moreover the memory footprint will greatly increase, see my post here (and related link):
http://www.boot-land...?...post&p=3445
jaclaz
#11
Posted 10 October 2006 - 08:02 PM
But when i remove the RamDisk the AutoLocalization script gives error !!.
If i remove the AutoLocalization script also then my system fails to boot from the PE.
Can anybody help on this....
Thanks
proton
#12
Posted 10 October 2006 - 08:12 PM
John
#13
Posted 10 October 2006 - 09:38 PM
@smiley@ Proton: Can you post the steps you followed in the tutorials forum? You can also provide links to microsoft files.
John
What exactly you want me to post.I have posted the steps i followed in this thread.I don't understand please elaborate ....
thanks
proton
#14
Posted 15 October 2006 - 01:07 PM
My kind request to the authors of MakeISO,RamDrive,AutoLocalization,Shortcut and other scripts :
Can you please make an option to use the SDI method.
I would like to,
1.Remove RamDrive
2.Disable UPX on all scripts otherwise during running it will have to be decompressed twice once by NTFS then by self.
3.Make AutoLocalization work without ramdrive
I tested it with Windows XP-SP2 source with english language
proton
Try
1st disable RamDrive
2nd add to your script:
IniWrite,"%ProjectInfo%","RamDrive","DriveLetter",<your startup drive>:autoLocalization then defines 'documents and settings' to be on the startup drive (X:)
Shortcuts etc. should (reading from registry) use the actual values.
Peter
#16
Posted 15 October 2006 - 05:29 PM
I made it work,It was the Go2PDF creating the problem which is still not solved.Removing the go2pdf works fine.
Now that SDI is working i tried to remove some files after booting to free up space.
I removed these files *.au3,autoIt.exe,*.??_ without any error.Which freed about 3MB of space on X:
I think we need to make a .cmd file to remove these files automatically after successfull boot.
We must bypass the RecycleBin during deletion of these file.
Can someone tell me how to remove the above files automatically & safely.
I think all the *.??_ files are not required once the system is running....
proton
#17
Posted 15 October 2006 - 06:04 PM
Thanks PSC,
I made it work,It was the Go2PDF creating the problem which is still not solved.Removing the go2pdf works fine.
Now that SDI is working i tried to remove some files after booting to free up space.
I removed these files *.au3,autoIt.exe,*.??_ without any error.Which freed about 3MB of space on X:
I think we need to make a .cmd file to remove these files automatically after successfull boot.
We must bypass the RecycleBin during deletion of these file.
Can someone tell me how to remove the above files automatically & safely.
I think all the *.??_ files are not required once the system is running....
proton
The files *.au3,autoIt.exe are needed to create shortcuts and the *.??_ are compressed drivers.
I think that you can remove these file only after boot(including the compressed drivers) but i'm not 100% sure about it (it will defenetly reduse some functionality)
#18
Posted 15 October 2006 - 06:28 PM
I removed these files *.au3,autoIt.exe,*.??_ without any error.Which freed about 3MB of space on X:
I think we need to make a .cmd file to remove these files automatically after successfull boot.
We must bypass the RecycleBin during deletion of these file.
The autoIt files (as current state) are used during boot only for shortcuts etc.
We have to think about:
1st What about an app using autoIt?
2nd I'm not sure with *.??_ files. Most are really used during boot time only. But maybe there is one which is reused when starting an app.
So: Delete autoit.exe in my opinion is not wise.
To delete the (obsolete after boot) .au3 files:
@smiley
What about a 'RunOnce' reg entry in the PreISOScript to perform this job?
Peter
#19
Posted 15 October 2006 - 08:36 PM
Nice testings proton!
#20
Posted 15 October 2006 - 09:13 PM
1.I tested it by removing it after booting is over.
2.The AutoIT.exe could be had in physical "CDROM:\DLL" so that any app needing will get it.Ofcourse i did not delete it before creating shortcuts.I deleted it after it has been used.
3.As for the *.??_ files,I think the setup will detect the hardware,expand the required *.??_ file & load it.Afterwards(After booting is over) it will never be required unless some sort of USB device is inserted & in that case it will need the required *.??_ driver used by that USB driver.At present no other device is HOT pluggable maybe except modem.
4.My idea is to make a small PE in RAM.So that a PC with smallest memory can also work smoothly.
5.But at the same time without any compromise.Here is where the "CDROM:\DLL" folder comes handy.With its path hard coded in registry in the PATH environment, the system when needing a file will serach in the specified order given in the PATH variable.And if it could not find it in "windows" or "system32" folder then it will search the next path given in the PATH variable & find it there.
6.So we can have all these files also in "CDROM:\DLL" folder so that after it has been deleted from "windows" or "system32" folder it can always find it from "CDROM:\DLL".
7.Also we can try removing some other files which are not required afterwrds like minilogon.exe(Just may be).
I think the system always search for the DLL or other file required by an application in the following order.
1.Current folder from where the application is running.
2.Windows folder
3.system folder
4.Folder given in the path...
Also for the system to search the path given in PATH variable i think we must remove all "Known DLL" settings from the registry.Otherwise it will not load the required file (That is in the Known DLL list) from the path other than system32 folder.
There is need for detecting the end of boot process and calling a .cmd file to delete all these files automatically.
Thanks
proton
#21
Posted 16 October 2006 - 07:04 AM
To delete the (obsolete after boot) .au3 files:
@smiley
What about a 'RunOnce' reg entry in the PreISOScript to perform this job?
PreISOScript is used while building and not while booting. I have added this functionality because i needed to execute some commands just before the Iso creation. It doesn't have any efect after booting but before and after the Iso creation
#22
Posted 16 October 2006 - 08:08 AM
PreISOScript is used while building and not while booting. I have added this functionality because i needed to execute some commands just before the Iso creation. It doesn't have any efect after booting but before and after the Iso creation
My current autorun.cmd contains:
reg import go2pdf_inst.reg net start spooler reg import cplfix.reg Autoit3.exe %systemroot%\system32\shc.au3 autoit3.exe %SystemRoot%\system32\shellproc.au3PreISOScript could add e.g.
del %systemroot%\system32\*.reg del %systemroot%\system32\*.au3 del %systemroot%\system32\autoit3.exePeter
#23
Posted 16 October 2006 - 08:26 AM
PreISOScript could add e.g.
del %systemroot%\system32\*.reg del %systemroot%\system32\*.au3 del %systemroot%\system32\autoit3.exePeter
No! This will delete the above files before the iso file is created and shortcuts will not work!
#24
Posted 16 October 2006 - 10:21 AM
I think you misunderstand me.No! This will delete the above files before the iso file is created and shortcuts will not work!
autorun.cmd is executed at the end of the boot process and installs shortcuts etc.
At last task autorun.cmd should delete the files not longer necessary.
Peter
#25
Posted 16 October 2006 - 05:19 PM
I think you misunderstand me.
autorun.cmd is executed at the end of the boot process and installs shortcuts etc.
At last task autorun.cmd should delete the files not longer necessary.
Peter
I think :
Mr.Smiley is talking about "PreISOScript" which is executed during building of PE and before creating ISO.
Mr.PSC is talking about "autorun.cmd" which is executed during booting of the PE.
Proton
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users