PDA

View Full Version : Re-program knoppix.sh for USB2.0 enable...Success!!!!!



lilsirecho
07-12-2004, 05:51 PM
Desire to increase the loading speed from external USB install of knoppix3.4 (2.6 option).

Understand it may be done with changes to knoppix.sh but am unfamiliar with the program changes necessary to implement the USB enable.

My system includes USB 2.0 with athlon 1900+ and a7v333 mobo.

An associated question : if knoppix.sh is changed, will the loading speed change or is it unaffected ? I would expect the operating speed after install would be at 2.0 speeds while using the external drive for knoppix live programming.

I read one post some time ago on the subject but lost its location. :roll:

el_supremo
07-12-2004, 06:24 PM
If you're booting Knoppix from the USB device then I don't think that you can fix it with a change to knoppix.sh.
You have to edit linuxrc and burn a new CD.
Look for these two lines:

FOUNDUSB=""
for i in usb-uhci.o usb-ohci.o; do

and change the second line to:

for i in ehci-hcd.o usb-uhci.o usb-ohci.o; do

I loaded Knoppix onto my 1GB CompactFlash card and once I included the above fix in linuxrc it ran nearly three times faster.

Pete

lilsirecho
07-12-2004, 06:44 PM
el supremo;

I am anxious to try the change you recommend but am unfamiliar with the term "linuxrc".

I assume I can edit the knoppix lines if I utilize the above procedure.

The speed increase is welcome, for sure! :D

Please advise.

el_supremo
07-13-2004, 03:57 AM
linuxrc is a shell script in the "miniroot" filesystem on the Knoppix CD.
I forgot that you can boot from USB so your Knoppix image will be on a CF card or something similar and not on a CD, so it will be mounted as /mnt/sda1 or a similar name. It also means that you won't have to burn a CD once the miniroot has been modified.

This also assumes that you are using the Knoppix26 cheatcode. If you're using plain Knoppix (Linux V2.4) then change minirt26 to minirt24 everywhere below.

As root do (I've added # comment lines that don't need to be typed):


# make a directory for the loop device
mkdir /mnt/lp
# Get the compressed miniroot - change the name sda1 if necessary
cp /mnt/sda1/boot/isolinux/minirt26.gz minirt26.gz
# Uncompress it
gunzip minirt26.gz
# Mount it on the loop device
mount -o loop minirt26 /mnt/lp
# Copy the linuxrc file into the local directory
cp /mnt/lp/linuxrc linuxrc
#
# HERE you edit the linuxrc file with the editor of your choice and write it back out again.
# e.g. kate linuxrc
#
# And now we just put things back together
# It'll ask if you want to overwrite the old version, answer yes.
cp linuxrc /mnt/lp
# Now unmount the miniroot
umount /mnt/lp
# and recompress it to produce minirt26.gz again
gzip -9 minirt26

At this point you now have a modified minirt26.gz file.

Now all you have to do is copy it back to your USB card:


cp minirt26.gz /mnt/sda1/boot/isolinux/minirt26.gz

and reboot with fingers crossed :-)



Best Wishes
Pete

lilsirecho
07-13-2004, 04:13 AM
el_supremo;

Somehow the name fits the data you supplied!!

I will have great time performing this very helpful procedure.

Even before I get to the job, I give you my compliments. :D

lilsirecho
07-13-2004, 06:20 AM
el_supremo;

Have accessed the minirt.gz and gunzipped it.

I have found the ....FOUND USB =" "

I have the first line exactly as you posted.
--------------------------------------------------------------------------------
Your post FOUNDUSB=""
for i in usb-uhci.o usb-ohci.o; do



and change the second line to:


Code:


for i in ehci-hcd.o usb-uhci.o usb-ohci.o; do
------------------------------------------------------------------------------------
The second line is posted below;

FOUND USB=""
for i in usb-uhci.o usb-ohci.o; do .....first line
test -f /modules/scsi/$i && $INSMOD /modules/scsi/$i >/dev/null 2>&1 && .....second line...
---------------------------------------------------------------------------------------

To follow your instructions " change the second line", I have to delete the test -f...etc----------------------

Did you mean I should "add" the second line, leave the test-f in place.
:?

lilsirecho
07-13-2004, 04:41 PM
el_supremo;

Hoping you catch this request for clarification per the previous post!!!!

el_supremo
07-13-2004, 04:46 PM
FOUNDUSB=""
for i in usb-uhci.o usb-ohci.o; do
I was counting FOUNDUSB as the first line.
Just change the line with "for i ..." (second line) and you're done.
"test -f ...." would be the third line - don't change it.

Best Wishes
Pete

lilsirecho
07-13-2004, 05:27 PM
el_supremo;

I appreciate the clarification which indicates that the original line is replaced by the new ehci instruction.

I am about to try that and will report result.

Thanks for the info!

lilsirecho
07-13-2004, 06:12 PM
Edited the minirt26 file but am afraid I misunderstand the method of modifying the file.

Firstly, I have a USB HDD addressed as sda3 which I intend to load with the CD data (tohd=/dev/sda3).

To supply the corrected CD for USB 2.0, I intended to modify the minirt26 file and burn a new CD.

Having located the correct area and entered the new line in place of the old, I attempted to save the modified file.

I cannot save the file due to encoding mismatch.

I re-checked the procedure outlined in previous post and find that I need to understand the "loop" function. I do not have any "loop" program in my arch linux.

Perhaps you can guide me further?

lilsirecho
07-13-2004, 07:39 PM
el_supremo;

Tried other encodings with no luck even when they did save the file,,,the result after gzip and burn CD gave a no-go.

I have a possible solution which requires your file of minirt.26.

If you could send the file by e-mail (767mb) in gz format, I could insert it into the CD burn.

Just a thought.......

lilsirecho
07-13-2004, 10:21 PM
Actually the size of the file is 767.7kb...

E-mail addr n6re@mminternet.com










Ray

lilsirecho
07-13-2004, 10:28 PM
The file is small enough to put on a post, too? :D

lilsirecho
07-18-2004, 01:21 AM
After many exchanges via e-mail with el_supremo and numerous trials, the final CD burned today with USB2.0 enabled in the burned knoppix26 CD option of v3.4.

The hang-up in utilizing edits of the minirt26.gz file seemed to be the cloop.o version installed in my knoppix minirt26.gz file. After editing that exact minirt26.gz file from the knoppixLiveCD, the result was a good boot and USB2.0 enables file transfers at 17.9MB/sec.

The actual procedure is due to el_supremo because my use of his procedure did not produce the same result. Thus, I sent my file to him to edit and process and re-installed the result in a copied knoppixLiveCD file.

Mkisofs was then used to prepare the burn:

as ...su.....
mkisofs -pad -l -r -J -v -V "KNOPPIX" -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -hide-rr-moved -o /root/knoppix.iso /root/CD. (spaces are important).

The destination for the .iso file is /root and the source file is /root/CD. The file size is in my computer is 687.9MB.

I am indebted to el_supremo for his support. :D

eekarum
08-05-2004, 02:23 AM
Could I inquire what was the final solution to this problem ?

I couldn't get mine to autodetect EHCI either..

el_supremo
08-05-2004, 05:52 PM
The fix depends partly upon which USB2 device you are trying to use and which version of Knoppix you are using and how it is installed.
To load it manually each time after a reboot you can try typing the command:
modprobe ehci-hcd
in a root shell.
To have that driver automatically loaded during boot up requires that you modify the linuxrc file in the minirt##.gz (## = 24 or 26).

Best Wishes
Pete