WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [SOLVED] Newb question about Internet connectivity.  (Read 8068 times)

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Newb question about Internet connectivity.
« Reply #15 on: November 14, 2010, 07: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.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: Newb question about Internet connectivity.
« Reply #16 on: November 14, 2010, 07: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.
Many people see what is. Some people see what can be, and make a difference.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Newb question about Internet connectivity.
« Reply #17 on: November 14, 2010, 10: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.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: Newb question about Internet connectivity.
« Reply #18 on: November 15, 2010, 12:09:23 AM »
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.
Many people see what is. Some people see what can be, and make a difference.

Offline E.J.

  • Newbie
  • *
  • Posts: 14
Re: Newb question about Internet connectivity.
« Reply #19 on: November 15, 2010, 11: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".

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: Newb question about Internet connectivity.
« Reply #20 on: November 15, 2010, 11: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
Many people see what is. Some people see what can be, and make a difference.

Offline E.J.

  • Newbie
  • *
  • Posts: 14
Re: Newb question about Internet connectivity.
« Reply #21 on: November 15, 2010, 02:17:39 PM »
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.




Would any of this be useful?

The second init string is "ATQ0 V1 E1 S0=0 &D2 +FCLASS=0"

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: Newb question about Internet connectivity.
« Reply #22 on: November 15, 2010, 07: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.
Many people see what is. Some people see what can be, and make a difference.

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: Newb question about Internet connectivity.
« Reply #23 on: November 15, 2010, 10: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:
  • What is the phone number? The screenshot of 'PupDial' suggests that it's '#777', so the answer for the dial string should be ATDT#777
  • What is the device name for the modem? The screenshot suggests that the answer is '/dev/ttyACM0'. But this might not be correct for TC, or the correct name might not be listed by 'pppsetup'. So maybe there is something in the 'dmesg' output can shed some light into this matter. If nothing else I'd select 'ttyS0' to get to the next question and keep in mind that this might need to be revisited by changing the entry in '/etc/ppp/options' (and potentially '/etc/ppp/options.demand') later on.
  • What is the baud rate? I'd happily select the highest speed on offer (e.g. 460800) as the likely speed in the 21st century is even beyond that bit rate.
  • The question about callback is probably a resounding "NO".
  • What init strings should be used? Looking at the screenshot (and ignoring the apparently incomplete quote later in reply #21) I can only see that the delta between Puppy and the default of 'pppsetup' is the ommision of the 'S11=55' bit on Puppy. I'd personally would test things out with the 'pppsetup' default, and keep in mid that it could be adjusted manually in '/opt/ppp/pppscript' later on.
  • What DNS server is to be used? I guess that information could be taken from the working Puppy system by looking into '/etc/resolv.conf' and using the IP address found there. Or one uses the public DNS server that Goggle has set up with the easy to remember IP address of '8.8.8.8'.
  • Moving on to the login related questions: I suspects it's nowadays either PAP or CHAP (and not so much an old-style script any more). Maybe the working Puppy system has a clue, insofar as I'd expect that either '/etc/ppp/chap-secrets' or '/etc/ppp/pap-secrets' has a meaningful entry (which shows the login name and password for it in clear text). Those values should then be used to answer the subsequent questions of 'pppsetup'.

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':
  • chap-secrets  :  there is a corresponding file on the Puppy system, so that should be just a straight copy,
  • pap-secrets   :  similarly this should be another straight copy, it is likely that only one of those files contains a meaningful entry, but unless one knows which one it is copying both is probably safe to do.
  • ip-up         :  this script should get executed by 'pppd' after a successful connection, the content of the script does not appear to be well customised for TC. It uses options for 'ps' which are not suitable for the BusyBox 'ps' applet, and it also assumes that 'syslogd' is running' (which is not the default on TC). OTHO I can't see that does any harm to leave it unchanged, it's just not going to spit out its message as intended, but thats IMHO neither here nor there.
  • ip-down       :  this script should get executed by 'pppd' after a successful disconnection, it does not seem to have much meaningful content, so I'd leave it as well untouched,
  • options       :  this is the main config file and could probably be again copied from the working Puppy system. Albeit it contains the modem device name, so caution needs to be applied if that is not the same on TC.
  • options.demand:  this is an alternative config file required when using the '-d' option for 'ppp-go'. It appears to be specific to TC and basically a superset of '/etc/ppp/options'. It should therefore be possible to create it by copying a working 'options' file and adding the following five entries:
        ipcp-accept-local
        ipcp-accept-remote
        0.0.0.0:10.10.10.10
        demand
        connect "chat -v -f /etc/ppp/pppscript"
  • pppscript     :  this config file appears to contain the modem specific control information. I could not identify a namesake on my (virtual) Puppy system, but judging by the content the '/etc/ppp/chat-script' appears to fulfil the same purpose. So I'd be inclined to recommend to copy it to TC (and rename it accordingly to fit with what 'ppp-go' expects to find).

Well so far the theory, I wonder what can be achieved in the "real" world.
« Last Edit: November 17, 2010, 05:02:02 PM by maro »

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: Newb question about Internet connectivity.
« Reply #24 on: November 16, 2010, 08: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.
Many people see what is. Some people see what can be, and make a difference.

Offline E.J.

  • Newbie
  • *
  • Posts: 14
Re: Newb question about Internet connectivity.
« Reply #25 on: November 16, 2010, 07: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'?

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: Newb question about Internet connectivity.
« Reply #26 on: November 16, 2010, 08: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.
« Last Edit: November 16, 2010, 09:03:27 PM by maro »

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Newb question about Internet connectivity.
« Reply #27 on: November 16, 2010, 10: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.   ;)
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline E.J.

  • Newbie
  • *
  • Posts: 14
Re: Newb question about Internet connectivity.
« Reply #28 on: November 17, 2010, 10: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.
« Last Edit: November 17, 2010, 11:48:42 AM by E.J. »

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: [SOLVED] Newb question about Internet connectivity.
« Reply #29 on: November 18, 2010, 01:48:00 AM »
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.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)