WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Confused about RAM and onboot.lst with 2.8.1  (Read 4331 times)

Offline SpartanTexan99

  • Newbie
  • *
  • Posts: 19
Confused about RAM and onboot.lst with 2.8.1
« on: February 12, 2010, 03:28:25 PM »
I need certain apps to run after the OS boots into RAM.  I thought this would occur by having stuff in onboot.lst, but there must be more to the situation I don't understand.
For instance, my onboot.lst contains sevearl .tcz extensions, including
usb-utils.tcz
libusb.tcz
files above should allow lsusb to work, but they don't.
If I use appbrowser to install usb-utils.tcz, then the command works
compiletc.tcz (this seems to work after booting, i.e. using make....)
same problem with using iwconfig command to detect my wlan0 interface
I type iwconfig upon boot, shows iwconfig: not found
I go to appbrowser and install wireless_tools.tcz, then the command works as expected.

I would like these to just work after boot, as I have scripts that I run that depend on them.  The other problem I am still working on is trying to get spectools to run after boot.
I can unzip the tarball, compile and make to get it to work, but I need to just have this work upon boot of my application.  Since it requires a file ....gz or whatever, tar command, configure command, make command, ...
What is the best way to set this up to ensure my System will boot with all the files and tools I need?  I have set them all up manually and they all work great, just need to set this up so the system knows how to run them upon a boot.

Any comments would be greatly appreciated.
JB

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Confused about RAM and onboot.lst with 2.8.1
« Reply #1 on: February 12, 2010, 03:48:50 PM »
First you must have booted with a persistant tce directory. ( tce=hdXy boot option )
If the tce is on a USB drive you also need the waitusb=5 boot option.
Next use appbrowser to install the required applications.
Use Apps Audit to select which applications load "OnBoot".

Offline SpartanTexan99

  • Newbie
  • *
  • Posts: 19
Re: Confused about RAM and onboot.lst with 2.8.1
« Reply #2 on: February 12, 2010, 04:07:27 PM »
Ok, I got past some of my problems by creating copy2fs.flg in /mnt/hda1/tce/optional, i.e. hda1 is my primary boot drive.
I got lsusb working and iwconfig working, which the .tcz files are present in that directory, and load properly.

I still need a way to compile the spectools app and get it to work after boot, as well as other extensions I'd like to use, such as tshark.

JB

Offline SpartanTexan99

  • Newbie
  • *
  • Posts: 19
Re: Confused about RAM and onboot.lst with 2.8.1
« Reply #3 on: February 12, 2010, 04:10:29 PM »
Another thing that I need to get working, i.e. if I start tshark, my card needs to be set in promiscuous mode, I have a script that does this, but need to start the script (.sh) upon boot.  Is there simple place to put scripts that will run upon bootup?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11043
Re: Confused about RAM and onboot.lst with 2.8.1
« Reply #4 on: February 12, 2010, 04:15:05 PM »
Put the contents in /opt/bootlocal.sh.
The only barriers that can stop you are the ones you create yourself.

Offline SpartanTexan99

  • Newbie
  • *
  • Posts: 19
Re: Confused about RAM and onboot.lst with 2.8.1
« Reply #5 on: February 12, 2010, 04:19:43 PM »
when you say contents, I assume you mean scripts to run?  Should I put all my tarballs and such in optional directory, load the .tcz's using copy2fs.flg, and run the scripts using the above file?

Offline SpartanTexan99

  • Newbie
  • *
  • Posts: 19
Re: Confused about RAM and onboot.lst with 2.8.1
« Reply #6 on: February 12, 2010, 04:24:10 PM »
I put a command in bootlocal, but after reboot the file was back to normal without the command.  I have a partitioned system with hda1 as my primary boot location.  Is there another place I am supposed to put this file?

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Confused about RAM and onboot.lst with 2.8.1
« Reply #7 on: February 12, 2010, 04:28:11 PM »
After adding lines to bootlocal.sh, you must backup.
This means you must have a persistant tce directory.

Offline SpartanTexan99

  • Newbie
  • *
  • Posts: 19
Re: Confused about RAM and onboot.lst with 2.8.1
« Reply #8 on: February 12, 2010, 04:32:21 PM »
Sorry for so many ?'s, but the answers are great.

I do have a storage drive at /mnt/hda1......

Is there a backup command to run after modifying bootlocal.sh?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11043
Re: Confused about RAM and onboot.lst with 2.8.1
« Reply #9 on: February 12, 2010, 04:38:45 PM »
"filetool.sh backup". Or just have the backup box ticked when shutting down.
The only barriers that can stop you are the ones you create yourself.

Offline SpartanTexan99

  • Newbie
  • *
  • Posts: 19
Re: Confused about RAM and onboot.lst with 2.8.1
« Reply #10 on: February 12, 2010, 04:55:02 PM »
seems I have that backing up and saving, but it doesn't run my script as I expect.
this is in bootlocal.sh
mnt/hda1/tce/optional/test.sh

where test.sh simply creates a file using touch command.  But no file gets created upon boot.

???

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11043
Re: Confused about RAM and onboot.lst with 2.8.1
« Reply #11 on: February 12, 2010, 05:16:12 PM »
Is it a full path? Is your script executable? If it's a bash script, is bash loaded?
The only barriers that can stop you are the ones you create yourself.

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: Confused about RAM and onboot.lst with 2.8.1
« Reply #12 on: February 12, 2010, 08:16:38 PM »
If you use "tce=hda1 home=hda1 opt=hda1" boot options you don't need to backup anything in the tce, home or opt directories. I don't use backup.

For applications to be loaded when you start the computer, open the Control Panel, click Apps Audit, OnBoot, then Maintenance. Click on extensions on the left side, you want to be automatically loaded when you start the computer. Do not click on dependencies. They will be automatically included.

copy2fs.flg is another option. You can do it either way.

For applications to be started when you start the computer, put the start commands in /opt/bootlocal.sh. You don't need to be concerned about backing this up if you included opt=hda1.
Many people see what is. Some people see what can be, and make a difference.

Offline SpartanTexan99

  • Newbie
  • *
  • Posts: 19
Re: Confused about RAM and onboot.lst with 2.8.1
« Reply #13 on: February 15, 2010, 10:05:25 AM »
I have got past the app part, but still not getting the bootlocal.sh to work properly.  It does save my changes to it, but doesn't execute the command for some reason.
i.e. bootlocal.sh
#!/bin/sh
# put other system startup commands here
/mnt/hda1/tce/optional/test.sh

test.sh simply uses touch command to create a file
If I run test.sh from the drive, with or without sudo privilege, the script works as expected, so I don't believe permissions are a problem.  Could it be timing related, such that when bootlocal.sh is run, hda1 is not ready yet, or something along those lines?
Any other ideas to help get past this hurdle?  I really need to get a few tarballs unzipped and installed upon boot, I'm thinking this is the best way to do it, although I could have it happen as the user executes the command, just thought it would be ready and just execute the programs and options for the user.

Thanks as always.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11043
Re: Confused about RAM and onboot.lst with 2.8.1
« Reply #14 on: February 15, 2010, 10:15:55 AM »
Why not have the contents of that script in bootlocal.sh?
The only barriers that can stop you are the ones you create yourself.