[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: saving cheatcodes



Hi,

Jeffery Mewtamer wrote:
> There was a part of me that wondered if plain text files within an iso
> could be edited by hex editing, but I thought it would be limited to
> say, replacing one two-letter language code with another two-letter
> language code and the like, but this makes such old school hacks sound
> much more useful.

A hex editor probably offers few convenience if you have to enlarge some
text piece in the middle of the file. For editing with a text editor, i'd
use the following procedure:

  # Better keep the original ISO unchanged
  cp KNOPPIX_V8.1-2017-09-05-EN.iso KNOPPIX_V8.1-modified.iso

  # Extract isolinux.cfg as disk file copied_isolinux.cfg 
  dd if=KNOPPIX_V8.1-modified.iso bs=1 skip=1912832 count=4166 \
     of=copied_isolinux.cfg

  # Edit file copied_isolinux.cfg with your favorite text editor.
  # Take care to end your valid text before byte 4166.
  # Everything else will be truncated by the next step.

  # Put the edited content back into the ISO (Important: conv=notrunc )
  dd if=copied_isolinux.cfg bs=1 count=4166 \
     conv=notrunc \
     of=KNOPPIX_V8.1-modified.iso seek=1912832

The numbers 934 * 2048 = 1912832 and 4166 may vary with KNOPPIX ISO
versions. Inquire them freshly by xorriso before you modify your own
Knoppix.

Control your success by mounting KNOPPIX_V8.1-modified.iso and looking
at the content of its /boot/isolinux/isolinux.cfg .
You should see your changed text and probably notice that less "#"
characters are shown at the end of the file. If your text editor reports
the number of bytes, then it should be exactly 4166.


Have a nice day :)

Thomas
 


Reply to: