Tiny Core Linux

Tiny Core Extensions => TCE Talk => Topic started by: indaend on October 08, 2016, 10:17:36 AM

Title: PXE and rdesktop
Post by: indaend on October 08, 2016, 10:17:36 AM
Hi guys,

I need some help. I have terminal clients with no HDD. Is it possible to configure Tiny Core Linux to boot PXE and automatically starts rdesktop wo installing?

Thanks
Title: Re: PXE and rdesktop
Post by: Misalf on October 08, 2016, 10:54:59 AM
Hi

Yes
http://wiki.tinycorelinux.net/wiki:netbooting
Title: Re: PXE and rdesktop
Post by: indaend on October 27, 2016, 08:55:39 AM
I need help to create ISO first to automatically run rdesktop custom settings. This far I created ISO where rdesktop extension works but can't get the settings work to automatically runs rdesktop. I have tried creating:
skel creating .xsession - not working (it won't run to xterm)
\tc\.X.d - creating these folders and .xsession file - not working (it won't run to xterm)

any ideas?
Title: Re: PXE and rdesktop
Post by: gerald_clark on October 27, 2016, 09:32:45 AM
You don't need to create an ISO.  You just need an NFS server to serve a tce directory as described in the wiki.
Title: Re: PXE and rdesktop
Post by: indaend on October 27, 2016, 11:05:14 AM
Okay, i need step-by-step instructions. I'm quite newbie in linux.
In Wiki is described how load nfs-utils extension. I use only rdesktop extension and dependencies instead nfs-utils?
And if it loads how does it make rdesktop with my settings automatically?
Title: Re: PXE and rdesktop
Post by: gerald_clark on October 27, 2016, 03:40:44 PM
With an NFS tce directory, it works just like a hard drive.  You should start by reading the book.
It will familiarize you with how tiny core works.
There is sufficient detail in the wiki to get you loaded via PXE, provided your PXE server is properly configured.
Title: Re: PXE and rdesktop
Post by: indaend on October 29, 2016, 10:36:22 AM
I'm stuck this part - add ”/tftpboot/nfs/ws1 *(rw,no_root_squash)” to /etc/exports, and “exportfs -a”.

Can't understand that. What i have to with these? chmod?
Please describe this in detail.

Thanks.
Title: Re: PXE and rdesktop
Post by: indaend on October 29, 2016, 12:06:21 PM
okay, i understand i have to
1. mkdir -p /tftpboot/nfs/ws1/tce
2. copy nfs-utils.tcz to /tftpboot/nfs/ws1/tce
3. create the file /tftpboot/nfs/ws1/nfs.list that contains:
/nfs/ws1/nfs-utils.tcz
4. Copy tinycore.gz and bzImage to /tftpboot/nfs/ws1
5. add lines”/tftpboot/nfs/ws1 *(rw,no_root_squash)” and “exportfs -a” to /etc/exports

But if i reboot, all tftpboot/* is gone
and etc/export also gone

I have TC installed sda and after restart or shutdown i use backup sda/tce
Title: Re: PXE and rdesktop
Post by: curaga on October 29, 2016, 12:44:42 PM
Those are to be executed on the server. It's not really clear what you're using as a server and how (it can be TC as well). I'm afraid I don't have the time to guide you through step by step.
Title: Re: PXE and rdesktop
Post by: indaend on October 30, 2016, 10:26:56 AM
Right now i'm using WDS server, but TCL cannot get my nfs.list while booting.
Actually i was wondering that is it possible to use TCL platvorm and make there some share and PXE loads needed files from there via nfs and tftp?
Or it's simple to build up some linux PXE server separately insted of using WDS or TCL functions for this?
Title: Re: PXE and rdesktop
Post by: indaend on October 31, 2016, 08:36:55 AM
Okay i figured out and i have now access to my nfs share in TCL with nfsmount

  MENU LABEL ws1
  kernel /nfs/ws1/vmlinuz
  append initrd=/nfs/ws1/core.gz,/nfs/ws1/nfs-utils.cpio.gz nfsmount=myserver:/tftpboot/nfs/ws1

I also added all default extensions (from TinyCore-7.2.iso) to and onboot.lst nfs-utils.cpio.gz

But it doesn't to nothing, all have is terminal screen and my nfs mounted.

What's next?
Title: Re: PXE and rdesktop
Post by: indaend on October 31, 2016, 09:58:31 AM
Okay it seems i need some host machine to be Terminal Server for clients.
But is it possible to install TCL to my windows nfsshare somehow?
Title: Re: PXE and rdesktop
Post by: indaend on November 01, 2016, 12:45:40 PM
So far i have made progress with TC to load into terminal and i made nfs-utils.tcz.
My nfs-utils.tcz contains these files:

\tmp\builtin\onboot.lst
\tmp\builtin\optional

in optional folder i have:
Xvesa.tcz.md5.txt
Xvesa.tcz
Xprogs.tcz
Xlibs.tcz
wbar.tcz
udev-dev.tcz
rpcbind.tcz
rdesktop.tcz
pcsc-lite.tcz
openssl-1.0.0.tcz
libXt.tcz
libXrender.tcz
libXrandr.tcz
libXpm.tcz
libXmu.tcz
libXi.tcz
libXfont.tcz
libXext.tcz
libXdmcp.tcz
libxcb.tcz
libXau.tcz
libX11.tcz
libusb.tcz
libtirpc.tcz
libSM.tcz
libpng.tcz
libjpeg-turbo.tcz
libICE.tcz
libfontenc.tcz
libao.tcz
imlib2-bin.tcz
imlib2.tcz
freetype.tcz
flwm_topside.tcz
fltk-1.3.tcz
aterm.tcz
nfs-utils.tcz

in optional folder

onboot.lst contains:

rpcbind.tcz
libtirpc.tcz
nfs-utils.tcz
aterm.tcz
fltk-1.3.tcz
flwm_topside.tcz
freetype.tcz
imlib2-bin.tcz
imlib2.tcz
libfontenc.tcz
libICE.tcz
libjpeg-turbo.tcz
libpng.tcz
libSM.tcz
libX11.tcz
libXau.tcz
libxcb.tcz
libXdmcp.tcz
libXext.tcz
libXfont.tcz
libXi.tcz
libXmu.tcz
libXpm.tcz
libXrandr.tcz
libXrender.tcz
libXt.tcz
wbar.tcz
Xlibs.tcz
Xprogs.tcz
Xvesa.tcz
libao.tcz
libusb.tcz
openssl-1.0.0.tcz
pcsc-lite.tcz
rdesktop.tcz
udev-dev.tcz

Why it doesn't run to GUI?
i know that rdesktop have been loaded, because if i hit rdesktop it gives me help and directions how to use it.
Title: Re: PXE and rdesktop
Post by: curaga on November 01, 2016, 03:13:22 PM
Try running startx, see what it says.
Title: Re: PXE and rdesktop
Post by: indaend on November 02, 2016, 08:42:13 AM
If i hit startx with tc user then i get:

/usr/bin/xsetup.sh: line 89: can't create /tmp/xsetup.1363.tmp: Permission denied

/usr/bin/select: line: 62: can't open /tmp/xsetup.1363.tmp

cat: can't open '/tmp/select.ans': No such file or directory
rm: can't remove 'tmp/xsetup.1363.tmp': No such file or directory
/usr/bin/xsetup.sh: line 91: can't create /tmp/.xsession: Permission denied
awk: can't open '/tmp/.xsession': Permission denied
chown: /home/tc/.xsession: No such file or directory
/usr/bin/startx: exec line 49: /home/tc/.xsession: not found

If i hit startx with root then it seems to starting GUI, but it doesn't load it all the way.
It asks me resolution and mouse. After i confirm these all i can see is black screen with 'X' mouse cursor.
Title: Re: PXE and rdesktop
Post by: curaga on November 02, 2016, 08:45:36 AM
Something is badly off if you broke /tmp permissions. Did you create the cpio archive on Windows?
Title: Re: PXE and rdesktop
Post by: Misalf on November 02, 2016, 09:03:35 AM
Code: [Select]
sudo chown -R root.staff path/to/cpio/archive/tmp
sudo chmod 1777 path/to/cpio/archive/tmp
Title: Re: PXE and rdesktop
Post by: indaend on November 02, 2016, 09:38:23 AM
You mean core.cpio?

I took it from iso i didn't modify it.
Title: Re: PXE and rdesktop
Post by: Misalf on November 02, 2016, 09:51:18 AM
You said you did just that
  MENU LABEL ws1
  kernel /nfs/ws1/vmlinuz
  append initrd=/nfs/ws1/core.gz,/nfs/ws1/nfs-utils.cpio.gz nfsmount=myserver:/tftpboot/nfs/ws1

I also added all default extensions (from TinyCore-7.2.iso) to and onboot.lst nfs-utils.cpio.gz

However, it still holds true for modified extensions.
Title: Re: PXE and rdesktop
Post by: indaend on November 02, 2016, 10:01:56 AM
Okay then i have to add rights to nfs-utils.cpio.gz?

sudo chown -R nfs-utils.cpio.gz/nfs-utils.cpio/tmp
sudo chmod 1777 nfs-utils.cpio.gz/nfs-utils.cpio/tmp

This might work?
Title: Re: PXE and rdesktop
Post by: Misalf on November 02, 2016, 10:12:48 AM
Uhm, after extracting and before repacking.
Title: Re: PXE and rdesktop
Post by: indaend on November 02, 2016, 12:35:31 PM
Thanks guys, it's working!  ;D