Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: SpartanTexan99 on February 12, 2010, 12:28:25 PM

Title: Confused about RAM and onboot.lst with 2.8.1
Post by: SpartanTexan99 on February 12, 2010, 12: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
Title: Re: Confused about RAM and onboot.lst with 2.8.1
Post by: gerald_clark on February 12, 2010, 12: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".
Title: Re: Confused about RAM and onboot.lst with 2.8.1
Post by: SpartanTexan99 on February 12, 2010, 01: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
Title: Re: Confused about RAM and onboot.lst with 2.8.1
Post by: SpartanTexan99 on February 12, 2010, 01: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?
Title: Re: Confused about RAM and onboot.lst with 2.8.1
Post by: curaga on February 12, 2010, 01:15:05 PM
Put the contents in /opt/bootlocal.sh.
Title: Re: Confused about RAM and onboot.lst with 2.8.1
Post by: SpartanTexan99 on February 12, 2010, 01: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?
Title: Re: Confused about RAM and onboot.lst with 2.8.1
Post by: SpartanTexan99 on February 12, 2010, 01: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?
Title: Re: Confused about RAM and onboot.lst with 2.8.1
Post by: gerald_clark on February 12, 2010, 01:28:11 PM
After adding lines to bootlocal.sh, you must backup.
This means you must have a persistant tce directory.
Title: Re: Confused about RAM and onboot.lst with 2.8.1
Post by: SpartanTexan99 on February 12, 2010, 01: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?
Title: Re: Confused about RAM and onboot.lst with 2.8.1
Post by: curaga on February 12, 2010, 01:38:45 PM
"filetool.sh backup". Or just have the backup box ticked when shutting down.
Title: Re: Confused about RAM and onboot.lst with 2.8.1
Post by: SpartanTexan99 on February 12, 2010, 01: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.

???
Title: Re: Confused about RAM and onboot.lst with 2.8.1
Post by: curaga on February 12, 2010, 02:16:12 PM
Is it a full path? Is your script executable? If it's a bash script, is bash loaded?
Title: Re: Confused about RAM and onboot.lst with 2.8.1
Post by: Guy on February 12, 2010, 05: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.
Title: Re: Confused about RAM and onboot.lst with 2.8.1
Post by: SpartanTexan99 on February 15, 2010, 07: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.
Title: Re: Confused about RAM and onboot.lst with 2.8.1
Post by: curaga on February 15, 2010, 07:15:55 AM
Why not have the contents of that script in bootlocal.sh?
Title: Re: Confused about RAM and onboot.lst with 2.8.1
Post by: SpartanTexan99 on February 15, 2010, 08:37:18 AM
Actually, I haven't tried that, but would work fine for me.  I will see if that improves things.