Jump to content











Photo

Simple method to SDI booing ....


  • Please log in to reply
29 replies to this topic

#1 proton

proton

    Member

  • .script developer
  • 77 posts

Posted 08 October 2006 - 08:32 PM

I found a nice work for booting BartPE from CD using SDI on 911CD forum by "mr.fly" at 911CD Forum So the full credit goes to mr.Fly.I thank him for posting such a nice work.Also to some people here who suggested me to look at 911CD forum and from there i got all the idea.At first i thought the SDI file may need some additional system components from Windows XP.So i created a BartPE and tested the idea & it worked.Next i created WinBuilder's PE & tested with it.It worked like a charm !!.So here it is in its simplest form.

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 thunn

thunn

    Silver Member

  • .script developer
  • 531 posts
  • Location:Brooklyn, New York
  • Interests:computers<br />mechanics<br />distortion<br /><br />
  •  
    United States

Posted 09 October 2006 - 03:54 AM

SDI images use a 'loader' from WindowsXP Embedded and have been around for a couple years now.
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? :P

#3 Alexei

Alexei

    Silver Member

  • .script developer
  • 664 posts

Posted 09 October 2006 - 09:37 AM

Files 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

@proton
My congratulations :P

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 :P
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.
:P
Alexei

#4 smiley

smiley

    Silver Member

  • .script developer
  • 905 posts
  •  
    Greece

Posted 09 October 2006 - 10:12 AM

@ ALL:
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 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 10 October 2006 - 10:58 AM

I may add that newish releases of Grub4DOS can chainload SDI images:
http://www.911cd.net...mp;#entry121788

jaclaz

#6 Yorn

Yorn

    Frequent Member

  • Advanced user
  • 178 posts
  • Location:United States

Posted 10 October 2006 - 02:02 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?

#7 TheHive

TheHive

    Platinum Member

  • .script developer
  • 4171 posts

Posted 10 October 2006 - 02:46 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?

Thats a good point.

#8 proton

proton

    Member

  • .script developer
  • 77 posts

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 smiley

smiley

    Silver Member

  • .script developer
  • 905 posts
  •  
    Greece

Posted 10 October 2006 - 04:18 PM

Proton is right.You will see that if you zip a upxed file, the size will be almost the same (the ntfs copmression algorithm is like the zip one). Moreover, if you upx the file , you wil need very much time.

#10 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 10 October 2006 - 04:49 PM

@Yorn
Moreover the memory footprint will greatly increase, see my post here (and related link):
http://www.boot-land...?...post&p=3445

jaclaz

#11 proton

proton

    Member

  • .script developer
  • 77 posts

Posted 10 October 2006 - 08:02 PM

I would like to remove the RamDisk

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 smiley

smiley

    Silver Member

  • .script developer
  • 905 posts
  •  
    Greece

Posted 10 October 2006 - 08:12 PM

@ Proton: Can you post the steps you followed in the tutorials forum? You can also provide links to microsoft files. :P


John

#13 proton

proton

    Member

  • .script developer
  • 77 posts

Posted 10 October 2006 - 09:38 PM

@ Proton: Can you post the steps you followed in the tutorials forum? You can also provide links to microsoft files. :P
John

@smiley

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 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

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,&#34;%ProjectInfo%&#34;,&#34;RamDrive&#34;,&#34;DriveLetter&#34;,<your startup drive>&#58;
autoLocalization then defines 'documents and settings' to be on the startup drive (X:)
Shortcuts etc. should (reading from registry) use the actual values.

Peter

#15 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 15 October 2006 - 01:09 PM

I would like to remove the RamDisk

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

See here
Peter

#16 proton

proton

    Member

  • .script developer
  • 77 posts

Posted 15 October 2006 - 05:29 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

#17 smiley

smiley

    Silver Member

  • .script developer
  • 905 posts
  •  
    Greece

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 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

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 Nuno Brito

Nuno Brito

    Platinum Member

  • .script developer
  • 10549 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 15 October 2006 - 08:36 PM

I doubt that these compressed files are ever needed again after rebooting the system since they will remain loaded in memory - but how would this improve the building since the difference isn't so big?

Nice testings proton! :P

#20 proton

proton

    Member

  • .script developer
  • 77 posts

Posted 15 October 2006 - 09:13 PM

Thanks all,

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 smiley

smiley

    Silver Member

  • .script developer
  • 905 posts
  •  
    Greece

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 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

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.au3
PreISOScript could add e.g.
del %systemroot%\system32\*.reg

del %systemroot%\system32\*.au3

del %systemroot%\system32\autoit3.exe
Peter

#23 smiley

smiley

    Silver Member

  • .script developer
  • 905 posts
  •  
    Greece

Posted 16 October 2006 - 08:26 AM

PreISOScript could add e.g.

del %systemroot%\system32\*.reg

del %systemroot%\system32\*.au3

del %systemroot%\system32\autoit3.exe
Peter


No! This will delete the above files before the iso file is created and shortcuts will not work!

#24 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 16 October 2006 - 10:21 AM

No! This will delete the above files before the iso file is created and shortcuts will not work!

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

#25 proton

proton

    Member

  • .script developer
  • 77 posts

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