Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: E.J. on November 08, 2010, 10:43:09 AM

Title: [SOLVED] Newb question about Internet connectivity.
Post by: E.J. on November 08, 2010, 10:43:09 AM
Hello all.

Pardon my lack of knowledge, but I'm just starting to try Tiny Core out.  ???

The first step I need to take in order to start customizing my install is to connect to the internet. When I bring up the connection manager all I see is an entry for Ethernet. Is there a way for me to connect using my 3G USB modem? It's a  cellular modem...

I'm completely in the dark here, so I'd appreciate any input.  :P

Thanks.
Title: Re: Newb question about Internet connectivity.
Post by: Juanito on November 08, 2010, 07:34:11 PM
Did you search these forums - I seem to remember a couple of posts on this..

http://forum.tinycorelinux.net/index.php?topic=458.msg2866#msg2866 (http://forum.tinycorelinux.net/index.php?topic=458.msg2866#msg2866)
Title: Re: Newb question about Internet connectivity.
Post by: E.J. on November 09, 2010, 09:06:59 AM
Quote
1. Download and install pppd and pppsetup(dont forget bash to pppsetup).
2. Run pppsetup and create the files, the pppsetup will not fit perfect for our purpose but we edit the scripts later. Put in the information required to pppsetup, use chap, no dialback.

Anyone know where I can find TCL compatible versions of those packages?
Title: Re: Newb question about Internet connectivity.
Post by: Juanito on November 09, 2010, 09:44:28 AM
you can download and install them using the appbrowser (icon showing two gear wheels)
Title: Re: Newb question about Internet connectivity.
Post by: E.J. on November 09, 2010, 10:43:41 AM
How can I download it that way without internet access?

Is there a repository where I can manually download it through a different OS?

Again, thanks for any help anybody may offer.
Title: Re: Newb question about Internet connectivity.
Post by: gerald_clark on November 09, 2010, 11:01:48 AM
You did not browse the scripts in the forum.
http://forum.tinycorelinux.net/index.php?topic=7243.0
Title: Re: Newb question about Internet connectivity.
Post by: Guy on November 09, 2010, 11:50:05 AM
Quote
Is there a repository where I can manually download it through a different OS?

Open App Browser, and click mirrors. You can go to any of these mirrors with the other OS, and download them.

You need

pppsetup.tcz
pppd.tcz
bash.tcz
dialog.tcz

Also include dep and md5 files.

With the latest version, you need additional extensions. Look at all of the .dep files for these extensions, and include all extensions shown in the .dep files.

After downloading, copy them to the /tce/optional directory.

It is easiest if you add pppsetup.tcz to On Boot.

After running pppsetup, you still need to manually edit files. See link mentioned previously.
Title: Re: Newb question about Internet connectivity.
Post by: E.J. on November 09, 2010, 07:29:53 PM
Quote from: Guy
Open App Browser, and click mirrors. You can go to any of these mirrors with the other OS, and download them.

You need

pppsetup.tcz
pppd.tcz
bash.tcz
dialog.tcz

Again, how's that suppose to work without a connection?

Does anyone have the links for the versions I need with the latest TCL?

If I download them manually, can I run them from TCL, without having to setup the TCE directory from another Linux?

Or, is it possible to setup the TCE directory from within Windows?

Title: Re: Newb question about Internet connectivity.
Post by: Juanito on November 09, 2010, 07:33:15 PM
Use can use a link of this format to download the extensions directly: http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/3.x/tcz/pppd.tcz (http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/3.x/tcz/pppd.tcz.info)
Title: Re: Newb question about Internet connectivity.
Post by: curaga on November 10, 2010, 12:02:23 AM
Yes, you can just click "Local" in appbrowser, and select the extensions to load, instead of setting up a tce dir.
Title: Re: Newb question about Internet connectivity.
Post by: E.J. on November 10, 2010, 02:31:13 PM
Before I go any further, is my grub4dos entry correct?

Quote
title Tiny Core on hda3 (tce=hda3 restore=hda3 nolocal)
kernel (hd0,2)/bzImage quiet restore=hda3  nolocal tce=hda3
initrd (hd0,2)/tinycore.gz

...or do I need additional commands to make this frugal install persistent?

BTW - I loaded the bash, dialog, and pppsetup TCZ extensions just fine through the app browser's local option.

