Tiny Core Linux
General TC => General TC Talk => Topic started by: Zendrael on September 06, 2013, 07:51:59 AM
-
Hello all!
Following the Absolute Minimum Netbooting Method from the Wiki, I still can't get my clients to boot... they get some IP address but TFTP gives me an error (screenshot attached).
What should get wrong here?
I'm using (Tiny)Core 4.7.7.
-
What is client01.pxe?
You should be loading pxelinux.0.
-
Hello Gerald_Clark!
I just followed the instructions in the wiki... So, I don't know what is happening, never tested it (the netbooting) before... And in the wiki it doesn't say about pxelinux.0....
Any clues? Ideas? Everything is welcome! =)
-
What wiki article are you referring to?
-
This one: http://wiki.tinycorelinux.net/wiki:netbooting
I have configured the Terminal Server app as described then I started folowing the Absolute Minimum step as described too.
-
Where in there do you see a client01.pxe?
The absolute minimum method does not refer to an absolute minimum method of netbooting.
It is the absolute minimum changes you need to make to a working pxe boot system to allow for a persistent tce directory on nfs.
Get your pxe boot working before you try any of the network based tce directory options.
-
Gerald_Clark, thanks for your reply!
I have no file called client01.pxe... I just have my server and another machine in a VM environment. The client VM (VirtualBox) is called client01 so, if I change its name (for workstation, for exemple) it changes the name of the <file>.pxe... In the server I did nothing about it.
So, if the absolute minimum refers just to persistence, should my system boot just by using the Terminal Server app, right? Well... it is not working... I'm still getting the same error from TFTP... My VirtualBox Server and Client are in the same network.
My setup:
-SERVER VM
- (Tiny)Core 4.7.7
- Network adapter 1: (eth0) NAT
- Network adapter 2: (eth1) Internal Network
- CLIENT VM
- PXE Boot thru Network adapter 1: Internal Network
-
I don't use the terminal server app.
My pxe boot server is CentOS.
You need to get your server's dhcp, tftp, and pxe configuration fixed so you can pxe boot the basic vmlinuz and core.gz files.
Once you have that working, you can add the network persistence to your pxelinux.cfg/default file.
-
Hello Gerald_Clark!
Got the machines booting ok!
Did the "Putting all together" from the wiki but still no nfs... even when I do "ls /mnt/" on the clients, there are just "sr0".
Maybe am I missing something? I get no erros too...
Put a default file at /tftpboot/pxelinux.conf/ with the menu described. Is it correct?
-
The server you specify must have an nfs server running with the specified directory exported.
-
I have nfs-utils loaded into the server and already did the exportfs -a after changes in the /etc/exports.
Should I run any command to start the nfs server?
-
/usr/local/etc/init.d/nfs-server start
-
Followed all the steps again and after starting the server, had some messages (attached because I could not copy and paste from the VM to here) and still does not work... I can't see the PXE menu either...
Edit: (Attached a client machine booting messages too)
-
Hi Zendrael
The nfsd message in the first picture suggests you need to install filesystems-3.0.21-tinycore.tcz
-
Hi Rich!
I've installed and loaded it at boot now. But the clients still don't have a /mnt/nfs after booting...
Also I added the pxelinux.0 to the directory /tftpboot/ copying it from /usr/share/syslinux/ - nothing changed...
I tryied to change the default file in the pxelinux.cfg dir to become the client Mac Address and no luck with that too... When my client boots, the Terminal Server app in the server drops a lot of "tftp: can't open file" messages... like if it doesn't know where to find the files...
-
A plain tftp client helps diagnose files that can't be opened.
Also, with the client01.pxe, I'll bet that's the result of being on the NAT network and VirtualBox handing stuff out.
Put a default file at /tftpboot/pxelinux.conf/ with the menu described. Is it correct?
pxelinux.cfg/ should be your directory name.
-
Hi Genec!
Ooops, the pxelinux.conf was a typo... the directory is pxelinux.cfg already!
The issue with the first screenshot was solved, I had to use a internal network in virtualbox to get the clients booting.
When the client is booting, it says that the prefix of TFTP is "/"... maybe I can change this to pxelinux.cfg in some way?
The booting process is working, just the nsf is not...
-
Hi Zendrael.
What files is the PXELinux reading?
( maybe '01-...', 'C...', and 'default'.)
And what path is pointed?
Please list them.
Regards,
Akane.
-
Hey Akane!
I had in the pxelinux.cfg directory two files, one is 01-<mac_address> and the other is "default" - both have the same information as I'm testing with only a client at the moment.
But, which path is being pointed, I don't know, as I thought that the default path is /tftpboot/pxelinux.cfg... And, as you can see in one of the last screenshots, the tftp say that the prefix is "/" but can't find any files...
Maybe I have some problems with permissions? Can I use "chmod 777 -Rf" in the tftpboot directory without compromising other configs?
-
Hi Zendrael.
Oh sorry. I did not notice the picture.
So now, the PXE client can load the config file and can be booted, right?
Excuse me but I did not understand what is the problem now?
Regards,
Akane.
-
Hi Akane!
The PXE client is not loading the config.
I keep receiving the "tftpd: can't open file" in the Terminal Server app and the only thing that the client do is boot up the base (without any extensions) of the Core...
-
Hi Zendrael!
Now I understand. Thank you!
In the base of the core, could you run `cat /proc/cmdline` and upload the result please?
Regards,
Akane.
-
Hello Akane!
Attached is the result of the command in the server and in the client (as the filename suggests).
Hope it could be helpful!
Thanks for your help!
-
Hi Zendrael!
Thank you for the photos.
The command line lacks 'nfsmount=' option.
Where did you put 'tcz' directory for client?
Please add below to the PXELinux configuration file. (DIRECTORY is the place that you installed 'tcz' directory for client.)
nfsmount=servidor:DIRECTORY
(If the 'tcz' directory is '/tftpboot/tcz', replace DIRECTORY /tftpboot)
Please try.
Regards,
Akane.
-
Note that :D is ':' and 'D'.
-
Hey Akane!
The option is in the "default" and "01-<mac_address>" inside pxeliunux.cfg, inside tftpboot like:
/tftpboot/pxelinux.cfg/default
The problem is that the clients are not reading the files inside pxelinux.cfg... They boot because of the TerminalServer app in the server, but they not read the files inside pxelinux.cfg
-
Hi Zendrael.
Maybe you are wrong.
Sans PXELinux configuration file, client cannot load any other file such as kernel.
So the client loads the configuration file normally.
I'm sorry to trouble you but please show me the pxelinux.cfg/default.
Regards,
Akane.
-
Hey Akane!
The pxelinux.cfg/default is:
label ws1
MENU LABEL WS1
kernel /nfs/ws1/vmlinuz
append initrd=/nfs/ws1/core.gz nfsmount=servidor:/tftpboot/nfs/ws1 tftplist=servidor:/nfs/ws1/nfs.list tce=nfs/tce
And yes, the directories exist and the files vmlinuz and core.gz are there too.
I said that the clients are not reading the files because the server drops that "tftpd: can't open file" just when the clients are trying to read them...
So, by not reading them, they boot thru the vmlinuz and core of the server configured in the Terminal Server app.
-
Hi Zendrael!
Ummmm... I see.
That's really strange.
Thank you.
I think "tftpd: can't open file" is okay because there are no 'C', 'C0' and so on.
I am really sorry but please show me /etc/udhcpd.conf (on the server) and the outputs of 'ps | grep tftpd' (on the server).
Regards,
Akane.
-
Hi Akane!
The "ps | grep tftpd" returns the attached image01.
There is no /etc/udhcpd.conf... BUT as the ps shows a "/netboot" directory, I was looking at it and inside it, there is a udhcpd.conf! The image02 attached show its contents.
I'm really lost on it... maybe I should restart everything from the ground...
-
Hi Zendrael!
Thank you very much!
Possibly the Terminal Server is locating all files for network boot(including pxelinux.cfg/*) into '/netboot'.
If it is correct, there is 'default' configuration file in '/netboot/pxelinux.cfg'. (not 'tftpboot')
Please check.
I wish you well!
Regards,
Akane.
-
Hi Akane!
Yes, I was playing with this directory now! Will redo all of my configs then I'll post back here to say whats worked or not!
The tests may take some time, will post again just tomorrow!
Thanks for your help! When everything works, maybe I will update or put some tips in the wiki.
-
Ok!
Now there is a /mnt/nfs directory in the clients after they boot up! The directory contain a tce dir with onboot.lst, ondemand and optional directories - all of them are empty!
I (re)created the /tftpboot/nfs/ws1 directory and inside it tce directory with some extensions. None is loaded. I have this added to the client boot file:
nfsmount=myserver:/tftpboot/nfs/ws1
and, as you can imagine, what is mounted in the clients is not what this directory contain... even if I try to create a file inside /mnt/nfs in the client, it doesn't show up in the server....
Almost there!!!
-
Hi Zendrael!
Sorry for late because I was sleeping.
Congratulations!
It seems that the client did not mount the NFS share or the client mounted different directory.
So please upload the contents of /etc/exports on the server and the result of running command 'mount' on the client.
Regards,
Akane.
-
Hi Akane!
To sleep is good for your brain! I wish I could do more of it! Hahaha!
Attached are the commands you requested, including the "exportfs -a" which always gave me some messages too.
I have a good feeling about this, we will get there soon!
Thanks!
-
Hi Zendrael!
Thank you for your pictures.
It seems that NFS daemon on server is not running (because the server could not load nfsd kernel module).
I think the kernel version you showed (3.0.21-tinycore) may be incorrect.
Did you 'tce-load'ed 'filesystems-KERNEL'?
Sorry for my ambiguous opinions (because I do not have any PC on that TC can run).
Please show me the result of the command 'uname -r' (kernel version).
Regards,
Akane.
-
Hi Akane!
uname -r shows
3.0.21-tinycore
and I have filesystems-3.0.21-tinycore loaded at boot on the server (confirmed with tce-status -i)
-
Hi Zendrael!
Oh. I see.
Then, please run the command 'depmod' as root and restart nfs-server.
If there are some errors, please show them.
Regards,
Akane.
-
Hey Akane!
The depmod command returned nothing and when restarting the nfs-server I get some messages (attached)
This is becoming a real challenge! Hahahahah
Thanks!
-
Hi Zendrael!
Okay. Thank you!
Now you can network boot the client, maybe.
Please try!
Regards,
Akane.
-
Hi Akane!
The client is booting up, just don't load any extensions and don't mount the nfs share in the server (where the extensions are).
-
Hi Zendrael!
Thank you.
Hmmm... That's strange.
Can you mount the NFS share on the server?
For example,
$ mkdir /tmp/nfs-share
$ sudo mount -t nfs myserver:/tftpboot/nfs/ws1 /tmp/nfs-share
Regards,
Akane.
-
Hi Akane!
I agree, really strange... the command gave an error too... attached is what I've got.
Thanks again!
-
Hi Zendrael!
Hmmm...
First, run the command 'chmod 777 /tftpboot/nfs/ws1', 'exportfs -ra' and retry net booting.
If it fails again, then replace /etc/exportfs like below.
/tftpboot/nfs/ws1 (rw,no_root_squash,fsid=0)
Then run the command 'exportfs -ra' and retry net booting.
Regards,
Akane.
-
Hey Akane!
The directory was chmoded as 777 earlier then I did it again and, after adding the fsid on the /etc/exports, the error in the clients changed as follows (attached)
Thanks again!
-
Hi Zendrael!
Oh! Sorry.
Please restart NFS daemon after 'exportfs -ra'ing.
Regards,
Akane.
-
Unless you have installed and started the nfs-client service on the client, you will need to add the -o nolock mount option.
mount -o nolock 192.168.56.103:/tftpboot/nfs/ws1 /tmp/nfs
-
Hi all!
Good news: the client booted up and the /mnt/nfs is the nfs share on the server, it even can write to it and I can see the files in the server!
What still didn't worked: the extensions are not loaded!
Almost there!!!
-
Hi Zendael!
Great!
Then append 'tce=nfs' to the command line of the client.
It would work soon!
Regards,
Akane.
-
Hi Akane!
Added, restarted and not loading extensions yet... The extensions are in the server, inside /tftpboot/nfs/ws1/tce/optional/
Gerald_clark, thanks by your help, just didn't test because the nfs mount in the boot worked.
Yeah, I believe it will work soon!
Thanks!
-
Hi Zendrael!
Hmmm...
Something is wrong.
Could you add 'pause' boot option for the client, boot him(her) and show us the boot messages?
Regards,
Akane.
-
Does your tce directory have a valid onboot.lst?
Post the output of 'showbootcodes' on the client.
-
Hello!
@Akane, attached is the result after adding 'pause' to the boot of the clients.
@Gerald_clarck, attached is also the result of 'showbootcodes'
In the /tftpboot/nfs/ws1/tce (in the server) I have an onboot.lst that contain:
/nfs/ws1/tce/optional/<extension_names>.tcz
(one extension per line)
Maybe the problem is this file?
-
onboot.lst should not contain paths.
-
Hi Zendrael!
It seems that the extensions are loaded normally.
Are the extensions you want to load listed in the onboot.lst?
If they are listed, append 'showapps' command line option for the client and show us the boot messages.
Regards,
Akane.
-
WOW, IT WORKED!
I copied the onboot.lst from the server, and it booted up and even loaded the Xvesa, wbar... =)
Last step (i guess) the internet connection!
The server has two interfaces, one eth0 connected to the internet and the second eth1 used to share the dhcp to the clients. BUT the server only works online if the second is disabled... the clients are using the server IP as Gateway.
-
Congratulations!
To set true gateway(TRUEGATEWAY), run these commands AS ROOT:
# route del default
# route add -net default gw TRUEGATEWAY
Regards,
Akane.
-
Hi Akane!
Did the commands in the server, it still did not get online, neither the clients.
Do I have to run these commands on every reboot of the server?
If I disable the eth1 (from hardware) in the server, he gets online. With the two network cards, seems like he gets lost... and didn't get online (even getting the right IP)
-
If you intend to use 2 ethernet adapters, you will need to set them up manually in bootlocal.sh.
If you intend to use the server as a router/gateway you will need to do a lot more work, including installation and configuration of
iptables, and enabling forwarding.
To be honest, someone with your experience should not be building internet facing servers.
Buy a consumer DSL/CABLE router and install your servers behind it.
Use it to share your internet connection with your home network.
-
Hi Mr. Gerald_Clark!
I'm used to build LTSP servers with Ubuntu and Debian, LAMP servers and File Servers for small business... But even using Core since version 2, I wasn't feeling confortable to change the working servers replacing the existing distros by Core so I never tryied it before...
Now I have a new project (a charity project) for a small room for children to access internet and learn how to use computers, all machines were donated and my intent is to use Core because in the few years that I use Linux (about 12 years) it's the best distro in many ways following the KISS method.
Maybe you are right, I should not be build servers as I'm more a programmer than a Network Adm... But, well, I'll keep trying!
Thanks again for the help! :D
-
Everybody that helped, thank you very much!
As the objective of the topic was to get the clients booting up and loading the NFS share on the server and now it is working, will mark this topic as solved!
Thank you again!
The Core community is really helpful and all the team is great!
-
I'm used to build LTSP servers with Ubuntu and Debian, LAMP servers and File Servers for small business.
Maybe you are right, I should not be build servers as I'm more a programmer than a Network Adm... But, well, I'll keep trying!
There's nothing necessarily wrong with building the servers however I'd agree that you should drop them behind a consumer-class DSL/Cable router until you learn how to appropriately build a proper system in a lab (including routing rules, possibly NAT rules, firewall rules, hardening/updates). For any publicly-exposed servers, firewall rules and hardening/updates are still necessary.