WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: pppd options file on boot  (Read 3170 times)

Offline chucklz

  • Newbie
  • *
  • Posts: 7
  • first to land on mars
pppd options file on boot
« on: February 01, 2011, 03:49:46 PM »
So, I have a LAN boot of TC running on my main computer (which so happens to be windows, wanna fight about it? ;)). I have a VM Ware machine with 64MB RAM, NO hard disk OR CD drive. The VM can boot from LAN fine, and loads into tiny core. The LAN boot uses pxelinux.0 boot file, the "default" files has this:

Code: [Select]
DEFAULT menu.c32
PROMPT 0
NOESCAPE 0
ALLOWOPTIONS 0
TIMEOUT 30
MENU TITLE .ING TINY CORE

# TINY CORE
LABEL Tiny Core Linux
KERNEL /tc/bzImage
append initrd=/tc/tinycore.gz tftplist=192.168.0.142:/tc/tce/onboot.lst opt=192.168.0.142:/tc/tce/opt

tftpdlist loads my extensions from my Windows server. onboot.lst has this:

Code: [Select]
pppd.tcz
gftp.tcz
grub-0.97-splash.tcz
nfs-utils.tcz
filesystems-2.6.33.3-tinycore.tcz

BUT! I need special modifications to /etc/ppp/options for what I'm doing with it. I tried writing a shell script that would execute when bootlocal.sh was run to write a new options file (and other files that I need), but it doesn't load.

Any ideas?

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: pppd options file on boot
« Reply #1 on: February 01, 2011, 04:18:35 PM »
Not a PXE user here, so my thoughts might be off the mark.

If you want to be able to call another script from '/opt/bootlocal.sh' then a few conditions will need to be met:
(1) the script file has to be present at the time of the call (e.g. via inclusion in the backup, so please check '/opt/.filetool.lst'),
(2) the script file needs to have suitable permissions (and ownership, but since it should be run as 'root' that might not be a problem here),
(3) if using a sheebang in the script make sure that it really works (otherwise just use something like 'sh /path/to/script' in '/opt/bootlocal.sh')

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: pppd options file on boot
« Reply #2 on: February 01, 2011, 06:54:13 PM »
Please reread the wiki article.
You should not use the tce/onboot.lst for tftplist.
You probably do not need tftplist at all.
You need to define nfsmount and add tce=nfs to the boot options.
PXE booting does not support opt=.
You should be able to install extensions, edit /opt/.filetool.lst, and perform a backup.

Offline chucklz

  • Newbie
  • *
  • Posts: 7
  • first to land on mars
Re: pppd options file on boot
« Reply #3 on: February 02, 2011, 05:36:46 PM »
I can see what you guys mean, but I cannot backup because the client loads TC as if it were booting from CD, so I cant save any backups or files.

I tried to get "nfsmoun=" to work, but TC, for some reason, couldn't connect to my nfs server. The "opt=" was a test, it had no effect lol.

If I can't use onboot.lst to load extensions, how can I load them on boot? Or a better question is; how can I LAN boot TC and allow writes to the booted files? I've read wiki many times, but I might not be reading the right sections? (link?).

Thanks all for your help.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: pppd options file on boot
« Reply #4 on: February 02, 2011, 06:56:28 PM »
You need to set your nfsmount= to point to an nfs shared directory that contains a tce directory.
Make sure this tce directory has proper ownership ( 1001 ) and permissions ( read, write, and search ).
EX:
drwxrwxr-x. 5 1001 ftp 4096 2010-12-18 13:14 tce

Offline chucklz

  • Newbie
  • *
  • Posts: 7
  • first to land on mars
Re: pppd options file on boot
« Reply #5 on: February 02, 2011, 07:33:53 PM »
and if i run nfs server on windows what do i set the permission to?

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: pppd options file on boot
« Reply #6 on: February 02, 2011, 07:46:16 PM »
I have no idea how you could run a proper NFS server on windows.