When I went to load the ppp.tcz, I received the message it was already installed...

Could someone tell me how (from the command-line) I can see what files are in a directory, and the command to open the pppscript file for editing?

Title: Re: Newb question about Internet connectivity.
Post by: Guy on November 10, 2010, 02:45:29 PM
I use Grub, not grub4dos - it is probably the same.

use restore=hda3 if you plan to use backup

use home=hda3 opt=hda3 if you want persistent home and opt

I recommend persistent home and opt when installing on a hard drive. Include backup for anything you want to save not in home or opt. Edit /opt/.filetool.lst and /opt/.xfiletool.lst to determine what is backed up.


From the terminal use:

cd nameofdirectory - to go to that directory

cd .. - to go up a directory

ls - to list the contents of a directory


To run pppsetup

sudo pppsetup

After running pppsetup, you probably need to edit files with a text editor. See link mentioned previously.

Add the following to /opt/.filetool.lst so it will be backed up.
etc/ppp
etc/resolv.conf
usr/local/sbin/ppp-go

Another option, instead of backing it up, is to make a new extension, but it is best to start with the easiest method. If you make a new extension, you don't need to use backup.
Title: Re: Newb question about Internet connectivity.
Post by: E.J. on November 14, 2010, 11:17:59 AM
Keeping in mind I'm not going to directly install to a partition (I'm going for frugal), this is my loader entry:

Quote
title Tiny Core
find --set-root --ignore-floppies --ignore-cdrom /Tiny/bzImage
kernel /Tiny/bzImage acpi=off restore=hdc7 home=hdc7 opt=hdc7 tce=hdc7
initrd /Tiny/tinycore.gz

Is that right for a frugal install?

Now this is what I have in the folder located at '/mnt/hdc7/TCE'.

bash.tcz
bash.tcz.dep
bash.tcz.md5
dialog.tcz
nano.tcz
nano.tcz.dep
ncurses.tcz
ncurses.tcz.dep
ncurses.tcz.md5
ncurses-common.tcz
pppd.tcz
pppd.tcz.dep
pppd.tcz.md5

How do I get these to load automatically at start?

Also, when I ran the "pppsetup" command it asked me for a phone number preceded by ATD or something. How do I setup my provider?



Title: Re: Newb question about Internet connectivity.
Post by: maro on November 14, 2010, 01:28:32 PM
A couple of observations:
Title: Re: Newb question about Internet connectivity.
Post by: Guy on November 14, 2010, 04:12:02 PM
You should include md5 files for all extensions. pppsetup will work without them. md5 files are used if you update extensions.

To get them to load automatically at the start, include pppsetup in On Boot. The others will be loaded because they are dependencies.

When running pppsetup
Answer No for Callback.
Where it asks for your internet service provider's domain name, leave it blank.
The answers to the other questions should be obvious.

After running this, you need to edit some files manually. See http://forum.tinycorelinux.net/index.php?topic=458

You don't need to edit etc/ppp/options.demand. Skip that part.

You may not need to write nameserver adresses in etc/resolv.conf. I modified the pppsetup extension since that forum page was written, to do this automatically. Check this. It may not work the same after modifying the files. After connecting to the internet, open etc/resolv.conf with a text editor. It should look something like:

nameserver 80.251.192.244
nameserver 80.251.192.245

The numbers will probably be different, depending where you are in the world. If etc/resolv.conf does not have these nameserver addresses, copy them from /etc/ppp/resolv.conf to etc/resolv.conf. I repeat, do this after connecting to the internet. They will not be there before connecting to the internet.

Add the following to /opt/.filetool.lst so it will be backed up.
etc/ppp
etc/resolv.conf
usr/local/sbin/ppp-go
Title: Re: Newb question about Internet connectivity.
Post by: tinypoodle on November 14, 2010, 04:40:11 PM
Keeping in mind I'm not going to directly install to a partition (I'm going for frugal), this is my loader entry:

Quote
title Tiny Core
find --set-root --ignore-floppies --ignore-cdrom /Tiny/bzImage
kernel /Tiny/bzImage acpi=off restore=hdc7 home=hdc7 opt=hdc7 tce=hdc7
initrd /Tiny/tinycore.gz

Is that right for a frugal install?

