WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: PXE & Tiny core linux  (Read 33005 times)

Offline Evangelos

  • Newbie
  • *
  • Posts: 19
PXE & Tiny core linux
« on: May 08, 2011, 07:04:53 AM »
I would like to know if is it possible to install tiny core linux remotely via pxe. my destination pc supports pxe boot.
Thanks
Evangelos Brachos

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: PXE & Tiny core linux
« Reply #1 on: May 08, 2011, 08:47:35 AM »
Absolutely.

Also see
Code: [Select]
tc-terminal-serverincluded in base.
"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: PXE & Tiny core linux
« Reply #2 on: May 08, 2011, 12:39:05 PM »

Offline Evangelos

  • Newbie
  • *
  • Posts: 19
Re: PXE & Tiny core linux
« Reply #3 on: May 14, 2011, 07:30:00 AM »
So far (No More, No Less, means that I have done only the following steps on a fresh TCL installation):
Putting it all together

The tftp server is sourced at /tftpboot. We are going to setup workstation1. It is going to have a /mnt/nfs that corresponds to /tftpboot/nfs/ws1. On the server myserver:

    mkdir -p /tftpboot/nfs/ws1/tce

    copy nfs-utils.tcz to /tftpboot/nfs/ws1/tce
-> Here I downloaded nfs-utils.tcz on option folder and I copied to the /tftpboot/nfs/ws1/tce

    create the file /tftpboot/nfs/ws1/nfs.list that contains: ^/nfs/ws1/nfs-utils.tcz^
^/nfs/ws1/nfs-utils.tcz^ -> do I have to put the ^ character before and after the file path?

    Copy tinycore.gz and bzImage to /tftpboot/nfs/ws1

    add ”/tftpboot/nfs/ws1 *(rw,no_root_squash)” to /etc/exports, and “exportfs -a”.
/etc/exports didn't exist as a result I created. It contains the following lines
Code: [Select]
/tftpboot/nfs/ws1 *(rw,no_root_squash)
exportfs -a
    Create a PXE config file that contains the following:
Code: [Select]
label ws1
  MENU LABEL WS1
  kernel /nfs/ws1/bzImage
  append initrd=/nfs/ws1/tinycore.gz nfsmount=myserver:/tftpboot/nfs/ws1 tftplist=myserver:/nfs/ws1/nfs.list tce=nfs/tce
Where I have to create this file?in which folder?What name should have?

When I solve my previous questions, I am going to do the following steps:
When you select ws1 from the PXE boot menu, the workstation does the following:

    Loads TCL.
    TFTP gets /nfs/ws1/nfs.list from myserver.
    TFTP gets each file listed in nfs.list and places it in /opt/tce.
    Mounts all applications in /opt/tce.
    Mounts myserver:/tftpboot/nfs/ws1 onto /mnt/nfs.

Any additional extensions installed by Appbrowser will be saved on the nfs share, and will be loaded during boot, just as you would expect with a local drive.

When you run the Backup-Restore utility, set the Device to nfs or nfs/tce.
Evangelos Brachos

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: PXE & Tiny core linux
« Reply #4 on: May 14, 2011, 07:41:43 AM »
Running
Code: [Select]
tc-terminal-servercould give you a basic idea to learn from

Try <netboot-dir>/pxelinux.cfg/default
"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: PXE & Tiny core linux
« Reply #5 on: May 14, 2011, 11:45:55 PM »
There should be no "^" characters in your nfs.lst.
Do not put the boot files in the nfs tce directory.
/etc/exports should not contain "exportfs -a"
You do not need a tce= boot option.

Please re-read the netboot article.
Start with the absolute minimum method.

Offline Evangelos

  • Newbie
  • *
  • Posts: 19
Re: PXE & Tiny core linux
« Reply #6 on: June 05, 2011, 08:26:30 AM »
I started again to install the TCL using PXE boot.

Server (Ubuntu 10.04) -> destination Thin Client PXE boot.

In Ubuntu:
I installed tftpd-hda dhcpd3-server

then the configuration file /etc/default/tftpd-hpa
Quote
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/var/lib/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="-s"
TFTP_DIRECTORY="/var/lib/tftpboot"