Offline chucklz

  • Newbie
  • *
  • Posts: 7
  • first to land on mars
Re: pppd options file on boot
« Reply #7 on: February 02, 2011, 08:21:07 PM »
Okay, so I've setup an NFS on my windows machine which point to "C:\nfs" (exported as "/c/nfs/") and my PXE default file reads:
Code: [Select]
DEFAULT menu.c32
PROMPT 0
NOESCAPE 0
ALLOWOPTIONS 0
TIMEOUT 30
MENU TITLE .ING TINY CORE

# TINY CORE
LABEL Tiny Core Linux
KERNEL /tc/bzImage
append initrd=/tc/tinycore.gz nfsmount=192.168.0.142:/c/nfs

Though it still cannot mount, even if I try a "mount -t nfs 192.168.0.142:/c/nfs" in the TC terminal (it MAY be a permission problem, I'm currently looking into it).

Before, I had the option "tftplist=192.168.0.142:/tc/tce.onboot.lst" to load my extensions. After I get the NFS server up, how do I load them without using "onboot.lst"?

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: pppd options file on boot
« Reply #8 on: February 03, 2011, 10:12:36 PM »
You might be able to copy files to your pxe server dir, and after booting to retrieve them from TC by 'tftp'.
At least so under bare metal circumstances, virtualization adding a layer of complexity aside.

BTW, the title of this thread is a bit misleading, as the real question is not particular to any extension; also I think this thread would rather belong into the "Tiny Core on Virtual Machines" forum.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: pppd options file on boot
« Reply #9 on: February 03, 2011, 11:47:07 PM »
If you are going to test mount from TC, and have not loaded the nfs client extensions, you will have to mount with -o nolock.

Offline chucklz

  • Newbie
  • *
  • Posts: 7
  • first to land on mars
Re: pppd options file on boot
« Reply #10 on: February 06, 2011, 01:53:17 PM »
Quote
BTW, the title of this thread is a bit misleading, as the real question is not particular to any extension; also I think this thread would rather belong into the "Tiny Core on Virtual Machines" forum.

Originally, I had my extensions load on boot, but my options file for pppd was empty and I wanted to run a script on boot to write new values to all the files I needed. But the script never ran :'(. I also am testing this on a virtual machine because I plan to run this off an old neoware thin client, but it was less of a hassle to do a bunch of tests in vmware before actually using the neoware thin client.

Quote
You might be able to copy files to your pxe server dir, and after booting to retrieve them from TC by 'tftp'.

Could I have that in a script and run it off boot? My whole goal with this is to have this computer able to turn on and load its settings without me touching it. (It's gunna be a dialin server that switches me to the internet using proxyarp. Here's the link to the setup; yes I know its for free BSD but it should still work right? http://pages.ssimicro.com/~jeremyc/ppp.html)

Quote
If you are going to test mount from TC, and have not loaded the nfs client extensions, you will have to mount with -o nolock.

"mount -o nolock 192.168.0.142:/c/tftp/boot/pxe/tc /mnt/tftpd" doesn't work either :(. And even when I had nfs-utils loaded, I still couldn't mount using "mount -t nfs 192.168.0.142:/c/tftp/boot/pxe/tc /mnt/tftpd/"

*192.168.0.142 is my TFTP server running Windows 7 Ultimate x64*

Should I maybe use FreeBSD after all? Or should I stick with TC?

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: pppd options file on boot
« Reply #11 on: February 06, 2011, 02:24:39 PM »
Quote
You might be able to copy files to your pxe server dir, and after booting to retrieve them from TC by 'tftp'.

Could I have that in a script and run it off boot? My whole goal with this is to have this computer able to turn on and load its settings without me touching it.

Then "dynamic remastering" (see wiki) sounds like the way to go.
You could possibly load the script and a modified /opt/bootlocal.sh in order to execute it with an additional cpio archive which you add to your bootloader.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)