For a pure frugal install remove 'home=hdc7 opt=hdc7' (they would conflict with defaults of restore= anyway).
The second line must be particular to your bootloader, but I am a bit puzzled why you would have 2 entries stating "/Tiny/bzImage", you might want to check syntax specific to your bootloader.
Title: Re: Newb question about Internet connectivity.
Post by: Guy on November 14, 2010, 04:52:09 PM
Quote
For a pure frugal install remove 'home=hdc7 opt=hdc7' (they would conflict with defaults of restore= anyway).

I recommend leaving in home=hdc7 opt=hdc7, then editing /opt/.filetool.lst to exclude the home and opt directories from backup.

Not having persistent home and opt, is only an advantage when saving to a usb drive, as it limits the amount of writing to the usb drive, and lengthens the life of the usb drive.

When installing to a hard drive, having persistent home and opt, reduces the time it takes for backup and restore.
Title: Re: Newb question about Internet connectivity.
Post by: tinypoodle on November 14, 2010, 07:20:40 PM
Quote
For a pure frugal install remove 'home=hdc7 opt=hdc7' (they would conflict with defaults of restore= anyway).

I recommend leaving in home=hdc7 opt=hdc7, then editing /opt/.filetool.lst to exclude the home and opt directories from backup.

Not having persistent home and opt, is only an advantage when saving to a usb drive, as it limits the amount of writing to the usb drive, and lengthens the life of the usb drive.

Same would be true e.g. for memory cards and - even if to a lesser degree - for traditional hard disk drives.

Quote
When installing to a hard drive, having persistent home and opt, reduces the time it takes for backup and restore.

... and at the same time slows down operational speed permanently, in comparison to default mode.
Title: Re: Newb question about Internet connectivity.
Post by: Guy on November 14, 2010, 09:09:23 PM
Quote
Same would be true e.g. for memory cards and - even if to a lesser degree - for traditional hard disk drives.

It is true for solid state memory cards.

Solid state memory, whether usb or internal, become faulty after being written to a certain number of times, as a result of the way they are designed.

Hard drives normally last much longer than solid state memory. Failure normally occurs as a result of failure of the electronic components. There can be other causes. They can wear out. Many hard drives last until the computer is outdated. Hard drives don't have the design feature which means they will become faulty after being written to a certain number of times.

Quote
... and at the same time slows down operational speed permanently.

No it does not.

Tiny Core is about choices. You may choose to do it one way, and other people may choose to do it other ways. It is up to the user.
Title: Re: Newb question about Internet connectivity.
Post by: E.J. on November 15, 2010, 08:22:15 AM
What exactly do the boot commands mentioned do? I don't even know the difference.

Whatever setup is the fastest would be desirable...

As far as the modem thing goes without an internet connection, I can't even get PCManFM to load.

I imagine it's due to missing some files somewhere, and without the right "*.dep" files in the optional folder it doesn't even look for them..?

When I run "pppsetup", it goes to a screen where is says "press enter" or the like. I press enter, and am taken to a screen where it asks for a phone number after the "atdt" string.

Example: atdt8675309

After entering in the USB modem's number, I'm taken to a screen where it asks me to select a COM port (1-4). If I hit enter without entering a phone number, it exits the program.

In other Linux OSes I've tried it usually went --> Probe, or auto-detect, for modem --> Enter "#777" for dialing number --> and finally, I'd enter the modem's phone number as "User & Password".
Title: Re: Newb question about Internet connectivity.
Post by: Guy on November 15, 2010, 08:44:37 AM
If you include home=hdc7 opt=hdc7 boot codes, your computer will save to the hard drive whenever you save something.  If you don't, it will be saved to ram, and only be saved to the hard drive when you do a backup.

There are many different boot codes. See the wiki for others.

pppsetup is an old application, written before the introduction of usb modems. After running pppsetup, you need to edit files manually. See: http://forum.tinycorelinux.net/index.php?topic=458
Title: Re: Newb question about Internet connectivity.
Post by: E.J. on November 15, 2010, 11:17:39 AM
I enterered in some random data, so PPP would create the setup files for editing.

But when I restarted the PC, no files had been saved...

Also, I was wondering if I could copy the info from my frugal Puppy install to setup the internet in TCL.

