How to edit image KNOPPIX


Forum: DSL Tips and Tricks
Topic: How to edit image KNOPPIX
started by: Anshik

Posted by Anshik on Oct. 03 2006,13:15
I've install DSL on usb. I want to edit KNOPPIX image, to run my script, at the init3.
Thank you.

Posted by ^thehatsrule^ on Oct. 03 2006,14:24
Editing it can be found under image 'remastering'.  There is an extensive thread on this in the forum by meo, among other resources (wiki, knoppix sites, etc).
Posted by hrwusesdsl on Oct. 08 2006,21:27
Editing almost any ISO is easiest with a program called "UltraISO" which runs under Windows.  UltraISO can be downloaded from CNET for free.  Full version costs around $20-$30.
Posted by ^thehatsrule^ on Oct. 08 2006,22:35
hrwusesdsl: he meant the KNOPPIX/DSL image, which is not the ISO image!

Anyways, if you want to edit iso's just do it under linux - it's free and included in many distros.

Posted by Anshik on Oct. 09 2006,14:18
i meen changing boot image: KNOPPIX. Compressed file system in /KNOPPIX/KNOPPIX

I want to edit KNOPPIX boot image, to run my script at the start.
Thank you.

Posted by roberts on Oct. 09 2006,15:46
Depending on the purpose of your script, it might server your purpose to use one of the many startup files that are natively writeable and can be easily be restore via the backup method..

/opt/bootlocal.sh - non X system scripts
.bash_profile      - non X user scripts
.xinitrc               - user X scripts

Posted by mikshaw on Oct. 09 2006,16:31
You can also include a knoppix.sh script in the KNOPPIX directory (needs only a rebuild of the ISO), which will run before the /etc/init.d/dsl-config script.
Posted by hrwusesdsl on Oct. 12 2006,06:55
Here are some details about using Ultra ISO....

If you have windows - almost any version - UltraISO is easy.  Download UltraISO from CNET.  The free version of UISO will handle any ISO up to  300MB which is excellent for DSL.  

To edit a DSL ISO image, get the image file onto a FAT 16 or FAT 32 [[pre-XP Windows drive formats.]] hard drive partition.  

Then run UltraISO [[under Windows of course]] and tell UISO to "open" the ISO file.  You will see all the components of files within the ISO as is if the ISO were just another folder.  You edit this "folder" almost like any other [[but only with UISO]].  the you "save  as ISO" your new edited image.

You can burn ISO images really easily using K3B under KNOPPIX Linux.

Edited by HRW 2006 Dec 6

Posted by hrwusesdsl on Oct. 12 2006,07:08
Anshik, one more point.  mikshaw mentions the KNOPPIX.SH script and you mention init3.

I tried to learn a little about the KNOPPIX system and found it very arcane.  In particular the most critical script - KNOPPIX.SH i believe  [[ Correction: LINUXRC is script i looked at]] -  is erased upon boot up for God knows what reason.  I managed to get a copy of this script - forgot how;  maybe found a copy on th Net - but editing the main script requires more than just opening the ISO image.  

Edited by HRW 2006 Dec 6

Posted by Anshik on Oct. 12 2006,07:52
Thank you for complete advice!
Posted by mikshaw on Oct. 12 2006,13:35
Quote
which is ERASED upon boot up for God knows what reason

I don't know where this information comes from.  The knoppix.sh script doesn't exist in DSL to begin with...it is an optional script that the user can add to the boot process if desired.  It cannot be erased if added to the ISO because ISO is read-only, regardless of how it's mounted.

As far as I know, the only Knoppix initialization script is /etc/init.d/knoppix-autoconfig, which takes care of hardware detection and then runs knoppix.sh if it's found.  The knoppix-autoconfig script can also not be erased, for the same reason.

Posted by ^thehatsrule^ on Oct. 12 2006,14:19
I still cannot see how just using that 'UltraISO' program will allow you to remaster the dsl image (in /KNOPPIX/KNOPPIX)...
Posted by hrwusesdsl on Oct. 13 2006,23:51
APOLOGIES!    INCOMPLETE ADVICE!

