Difference between revisions of "Modify the final ISO image"

From ReactOS Wiki
Jump to: navigation, search
(Update (part 1))
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
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 this [http://www.reactos.org/wiki/index.php/HOWTO/Slipstreamfiles how-to].
+
{{outdated}}
 +
There are times when you need to '''modify''' certain files in the final CD, generally 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 [[Slipstream files|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 [http://www.reactos.org/wiki/index.php/Build_Environment RosBE].
+
To do it you could use an existing iso utility such as e.g. mkisofs; however this can be accomplished without any extra tools other than those of [[Build Environment|RosBE]].
  
 
First, prepare the necessary files to build the iso image:
 
First, prepare the necessary files to build the iso image:
Line 26: Line 27:
 
Once you have replaced the file(s), all you need to do to create the iso image is:
 
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
+
cdmake -v -p -b \trunk\reactos\output-i386\bootcd\loader\isoboot.bin \reactos\output-i386\bootcd\ cd_label modified-bootcd.iso
  
With this command you're telling cdmake which isomage use to boot from the cd, where to grab the cd structure from, and where to store the iso image.
+
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)
 
cdmake is here: \trunk\reactos\output-i386\tools\cdmake (remember the location tip above)
Line 34: Line 35:
 
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 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 and I still haven't found out the correct way to do it. I'll add my info here and hope someone will add/correct the missing parts in case I don't figure it out.
+
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.
  
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
  
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.
+
That's it for now.
 +
 
 +
== See Also ==
 +
*[[Cdmake]]
  
The utility to create the cab file is cabman (\trunk\reactos\output-i386\cabman).
+
[[Category:Tutorial]]
rbuild uses this to create it: $(CABMAN_TARGET) -C %s -RC %s -L %s -N -P $(OUTPUT)$(Q)
 

Latest revision as of 14:34, 20 February 2016

This page is probably outdated

The information on this page might not be valid for the current state of ReactOS.
A Wiki Administrator should look at this page and decide or discuss what to do with it.


There are times when you need to modify certain files in the final CD, generally 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 existing iso utility such as e.g. mkisofs; however this can be accomplished without any extra tools other than those of 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\bootcd\loader\isoboot.bin \reactos\output-i386\bootcd\ cd_label 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.

See Also