(http://img213.imageshack.us/img213/1273/pupdial.png) (http://img213.imageshack.us/f/pupdial.png/)
(http://img266.imageshack.us/img266/4782/etcppp.png) (http://img266.imageshack.us/f/etcppp.png/)

Would any of this be useful?

The second init string is "ATQ0 V1 E1 S0=0 &D2 +FCLASS=0"
Title: Re: Newb question about Internet connectivity.
Post by: Guy on November 15, 2010, 04:15:50 PM
Quote
But when I restarted the PC, no files had been saved...

Add the following to /opt/.filetool.lst so it will be backed up.
etc/ppp
etc/resolv.conf
usr/local/sbin/ppp-go

Quote
Also, I was wondering if I could copy the info from my frugal Puppy install to setup the internet in TCL.

You could experiment with this. If you get it right it should work. It is just a matter of knowing exactly what to copy over.

If you get it to work, share so others can benefit.

Whatever you want saved, add to /opt/.filetool.lst so it will be backed up.
Title: Re: Newb question about Internet connectivity.
Post by: maro on November 15, 2010, 07:46:40 PM
First off I'm not a 'ppp' user so I did not test anything with real hardware, but I did some investigation that might help here:

When one runs 'pppsetup' (from the 'pppsetup.tcz' extension) it creates a certain set of configuration files (e.g. in '/etc/ppp' plus '/etc/resolve.conf') and a (custom) ppp-startup script (i.e. '/usr/local/sbin/ppp-go') plus a (non-custom) ppp-disconnect script (i.e. '/usr/local/bin/ppp-off'). As the .info file of this extensions mentions, (and re-iterated by guy in reply #22) these files need to be added to the backup so that they "survive" the next reboot of the system. If one has done this there is no further need to keep the 'pppsetup.tcz' extension (and its dependencies) in '.../tce/onboot.lst'. If things are working OK, I personally would remove those surplus extensions from '.../tce/optional' (but that is not required). It is obviously important to ensure that a successful backup is done (e.g. via filetools.sh -b) after the ppp configuration is working OK.

In addition to the ppp-startup script one might want to also add the ppp-disconnect script (i.e. '/usr/local/bin/ppp-off') to the backup (by adding an entry of 'usr/local/bin/ppp-off' to '/opt/.filetool.lst'). Please note: it's a bit strange for one of the scripts to reside in '.../sbin' and the other one in '.../bin' but that is how the extension is currently been put together.

So the challenge of how to answer the questions of 'pppsetup' boils down to:

An alternative would be to attempt a "migration" of some config files (from the '/etc/ppp' directory of the Puppy system) to TC. I've only booted Puppy in a VM (i.e. QEMU), and not having a modem there did not allow for a real test, but I've done a bit of poking around and the following seems to make sense (at least to myself). After a (dummy) execution of 'pppsetup' on TC I found the following files in '/etc/ppp':

Well so far the theory, I wonder what can be achieved in the "real" world.
Title: Re: Newb question about Internet connectivity.
Post by: Guy on November 16, 2010, 05:37:23 AM
If you add the following to /opt/.filetool.lst so it will be backed up.
etc/ppp
etc/resolv.conf
usr/local/sbin/ppp-go
you still need to use the pppd and pppsetup extensions.

If you add the following to /opt/.filetool.lst so it will be backed up.
etc/ppp
etc/resolv.conf
usr/local/sbin/ppp-go
usr/local/bin/ppp-off
you no longer need the pppsetup extension.
You still need pppd. There are files used from the pppd extension which are not included in backup.

If you include
usepeerdns
in etc/ppp/options, it will automatically get the IP addresses of the domain name servers, and write them to /etc/ppp/resolv.conf.

There is a line in /etc/ppp/ip-up (which runs after connecting to the internet)
install -m 644 /etc/ppp/resolv.conf /etc/resolv.conf
which copies the IP addresses of the domain name servers to /etc/resolv.conf.
(I modified pppsetup to include this. Before that you needed to do it manually.)
You must keep this in, or copy the addresses manually.

options.demand is not necessary. It is used for demand dialing. You can ignore it.
Title: Re: Newb question about Internet connectivity.
Post by: E.J. on November 16, 2010, 04:57:55 PM
This has all turned into a convoluted guessing game. Is there a better program for connecting that I could install?

I can't even find the right "tty?" setting. I've tried "ttyUSBx", and "ttyACMx", (x = integer) settings without success. It never recognizes the device.

Also in my quest to download manually other programs, and install them, I've encountered an issue.

Some dependencies calls for a "?-KERNEL.tcz", but in the repository the "?" has an alpha-numeric designation. If I edit the "*.dep" file to attempt loading the needed "*.tcz" it can't find it. But if I rename the actual dependency "*.tcz" to "?-KERNEL.tcz", it works. Do I also need to rename the "*.md5", and "*.dep" files to reflect this?

Example:
If I rename 'graphics-2.6.33.3-tinycore.tcz' to 'graphics-KERNEL.tcz', do I have to rename 'graphics-2.6.33.3-tinycore.tcz.md5' to 'graphics-KERNEL.tcz.md5'?
Title: Re: Newb question about Internet connectivity.
Post by: maro on November 16, 2010, 05:51:51 PM
E.J.: This should not be a guessing game, but have to actually payed attention to what is showing up in the 'dmesg' output when you insert the modem?

Here is what I would do: Boot TC but leave your USB-modem disconnected. I assume that you'll need the 'usb-serial-2.6.33.3-tinycore.tcz' extension and that you have that already downloaded and installed. Then take a snapshot of 'dmesg' (e.g. via dmesg > dmesg-01), insert the modem and wait a few seconds. Now take another snapshot and compare those two snapshots (e.g. via dmesg > dmesg-02 && diff -U 0 dmesg-01 dmesg-02) Can you show us the result of this 'diff' here?

More helpful details might be in the relevant output of 'lsusb -v' (after the modem insertion of course). For this you'll need the 'usb-utils.tcz' extension, plus it's dependency 'libusb.tcz'.


Edit: Regarding the '-KERNEL' issue: There is IMHO a flaw in the 'tce-load' script. It changes at download time the entries in the '.dep' files from 'KERNEL' to the actual value (e.g. '2.6.33.3-tinycore', which is the output of 'uname -r'). I personally believe that downloaded files should not be "fudged". I also believe that you should you keep all downloaded file names intact. But you could then "mimic that flaw" of 'tce-load' by "fudging" the entries in the '.dep' files in the same way. You should then be able to use 'tce-load -i EXT' with the expected result.
Title: Re: Newb question about Internet connectivity.
Post by: tinypoodle on November 16, 2010, 07:25:30 PM
This has all turned into a convoluted guessing game. Is there a better program for connecting that I could install?
I can't even find the right "tty?" setting. I've tried "ttyUSBx", and "ttyACMx", (x = integer) settings without success. It never recognizes the device.

Not having used a recent version of puppy, but from your screenie everything looks like PupDial might just be a GUI frontend to wvdial.
Therefore I'd estimate that your chances might be better if you find a way to use wvdial under TC.
Perhaps you could make the binaries of puppy work, or you could request an extension.   ;)
Title: Re: Newb question about Internet connectivity.
Post by: E.J. on November 17, 2010, 07:56:36 AM
Quote
I assume that you'll need the 'usb-serial-2.6.33.3-tinycore.tcz' extension
...
...
...

Well there it is. That did it. I was missing a necessary extension.

All I did after that was enter...

- Selected 'ATDT#777' for the dialing option
- Hit enter at initialization string screen (left at default).
- The providers name (not sure if this matters).
- The device only goes to '115200', but I selected the fastest option (ISDN).
- The device's phone number (can be found through Windows) was used for the username, and the password.
- When the pppsetup finished, I typed 'sudo nano /etc/ppp/options', and changed the 'ttyS0' to 'ttyACM0'.
- Typed ppp-go at the terminal, success.

I have two of these USB devices. One requires the USB mode switch extension, or it's only recognized as a disc drive.

Whoever wants to do this manually needs to download these
extensions + their dependencies (just open the '.dep' in a text editor):

bash.tcz
dialog.tcz
ppp.tcz
pppsetup.tcz
usb-serial-?-tinycore.tcz

AND if needed:
usb-modeswitch.tcz
nano.tcz
leafpad.tcz

Place them all in the 'tce/optional' folder on the partition where Tiny Core is located.

Thanks to everyone for the help.

Posting from TCL.
Title: Re: [SOLVED] Newb question about Internet connectivity.
Post by: tinypoodle on November 17, 2010, 10:48:00 PM
ppp software was designed to work with dial-up and therefore not surprising that 115200 (ISDN) is the fastest option.

What I might try in your place would be to grep for '115200' in the config files produced, and then play with the value, manually changing it.