Then
Code: [Select]
wget http://distro.ibiblio.org/tinycorelinux/3.x/release/tinycore-current.iso
Next step :
Quote
mkdir /var/lib/tftpboot/tinycore

Next step :
Quote
mount -o loop tinycore-current.iso /var/lib//tftpboot/tinycore

folder boot contains:
Quote
/var/lib/tftpboot/tinycore/boot$ ls
bzImage  isolinux  tinycore.gz

my pxelinux.cfg now ONLY contains:
Quote
ebrachos@ebrachos-hp:/var/lib/tftpboot$ cat pxelinux.cfg
LABEL tinycore
MENU LABEL Tiny Core 3.6
kernel /var/lib/tftpboot/tinycore/boot/bzImage
append initrd=/var/lib/tftpboot/tinycore/boot/tinycore.gz

Quote
ebrachos@ebrachos-hp:~$ cat /etc/dhcp3/dhcpd.conf
option domain-name-servers 8.8.8.8;
default-lease-time 86400;
max-lease-time 604800;
authoritative;

subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.70 192.168.1.100;
filename "pxelinux.0";
next-server 192.168.0.3;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.0.1;
}
Evangelos Brachos

Offline Evangelos

  • Newbie
  • *
  • Posts: 19
Re: PXE & Tiny core linux
« Reply #7 on: June 05, 2011, 08:31:57 AM »
Quote
ebrachos@ebrachos-hp:/etc/dhcp3$ sudo /etc/init.d/networking restart
 * Reconfiguring network interfaces...                                          There is already a pid file /var/run/dhclient.eth0.pid with pid 5223
killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.1.3
Copyright 2004-2009 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/00:1e:68:da:ed:02
Sending on   LPF/eth0/00:1e:68:da:ed:02
Sending on   Socket/fallback
Internet Systems Consortium DHCP Client V3.1.3
Copyright 2004-2009 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/00:1e:68:da:ed:02
Sending on   LPF/eth0/00:1e:68:da:ed:02
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 20
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 21
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 13
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
                                                                         [ OK ]

Quote
    sudo /etc/init.d/networking restart

Quote
ebrachos@ebrachos-hp:~$ sudo /etc/init.d/dhcp3-server restart
 * Stopping DHCP server dhcpd3    [fail]
 * Starting DHCP server dhcpd3  probably OK
 * check syslog for diagnostics.     [fail]

Question:

my thin client doesnt find something and skipped PXE boot.

I connected the thin client to my Laptop not to my router.
Do you think I have to connected it to my router?
Evangelos Brachos

Offline Evangelos

  • Newbie
  • *
  • Posts: 19
Re: PXE & Tiny core linux
« Reply #8 on: June 05, 2011, 08:51:21 AM »
I connect my thin client to router.

I changed the interface file from eth0 to wlan0
and now the

Quote
    sudo /etc/init.d/networking restart
gave
Quote
Listening on LPF/wlan0/00:16:ea:d5:4f:20
Sending on   LPF/wlan0/00:16:ea:d5:4f:20
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4
DHCPOFFER of 192.168.0.3 from 192.168.0.1
DHCPREQUEST of 192.168.0.3 on wlan0 to 255.255.255.255 port 67
DHCPACK of 192.168.0.3 from 192.168.0.1
bound to 192.168.0.3 -- renewal in 42341 seconds

but again the thin client could not find anything.

PROBABLY there is something wrong in my
Quote
ebrachos@ebrachos-hp:~$ cat /etc/dhcp3/dhcpd.conf
option domain-name-servers 8.8.8.8;
default-lease-time 86400;
max-lease-time 604800;
authoritative;

subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.70 192.168.1.100;
filename "pxelinux.0";
next-server 192.168.0.3;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.0.1;
}

Could someone examine the above lines to see if something goes wrong.

my router ip is 192.168.0.1 and my server 192.168.0.3

thanks.
Evangelos Brachos

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11629
Re: PXE & Tiny core linux
« Reply #9 on: June 05, 2011, 03:26:25 PM »
Hi Evangelos
I don't know PXE, just an observation.

Quote
PROBABLY there is something wrong in my
Quote
ebrachos@ebrachos-hp:~$ cat /etc/dhcp3/dhcpd.conf
option domain-name-servers 8.8.8.8;
default-lease-time 86400;
max-lease-time 604800;
authoritative;

subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.70 192.168.1.100;
filename "pxelinux.0";
next-server 192.168.0.3;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.0.1;
}

I see both  192.168.1  and  192.168.0  listed. Is that a typo or are you really running two networks?

Offline Evangelos

  • Newbie
  • *
  • Posts: 19
Re: PXE & Tiny core linux
« Reply #10 on: June 05, 2011, 04:30:07 PM »
Ok I am going to change it and I will come back with my results.

Thank you very much.
Evangelos Brachos

Offline madeno

  • Newbie
  • *
  • Posts: 2
Re: PXE & Tiny core linux
« Reply #11 on: November 19, 2012, 02:55:42 AM »
Hello
I've tried to run over PXE new TC, but X didn't start, system boots to command line. I think Ive got problem with loading tcz extensions ...
Ive tried almost everything loading them over tftp, nfs, http, boot tinycore iso over pxe but no success.
I've tried also tinycore 3.6 and it works great but I need to load new version because I need it with vmware view client

I tried to do this in this configuration:
pxeserver - VMware, SLES, syslinux-4.06, tftp-hpa-5.2

my pxe menu:
---------------
LABEL 4
        MENU LABEL TinyCore nfs
        KERNEL /nfs/ws1/boot/vmlinuz
        APPEND initrd=/nfs/ws1/boot/core.gz nfsmount=(ip_dhcp_server):/tftpboot/nfs/ws1
        TEXT HELP
        Boot the TinyCore nfs
        ENDTEXT
LABEL 3
        MENU LABEL VMWare View
        KERNEL vmview/memdisk
        APPEND iso initrd=vmview/vmview.iso raw
        TEXT HELP
        Boot the VM
        ENDTEXT
LABEL 2
        MENU LABEL TinyCore 3.6
        KERNEL tinycore/boot/bzImage
        APPEND initrd=tinycore/boot/tinycore.gz
        TEXT HELP
        Boot the TinyCore 3.6
        ENDTEXT
LABEL 1
        MENU LABEL TinyCore 4.7
        KERNEL image/boot/vmlinuz
        APPEND initrd=image/boot/core.gz cde
        TEXT HELP
        Boot the TinyCore new
        ENDTEXT

Can someone help me to resolve this problem?
Thank you very much

Offline genec

  • Full Member
  • ***
  • Posts: 240
Re: PXE & Tiny core linux
« Reply #12 on: November 19, 2012, 07:02:37 AM »
Hello
I've tried to run over PXE new TC, but X didn't start, system boots to command line. I think Ive got problem with loading tcz extensions ...
Ive tried almost everything loading them over tftp, nfs, http, boot tinycore iso over pxe but no success.
I've tried also tinycore 3.6 and it works great but I need to load new version because I need it with vmware view client

If you're not the original poster, I'd suggest creating a new thread/topic.

That said, I'd advise:
1) rereading http://wiki.tinycorelinux.net/wiki:netbooting http://wiki.tinycorelinux.net/wiki:remastering and http://wiki.tinycorelinux.net/wiki:dynamic_root_filesystem_remastering
2) I've done full PXE payloads with dynamic remastering for VMware View open client and Symantec Ghost with no issues.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11629
Re: PXE & Tiny core linux
« Reply #13 on: November 19, 2012, 09:16:38 AM »
Hi madeno
The GUI for Tinycore was broken out as separate components somewhere in the TC4.x release. It now requires
that the  Xvesa, Xprogs, Xlibs, flwm_topside, and wbar  extensions are available when booting. I don't know
if a  cde  directory is appropriate for PXE booting, but if it is, those extensions probably belong there. I don't
use PXE so someone else may have some better advice.

Quote
If you're not the original poster, I'd suggest creating a new thread/topic.
If these last three posts belong in their own thread, an administrator will have to move them.

Offline sodface

  • Jr. Member
  • **
  • Posts: 90
Re: PXE & Tiny core linux
« Reply #14 on: November 19, 2012, 02:06:29 PM »
madeno, see:
This thread.

Basically, take the x extensions from the .iso and make another initramfs so that they extract into /tmp/builtin/optional, add it to your boot menu as a second initramfs and you should be good.