Results 1 to 4 of 4

Thread: Auto execute script on boot

  1. #1
    Junior Member
    Join Date
    Feb 2009
    Location
    San Diego
    Posts
    3

    Auto execute script on boot

    I am remastering 5.1.1 to a USB drive so that it boots into text mode (via inittab), has a custom boot graphic and message, and has a password for ssh access; those changes work just fine.

    However, trying to mount a second partition and start sshd on boot (/usr/sbin/sshstart) fails. I have tried several suggestions from this and other forums. A shell script (/start) that does this works manually. Adding a line to /etc/rc.local (which exists) to call this script (/start) doesn't make it execute on boot. Adding a cron job with @reboot and specifying the script (/start) doesn't work. Copying the script itself to KNOPPIX/linux.sh or to /etc/init.d/local.sh doesn't work.

    Is this something you have to do in minitrt.gz? Other suggestions?

    Rich

  2. #2
    Junior Member
    Join Date
    Feb 2009
    Location
    San Diego
    Posts
    3
    The answer seems to be to insert the knoppix.sh script into the minirt.gz. Then it executes just fine. I do not see that step anywhere in the various instructions, though.
    Rich

  3. #3
    Senior Member registered user
    Join Date
    Jan 2005
    Location
    UK
    Posts
    282
    As you're starting at init 2 (text mode)

    add another start script for your commands at /etc/rc2.d/

    Call is S99start_ssh
    or similar and change its permissions to be executable.
    Hopefully this should work.

  4. #4
    Junior Member
    Join Date
    Feb 2009
    Location
    San Diego
    Posts
    3

    Post boot script resolved

    That finally did the trick. None of the other attempts were completely successful, apparently because not enough of the system initialization had occurred (linuxrc, knoppix.sh, rc.local. isolinux.cfg). I was surprised because rc.local didn't work, but adding a link rc2.d and rc3.d to a script in init.d worked just fine. I can mount a partition and reconfigure the nic as needed. Thanks for the help! Rich

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 execute script after boot
    By sci_fi in forum General Support
    Replies: 3
    Last Post: 11-20-2004, 03:53 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
  •  


INTEL XEON E5-2680V4 SR2N7 2.40GHZ CPU picture

INTEL XEON E5-2680V4 SR2N7 2.40GHZ CPU

$11.00



Dell Precision Tower 7810 Xeon E5-2630 v3 @ 2.40GHz , 32GB Ram, NO HDD, NO OS picture

Dell Precision Tower 7810 Xeon E5-2630 v3 @ 2.40GHz , 32GB Ram, NO HDD, NO OS

$239.99



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



Lenovo ThinkStation P520c Intel Xeon W-2133 6-Core 3.60GHz -NO RAM/ HDD/ GPU/ OS picture

Lenovo ThinkStation P520c Intel Xeon W-2133 6-Core 3.60GHz -NO RAM/ HDD/ GPU/ OS

$127.54



Dell Precision T5820 Workstation 3.70GHz W-2135 No RAM/ GPU/ HDD/ OS picture

Dell Precision T5820 Workstation 3.70GHz W-2135 No RAM/ GPU/ HDD/ OS

$179.98



Intel Xeon E5-2699 V4 2.20GHz 55M 22-CORES LGA2011-3 Server Processor 145W SR2JS picture

Intel Xeon E5-2699 V4 2.20GHz 55M 22-CORES LGA2011-3 Server Processor 145W SR2JS

$84.49



Dell Precision T7820 2x Xeon Silver 4114 2.20GHz 950W No RAM GPU HDD 4x SATA picture

Dell Precision T7820 2x Xeon Silver 4114 2.20GHz 950W No RAM GPU HDD 4x SATA

$350.48



Intel Xeon E5-2690 v4 SR2N2 14 Core 2.6GHz 35MB LGA2011-3 CPU *km picture

Intel Xeon E5-2690 v4 SR2N2 14 Core 2.6GHz 35MB LGA2011-3 CPU *km

$15.99



Intel Xeon Phi 5110P 60-Core 1.053GHz Coprocessor   picture

Intel Xeon Phi 5110P 60-Core 1.053GHz Coprocessor

$50.00



HP Z420 Tower Workstation Xeon E5-1620 3.60GHz, 4GB Ram, NO HDD, NO OS picture

HP Z420 Tower Workstation Xeon E5-1620 3.60GHz, 4GB Ram, NO HDD, NO OS

$140.00