Anshik, the primary Knoppix boot script is "linuxrc".  This script is packed into file "minirt24.gz."  which  is on your bootfloppy if you use a floppy, or in folder "BOOT"  on your CD or USB stick if you use ISOLINUX version of DSL.  SYSLINUX version slightly different.

"minirt24.gz"  is compressed.  On the bootfloppy, it is less than 1 MB but when it is decompressed it occupies 3-4 MB of drive space.  Thus you must first copy the ".gz" somewhere else to decompress if you are starting with a floppy.  Then   uncompress with:
gunzip   minirt24.gz

Above command will erase "minirt24.gz" and overwrite it with 3-4MB "minirt24".  Now,  "minirt24" is a ramdrive image -- ext2 filesystem.  To access the files within this image, mount the image  with
  mount -t ext2  -o loop minirt24  /t
where /t is a temporary folder created just for this mount  [["mkdir  /t"]].

After above, you will find file "linuxrc" in folder /t,  where you can edit it.  Since the ramdrive image is for a 3-4 MB drive, the folder /t must not contain more than 3-4 MB;   but there is soemthing like 500 KB of free space so you can do a ton of script editing without modifying the ramdrive parameters.  Unmounting the ramdrive then is all that is needed to leave the new contents in the image.  Than recompress the ramdrive image and you are done!

This is only for people who want to do really heavy Linux scripting.  Unnecessary for most for sure.

Posted by hrwusesdsl on Oct. 15 2006,22:16
Mr Hat:  Sometimes I just go off...... UltraISO utterly irrelevant in this thread!

Mr Mik:  "linuxrc" is the main boot script in most Live Linux CDs; authored by Klaus Knopper.  It is definitely in  "minirt24"   and "minirt24"  is indeed erased during boot.  At least before DSL 3 and UNIONFS.

Since I brought it up, here is more whacko irrelevancy...... You can edit ISO images with FreeDOS.  Yes, FreeDOS.  Just did it.  Program names to Google:
OMI.EXE      SHSUCDRD.EXE

One little problem with FreeDOS: I have not found a way to re-image the  ISO after editing.  It appears to me the DOS program  ISOBAR makes re-imaging possible but I have not yet verified this....

Posted by forkart on Oct. 20 2006,06:01
Quote (Anshik @ Oct. 03 2006,09:15)
I've install DSL on usb. I want to edit KNOPPIX image, to run my script, at the init3.
Thank you.

I use magiciso to edit knoppix iso image. it works without any problem.
< http://www.magiciso.com/ >

Posted by dreamcarrior on Nov. 26 2006,20:42
Quote (forkart @ Oct. 20 2006,02:01)
I use magiciso to edit knoppix iso image. it works without any problem.
< http://www.magiciso.com/ >

I tried magiciso to make a DSL 2.4 DVD along with many packages and Windows softwares. The total size is 4287MB. The DVD could boot to where DSL tried to load the knoppix image but then it failed. It returned that there is no knoppix image and then dropped to a very  basic shell. I checked the DVD and knoppix image is there. I also checked the DVD image properties, and the Rock Ridge option is on for linux systems.  Anyone knows what might have happened?

Posted by Juanito on Nov. 27 2006,03:48
What are the last few screen messages you get before the kernel tries to load the KNOPPIX image (delete the "quiet" boot option)?

Is there a message that the root filesystem is being mounted read-only? If so, this might be the problem.

Posted by hrwusesdsl on Dec. 06 2006,19:28
Dreamcarrior, I encountered the exact same problem - dropping to a very limited shell  after a customized disk burn -, so this may be relevant....

I burned a custom CD with DSL and other stuff.  I noticed that my custom CD had a folder named "knoppix" repeat "knoppix" - no caps - while just burning the ISO from Ibiblio created a folder named "KNOPPIX" - caps.

Linux is very touchy about caps.  And for some weird reason, every time I tried to create a folder named KNOPPIX on a vfat file system, the folder came out uncapitalized.  So I re-mastered my DSL CD using folder /ramdisk while DSL was running.  /ramdisk under DSL is an ext2 filesystem.  

