Results 1 to 6 of 6

Thread: Default myconf=scan and post startup command file

  1. #1

    Default myconf=scan and post startup command file

    First of all, I am a newbie. There, I said it.

    I am using Knoppix v5.1.1 CD.

    First, I would like to customise/remaster the existing CD image so that the boot default is to 'Try to find "knoppix.sh" automatically' without having to type the 'myconf=scan' command every time I boot.

    Secondly, in this same new CD image, I would like to have a post startup command file invoked automatically. By post startup, I mean after Everything has finished starting.

    For consistency sake, this post startup command file should be in the same /device/partition/directory that the 'myconf=scan' command found the 'knoppix.sh' file in. Through some programmatic method, I assume that the location of the 'knoppix.sh' that was used is stored or can be retrieved.

    Using this /device/partition/directory information, I would want a command sequence that would say 'IF 'POST STARTUP COMMAND FILE' EXISTS, THEN RUN FILE'.

    With these two options, I hope that I (and others) will to be able to use this CD image in multiple ways without having to re-customise it again.

    Can I get some feedback on this please?

    Very simple instructions and on-line examples are GREATLY appreciated.

    Thanks.

  2. #2
    Senior Member registered user
    Join Date
    Jan 2005
    Location
    UK
    Posts
    282
    Heres the remastering howto:

    http://www.knoppix.net/wiki/Knoppix_Remastering_Howto

    Its about 18 A4 pages. There's no way you can acheive what you want to do, you need about 3 years minimum experience, and be fa,iliar with the command line, bash, linux partitions and devices.

    Auto running a command, can be acheived by placing a script in /home/knoppix/.kde/Autorun as its the default window manager, which will involve remastering the CD and working in the chroot environment.

    To use the parameters myconf=scan involves working with the minirt.gz file expanding this file and working with linuxrc, as I said its not easy even for an accomplisehed linux user but you can start with the howto.
    Hope that helps

  3. #3

    There's no way you can acheive what you want to do?

    hal8000,

    Thank you very much for your reply to my requests.

    I will look at the remastering howto link that you provided and try to learn how to do that.

    You stated 'There's no way you can acheive what you want to do'. Can you please elaborate on what you mean?

    I want to make 'myconf=scan' the boot default and I want to run a post startup command file automatically. Can you (or anyone) please explain which of these two requests cannot be done and/or what makes it so difficult to do?

    Thank you for the help.

  4. #4
    Senior Member registered user
    Join Date
    Jan 2005
    Location
    UK
    Posts
    282

    Re: There's no way you can acheive what you want to do?

    Quote Originally Posted by longlostname
    hal8000,

    Thank you very much for your reply to my requests.

    I will look at the remastering howto link that you provided and try to learn how to do that.

    You stated 'There's no way you can acheive what you want to do'. Can you please elaborate on what you mean?

    Thank you for the help.
    Hi, the rest of my sentence stated that you needed a minimum of 3 years experience working with linux. In your first post one you stated
    youre a newbie, this is no job for a beginner and thats why I recommended a minimum period of 3 years. The howto explains what to do,
    but you need the experience first, as its complicated and you need to know exactly what youre doing.

    How much experience of working wih linux do you have?
    Have you worked with the terminal before or in bash?
    This is a pre-requisite for following any procedure.
    Do you know which keys are tilde, hash, pipe and backtick for example?
    Can you use the editor vi or emacs or nano?
    You must be able to do all the above just to follow the howto.

  5. #5

    Re: There's no way you can acheive what you want to do?

    hal8000,

    Thank you for your follow-up.

    Most of my experience is with almost all of the different flavors of Windows and DOS. My experience with Linux is sporadic and limited. I truly prefer a GUI text editor and refuse to use VI. My experience with bash is carry over from DOS batch files and on-line bash tutorials. I have an programming background, just not with linux/shells.

    This is what I have been able to collect so far:

    ************************************
    From the O'Reilly reference, I have found that you can put a knoppix.sh into your CD burn and it will execute each time you boot:
    //////////////////////////////////////
    http://www.oreillynet.com/sysadmin/b...out_remas.html
    Remaster Knoppix without Remastering
    You can even burn a knoppix.sh script to a Knoppix CD provided all of the other files remain the same. Put the knoppix.sh file and any tarballs it needs into the KNOPPIX directory on the CD and it will execute the script when it boots.
    //////////////////////////////////////

    So, I have quickly thrown together the following knoppix.sh to be put into the \KNOPPIX directory of my new Knoppix CD burn. I am uncertain of the syntax having not yet tried it, but I feel that you will get the idea of what I am trying to accomplish. It will check each hard drive for a knoppix.sh file and if it does find one, it will execute it and exit the procedure.

    \KNOPPIX\knoppix.sh
    -------------------------------------
    #!/bin/sh


    if [ -e /media/hd1/knoppix.sh ]
    then
    . /media/hd1/knoppix.sh
    exit
    fi

    if [ -e /media/hd2/knoppix.sh ]
    then
    . /media/hd2/knoppix.sh
    exit
    fi

    if [ -e /media/hd3/knoppix.sh ]
    then
    . /media/hd3/knoppix.sh
    exit
    fi

    if [ -e /media/hd4/knoppix.sh ]
    then
    . /media/hd4/knoppix.sh
    exit
    fi

    if [ -e /media/hd5/knoppix.sh ]
    then
    . /media/hd5/knoppix.sh
    exit
    fi

    if [ -e /media/hd6/knoppix.sh ]
    then
    . /media/hd6/knoppix.sh
    exit
    fi

    exit
    -------------------------------------

    From the Linux Journal, they describe the ways to save/create the knoppix.sh and configs.tbz files:
    //////////////////////////////////////
    Remaster Knoppix without Remastering
    http://www.linuxjournal.com/article/10075
    To run saveconfig, click K→Knoppix→Configure→Save Knoppix Configuration or type saveconfig in a terminal.
    //////////////////////////////////////

    This will save the configs.tbz and knoppix.sh to the root directory of one of the hard drives so that they can be found at boot time by the \KNOPPIX\knoppix.sh command file.

    How does it look so far?

    Thanks for your help.

  6. #6
    Senior Member registered user
    Join Date
    Jan 2005
    Location
    UK
    Posts
    282
    OK, I see what you are trying to do. In your script:

    #!/bin/sh


    if [ -e /media/hd1/knoppix.sh ]
    then
    . /media/hd1/knoppix.sh
    exit
    fi
    --snip--

    Two small errors:
    1) mount point are /media/hda1 not hd1
    2) ./media/hda1/knoppix.sh executes this line from the current directory, remove the leading period and it will execute ok, however


    You dont need to write this, follow the remaster instructions but expand /boot/isolinux

    simply rewrite the isolinux.cfg

    line with your boot parameters scan=myconf and append your knoppix.sh shell script and your remaster should work

