LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-25-2006, 05:27 PM   #1
branche_dude
LQ Newbie
 
Registered: Jul 2006
Posts: 7

Rep: Reputation: 0
Question Working with knoppix.sh


Hi..
I have a script that I would like to run when Knoppix 5 live-cd boots up in text mode. I have been looking at various knoppix.sh examples but I can't seem to understand it. My script, knoppix.sh and configs.tbz are on a USB thumb drive. At the boot options, I type knoppix lang=en myconfig=scan 2 so my knoppix.sh file is scanned and executed from my usb drive. However, I don't understand how I can include a command in knoppix.sh to run my script. Any help?

Thanks.

Last edited by branche_dude; 07-25-2006 at 05:35 PM.
 
Old 07-25-2006, 05:45 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
You should just be able to edit knoppix.sh in a text editor on your USB drive.
 
Old 07-26-2006, 12:40 AM   #3
branche_dude
LQ Newbie
 
Registered: Jul 2006
Posts: 7

Original Poster
Rep: Reputation: 0
Alright... I found how to do this.
If you want to run any of your own custom scripts once Knoppix finishes booting up, just place them in /home/knoppix/Desktop directory. Then from console, run "saveconfig" and a GUI dialog should pop up asking you which settings and files you want to save. Check 'Desktop' and uncheck everything else and save the files on some drive. This will generate a 'knoppix.sh' file and a 'configs.tbz' file, which contains all user-defined settings and scripts. Copy these files over to any portable medium you have (most likely a USB drive). Edit 'knoppix.sh' to include the following line at the end to run your script once Knoppix finishes booting up:

Code:
cp /home/knoppix/Desktop/myScript.sh /
./myScript.sh
That code just copies your script over to / directory and then executes it. Use the following command as a boot-up option to ensure Knoppix searches for a 'knoppix.sh' file to execute when booting up:

Code:
knoppix myconfig=scan
The reason why my script wasn't booting off a USB drive because it wasn't mounted when Knoppix is booting up. If I try to mount the USB drive and then run the script, Knoppix simply assigns a different device name to the USB drive.

Hope this helps out anyone looking to accomplish something similar.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mouse not working with knoppix cmitch06 Linux - Newbie 5 03-09-2006 03:21 AM
knoppix hd installer not working Anubis Linux - Distributions 1 07-04-2005 03:39 PM
how will i know if my knoppix 3.7 cd is working? yobobski Linux - Distributions 6 04-11-2005 09:07 AM
scanner working with knoppix sharonlim Debian 4 10-18-2004 03:21 AM
X not working in Knoppix Wynd Linux - Distributions 2 11-08-2003 01:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration