Difference between revisions of "Modify the final ISO image"

From ReactOS Wiki
Jump to: navigation, search
(weblinks -> wikilinks)
Line 38: Line 38:
 
So to substitute a file inside reactos.cab you'll have to recreate the cab file with all the files you need to put in it plus the script file.
 
So to substitute a file inside reactos.cab you'll have to recreate the cab file with all the files you need to put in it plus the script file.
  
The utility to create the cab file is cabman (\trunk\reactos\output-i386\cabman).
+
The utility to create the cab file is cabman (\trunk\reactos\output-i386\cabman), copy it to your tree root and from there do:
  
rbuild does this in a two steps process:
+
cabman.exe -C boot\bootdata\packages\reactos.dff -L output-i386\bootcd\reactos -I -P output-i386
  
cabman.exe -C boot\bootdata\packages\reactos.dff -L output-i386\cd\reactos -I -P output-i386
+
  cabman.exe -C boot\bootdata\packages\reactos.dff -RC output-i386\bootcd\reactos\reactos.inf -L output-i386\bootcd\reactos -N -P output-i386
 
 
  cabman.exe -C boot\bootdata\packages\reactos.dff -RC output-i386\cd\reactos\reactos.inf -L output-i386\cd\reactos -N -P output-i386
 
  
 
That's it for now.
 
That's it for now.
  
 
[[Category:Tutorial]]
 
[[Category:Tutorial]]

Revision as of 21:31, 30 July 2010

There are times when you need to modify certain files in the final CD. Why you ask? Because you don't know how to code or compile and have a binary file ready, or the file doesn't come from our tree, or just for testing purposes. In case you want to know how to add files see slipstreaming.

To do it you could use an iso utility, but as far as I know there's none free, so with these steps you'll accomplish the task without any extra tools other than RosBE.

First, prepare the necessary files to build the iso image:

make install

This will create the files structured as they would be in the iso image in this location: \trunk\reactos\output-i386\cd

(location depends on your platform (i386 in this case) and on where you downloaded the source code in your computer).

Once done you'll see this structure:

loader
reactos
autorun.inf
freeldr.ini
icon.ico
readme.txt

With this procedure you can substitute any file, just replace the file you want to change in the cd folder with yours.

You'll find single files there, those are the basic needed files (like ntoskrnl.exe, uniata.sys, pci.sys, etc.) to boot and start first stage (usetup).

Once you have replaced the file(s), all you need to do to create the iso image is:

cdmake -v -p -b \trunk\reactos\output-i386\cd\loader\isoboot.bin \reactos\output-i386\cd\ modified-bootcd.iso

With this command you're telling cdmake which iso image use to boot from the cd, where to grab the cd structure from, and where to store the iso image.

cdmake is here: \trunk\reactos\output-i386\tools\cdmake (remember the location tip above)

This is for those files mentioned above, but what happens with the other files? Like for example vbemp.sys, which is stored in reactos.cab?

This is a tricky part, a cabinet file is a file containing several other files inside (like a zip file), but in this case our cabinet contains also a setup script.

So to substitute a file inside reactos.cab you'll have to recreate the cab file with all the files you need to put in it plus the script file.

The utility to create the cab file is cabman (\trunk\reactos\output-i386\cabman), copy it to your tree root and from there do:

cabman.exe -C boot\bootdata\packages\reactos.dff -L output-i386\bootcd\reactos -I -P output-i386
cabman.exe -C boot\bootdata\packages\reactos.dff -RC output-i386\bootcd\reactos\reactos.inf -L output-i386\bootcd\reactos -N -P output-i386

That's it for now.