Similar Threads

  1. Make "myconf=scan" default
    By swp009 in forum Ideas
    Replies: 4
    Last Post: 11-18-2006, 07:09 PM
  2. problem adding "myconf=scan home=/dev/sda1" to iso
    By FlameWeasel in forum Customising & Remastering
    Replies: 0
    Last Post: 11-24-2005, 05:08 PM
  3. default config scans on startup
    By Harry Kuhman in forum Ideas
    Replies: 13
    Last Post: 02-24-2005, 05:16 PM
  4. Replies: 1
    Last Post: 02-18-2004, 09:32 PM
  5. startup command
    By nighty in forum General Support
    Replies: 1
    Last Post: 10-16-2003, 02:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


1U Supermicro Server 10 Bay 2x Intel Xeon 3.3Ghz 8C 128GB RAM 240GB SSD 2x 10GBE picture

1U Supermicro Server 10 Bay 2x Intel Xeon 3.3Ghz 8C 128GB RAM 240GB SSD 2x 10GBE

$259.00



1U BareMetal pfsense opnsense Router Firewall DNS Server 6x 10GB Ethernet Ports picture

1U BareMetal pfsense opnsense Router Firewall DNS Server 6x 10GB Ethernet Ports

$149.00



HPE ProLiant MicroServer Gen10 picture

HPE ProLiant MicroServer Gen10

$420.00



SuperMicro Server 505-2 Intel Atom 2.4GHz 8GB RAM SYS-5018A-FTN4 1U Rackmount picture

SuperMicro Server 505-2 Intel Atom 2.4GHz 8GB RAM SYS-5018A-FTN4 1U Rackmount

$202.49



HPE ProLiant MicroServer Gen10 Plus v2 Ultra Micro Tower Server - 1 x Intel Xeon picture

HPE ProLiant MicroServer Gen10 Plus v2 Ultra Micro Tower Server - 1 x Intel Xeon

$846.48



HP ProLiant MicroServer Gen10 Plus - 16GB RAM No HDD picture

HP ProLiant MicroServer Gen10 Plus - 16GB RAM No HDD

$500.00



SuperMicro SuperServer 5018A-FTN4 505-2 Intel Atom @ 2.4GHz 8GB w/ Ears  picture

SuperMicro SuperServer 5018A-FTN4 505-2 Intel Atom @ 2.4GHz 8GB w/ Ears

$174.99



Supermicro 1U Server X9SRI-F Xeon E5-2640 v2 2.5Ghz 16-Cores / 64GB / No HDD picture

Supermicro 1U Server X9SRI-F Xeon E5-2640 v2 2.5Ghz 16-Cores / 64GB / No HDD

$149.99



Super micro Server picture

Super micro Server

$168.00



Supermicro 2U Server 12 Caddy Bay 3.5 LFF E ATX Storage Chassis SAS2 6GBPS Rail picture

Supermicro 2U Server 12 Caddy Bay 3.5 LFF E ATX Storage Chassis SAS2 6GBPS Rail

$199.00