Results 1 to 4 of 4

Thread: Auto execute script after boot

Hybrid View

  1. #1
    Junior Member registered user
    Join Date
    Oct 2004
    Posts
    15

    Auto execute script after boot

    Please, some advice. I have not been able to find an answer in the faq.

    I am running 3.7 from live cd. I wish to create a script and have it execute automatically when the knoppix boot is complete.

    Specifically, I have written a script that sets up ndiswrapper for my MN-720 wireless adapter and gets to the internet reliably. It would be nice if this script could run automatically after boot.

    Most of the info I could find in faq leads directly to re-mastering. This seems like overkill for what must be a common request.

    The faq link concerning editing knoppix.sh was empty. No info present. In any case, editing knoppix.sh would seem to require decompressing, editing and recompressing. This is possible, of course, but again, seems like a lot just to get a script to execute.

    I am wondering if there is a special file which knoppix looks for in the home directory, and if present, executes automatically on boot.

    Could someone please point me in the right direction?

    Thanks.

  2. #2
    Senior Member registered user
    Join Date
    Mar 2003
    Location
    Portland, OR USA
    Posts
    568
    Do you have a persistent home? If you do, then running your script would be as easy as saving it in somewhere in your persistent home directory and calling it from ~/.bash_profile.

  3. #3
    Administrator Site Admin-
    Join Date
    Apr 2003
    Location
    USA
    Posts
    5,441
    Quote Originally Posted by eco2geek
    Do you have a persistent home?..... as easy as .... calling it from ~/.bash_profile.
    OK, I'll byte. Clearly we are talking about running from a live CD since you mentioned a persistent home directory. What do you mean by as easy as calling it from bash_profile? Will this let it execute automatically as the post asked? Talk us idiots through it.

  4. #4
    Junior Member registered user
    Join Date
    Oct 2004
    Posts
    15
    Yahoo!!! Eco2geek, thank you so much. A couple of gotcha's but it is working as I type this.

    The gotcha's are:

    1. The file /knoppix/.bash_profile actually calls the file /knoppix/ .bashrc, so I finally had to put my script there. (I just put it in line at the end of .bashrc))

    2. When I first tried this while using the boot cheatcode myconf=scan, both .bash_profile and .bashrc apparently got overwritten and my script thus never was there to execute. When I boot without the cheatcode (using only home=/dev/hda3), it came up and worked. I will have to experiment with this tomorrow when I am more awake to better understand these seeming cheatcode interactions.

    Thank you again. I knew there had to be an easier way.

    For anybody who may be interested the text of my script to get wlan0 going (I use an MN-720 wireless adapter) is:

    cd /home/knoppix/GREG/WLAN0/MN-720
    sudo ndiswrapper -i mn720-ankh.inf
    sudo modprobe ndiswrapper
    sudo ndiswrapper -m
    sudo iwconfig wlan0 key restricted "my wep key"
    sudo iwconfig wlan0 essid any
    sudo ifconfig wlan0 up
    sudo pump -i wlan0

    There is probably a more elegant implementation, but this works for me.

    Thanks again.

Similar Threads

  1. knoppix.sh can't execute bash in the boot sequence?
    By slowhand in forum Customising & Remastering
    Replies: 1
    Last Post: 04-17-2005, 10:48 PM
  2. auto boot into 1024x768 w/o entering into boot: menu
    By HOLOTMO in forum Hdd Install / Debian / Apt
    Replies: 1
    Last Post: 04-04-2004, 08:08 AM
  3. A Live CD script for Auto Internet Login? (DSL)
    By bonecrusher in forum General Support
    Replies: 1
    Last Post: 03-05-2004, 11:17 AM
  4. Replies: 0
    Last Post: 10-22-2003, 07:25 PM
  5. How to make an auto CDROM mounting script?
    By Blue in forum Customising & Remastering
    Replies: 2
    Last Post: 06-26-2003, 12:02 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
  •  


Gigabyte 4U AI Server 10x Nvidia GPU 2x Xeon Gold 6150 36 Core 2.7GHz DDR4 RAM picture

Gigabyte 4U AI Server 10x Nvidia GPU 2x Xeon Gold 6150 36 Core 2.7GHz DDR4 RAM

$1625.00



Dell EMC PowerEdge R440 Xeon silver 4215 2.5GHz 16 GB ram  2x 550W PSU No HDD picture

Dell EMC PowerEdge R440 Xeon silver 4215 2.5GHz 16 GB ram 2x 550W PSU No HDD

$275.00



Microsoft Windows Server 2025 Standard 64Bit 16 Core-50 CALs DVD With Key Sealed picture

Microsoft Windows Server 2025 Standard 64Bit 16 Core-50 CALs DVD With Key Sealed

$49.99



867959-B21 HPE ProLiant DL360 G10 CTO Server W/ 2x 865414-B21 1x 840140-001 picture

867959-B21 HPE ProLiant DL360 G10 CTO Server W/ 2x 865414-B21 1x 840140-001

$245.00



Dell PowerEdge C4130 1U AI GPU Server | 2x E5-2680 v3 | 32gb Ram | 2x 1600W picture

Dell PowerEdge C4130 1U AI GPU Server | 2x E5-2680 v3 | 32gb Ram | 2x 1600W

$409.99



Windows Server 2022 | Intel 18-Core Xeon | 32GB ECC DDR4 | 256GB SSD | 3TB HDD picture

Windows Server 2022 | Intel 18-Core Xeon | 32GB ECC DDR4 | 256GB SSD | 3TB HDD

$635.00



Dell EMC PowerEdge R740 8 Bay Server w/ 32GB RAM 2x GOLD 6132 2x 1600W PSU H730p picture

Dell EMC PowerEdge R740 8 Bay Server w/ 32GB RAM 2x GOLD 6132 2x 1600W PSU H730p

$499.88



Dell PowerEdge R730XD 28 Core Server 2X Xeon E5-2680 V4 H730 32GB RAM No HDD picture

Dell PowerEdge R730XD 28 Core Server 2X Xeon E5-2680 V4 H730 32GB RAM No HDD

$378.93



Dell Poweredge R630 2x Xeon E5-2680 v3 2.5ghz 24-Core | HBA330 | No RAM or HDD picture

Dell Poweredge R630 2x Xeon E5-2680 v3 2.5ghz 24-Core | HBA330 | No RAM or HDD

$149.99



Dell EMC VxRail E560F 10-SFF 2*Gold 6230R 2.1GHz No RAM HBA330 iDrac Ent Server picture

Dell EMC VxRail E560F 10-SFF 2*Gold 6230R 2.1GHz No RAM HBA330 iDrac Ent Server

$349.99