It worked.  KNOPPIX in caps was created with:
" mkdir /ramdisk/workfolder2 "
" mount  -o loop /mnt/sda1/dsl-image  /mnt/sda1/workfolder1/ "
" cp -dpr /mnt/sda1/workfolder1/*  /ramdisk/workfolder2/ "
then I added stuff to " workfolder2 "  then I used mkisofs to create a new ISO image output back on drive sda1.  

Only problem with this is that my /ramdisk is limited to about 300 MB, so this will not work for your 4 GB DVD.  You will need a hard drive with an ext2 partition.  Assuming capitalized folders on vfat is the source of your problem.

Posted by ^thehatsrule^ on Dec. 06 2006,19:43
If that was your problem, you can boot with knoppix_dir=knoppix instead if you only have access to vfat partitions.
Posted by uddevil on Dec. 14 2006,17:53
i don't think it will help, but i've used isomaster to edit knoppix's image, and there's no problem at all. on linux, my dvd can boot into dsl 3.1, and on w*ndows, it still be used as a w*ndows software collection

hxxp://littlesvr.ca/isomaster/downloads.php


(damn!!! why english is so hard to learn >.<)

Posted by hrwusesdsl on Dec. 18 2006,07:56
Mr. Hat:  I tried  boot option "knoppix_dir="  a couple dozen times in every conceivable form,  like knoppix_dir=/cdrom/knoppix or knoppix_dir=knoppix or knoppix_dir=/dev/scd0/knoppix et cetera.  Nothing worked.  Every case led to bright red error message  "dropping to a very limited shell".....  I also tried using "knoppix_dri=" option on good, bootable DSL CD [[with CAPITALIZED knoppix folder name]] like knoppix_dir=KNOPPIX.  Using boot option led to "limited shell" while no option boots OK - regardless of various forms tried.  Seems knoppix_dir boot option broken on linux24.  [[I am using DSL 2.2B]]
Posted by ^thehatsrule^ on Dec. 18 2006,16:52
hrwusesdsl: what device are you using? If you are using some usb, you may want to use dsl-embedded's minirt because that one I believe looks in more devices.
Posted by emj on Dec. 19 2006,03:13
Quote (hrwusesdsl @ Dec. 18 2006,02:56)
Seems knoppix_dir boot option broken on linux24.  [[I am using DSL 2.2B]]

Did those options work before? Samething happened to me, I ended up editing those variables in minirt24.gz/linuxrc directly.
Posted by ^thehatsrule^ on Dec. 19 2006,03:46
hm, for the 2.x versions where they used the 2.4.31 kernel - I'm not sure.
Posted by hrwusesdsl on Dec. 20 2006,08:53
"knoppix_dir"  boot option never worked for me nohow, noway, ever, at all.  I am booting straight from CD.  Kernel is  2.4.26.
Posted by ^thehatsrule^ on Dec. 20 2006,19:28
That was probably due to your filesystem - test it with ext2 if you want to try it though.
Posted by hrwusesdsl on Dec. 20 2006,19:38
Dreamcarrior, I just learned something very interesting.  When I had trouble creating a capitalized folder name on a VFAT file system, I was using "mkdir" from BusyBox, WHICH IS A MINIMALIST LINUX COMMAND SYSTEM.

The full-power "mkdir" is available in MyDSL extension package COREUTILS.UCI.  So assuming folder name capitalization is your problem, maybe the full-power "mkdir" in COREUTILS.UCI is the cure.  I would like to hear if you solve your problem.  Sounds like a great idea - giant DVD of  software.

Crossing posts here.  Post from Mr Hat showed up while I was entering above.

Mr Hat:  I am currently booting a customized DSL CD which was assembled on an ext2 filesystem -- subfolder under /ramdisk running full KNOPPIX LINUX.  The "mkisofs" then took the ext2 folder as input and output an iso file on a VFAT external USB drive.  Said iso then burned onto CD with K3B.  It was this CD, built on an ext2 fs, which refused to boot when trying various forms such as knoppix_dir=/cdrom/KNOPPIX;  knoppix_dir=KNOPPIX;  et cetera.

Edited by HRW 2006-Dec-20-14:38

Posted by cosmoOne on Feb. 12 2007,06:20
Look for "DSL embedded writeable and modifyable" in the "DSL embedded" topic.  It might give you a starting point.
Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.