*New 11.3 series Release:
2019-10-05: XigmaNAS 11.3.0.4.6928 - released, 11.2 series are soon unsupported!

*New 12.0 series Release:
2019-10-05: XigmaNAS 12.0.0.4.6928 - released!

*New 11.2 series Release:
2019-09-23: XigmaNAS 11.2.0.4.6881 - released!

We really need "Your" help on XigmaNAS https://translations.launchpad.net/xigmanas translations. Please help today!

Producing and hosting XigmaNAS costs money. Please consider donating for our project so that we can continue to offer you the best.
We need your support! eg: PAYPAL

[SOLVED] TFTP Server and Service

TFTP and PXE related.
Forum rules
Set-Up GuideFAQsForum Rules
GianDO76
Starter
Starter
Posts: 52
Joined: 14 Jul 2015 08:29
Status: Offline

[SOLVED] TFTP Server and Service

#1

Post by GianDO76 » 27 Sep 2015 00:40

Hello everyone,
I installed NAS4Free on my server to do some 'storage of my data. I'm going to use this server as DHCP and TFTP server for remote installations.
I installed and configured the DHCP server with the package ISC-DHCP43-SERVER and I configured TFTP. It seems to work correctly until the Client (Virtual Machine VMWARE) restarts after loading(?) file inetrd.img for installing CentOS7EL not allowing then to complete the boot from the network.
Why does this happen? Where can I be wrong?

Thanks in Advance
G
Last edited by GianDO76 on 05 Oct 2015 15:29, edited 1 time in total.

User avatar
b0ssman
Forum Moderator
Forum Moderator
Posts: 2458
Joined: 14 Feb 2013 08:34
Location: Munich, Germany
Status: Offline

Re: TFTP Server and Service

#2

Post by b0ssman » 27 Sep 2015 07:31

please do not quadruple post.

one post for your problem is enough
Nas4Free 11.1.0.4.4517. Supermicro X10SLL-F, 16gb ECC, i3 4130, IBM M1015 with IT firmware. 4x 3tb WD Red, 4x 2TB Samsung F4, both GEOM AES 256 encrypted.

GianDO76
Starter
Starter
Posts: 52
Joined: 14 Jul 2015 08:29
Status: Offline

Re: TFTP Server and Service

#3

Post by GianDO76 » 27 Sep 2015 14:52

b0ssman wrote:please do not quadruple post.

one post for your problem is enough
OK Excuse me.

I attached a picture showing TFTP log for better explain the problem..
You do not have the required permissions to view the files attached to this post.

User avatar
b0ssman
Forum Moderator
Forum Moderator
Posts: 2458
Joined: 14 Feb 2013 08:34
Location: Munich, Germany
Status: Offline

Re: TFTP Server and Service

#4

Post by b0ssman » 27 Sep 2015 16:55

can you show the error you are getting on the client?

which of the pxelinux.cfg exists?
Nas4Free 11.1.0.4.4517. Supermicro X10SLL-F, 16gb ECC, i3 4130, IBM M1015 with IT firmware. 4x 3tb WD Red, 4x 2TB Samsung F4, both GEOM AES 256 encrypted.

GianDO76
Starter
Starter
Posts: 52
Joined: 14 Jul 2015 08:29
Status: Offline

Re: TFTP Server and Service

#5

Post by GianDO76 » 27 Sep 2015 17:25

b0ssman wrote:can you show the error you are getting on the client?

which of the pxelinux.cfg exists?
Now i atteched also "default" file in pxelinux.cfg and a picture of a client while do booting

The Client restart be just after Probe EDD ..ok
You do not have the required permissions to view the files attached to this post.

User avatar
b0ssman
Forum Moderator
Forum Moderator
Posts: 2458
Joined: 14 Feb 2013 08:34
Location: Munich, Germany
Status: Offline

Re: TFTP Server and Service

#6

Post by b0ssman » 27 Sep 2015 17:53

you told the machine to boot from nfs. but not where the nfs server is.

see this for an example
http://www.server-world.info/en/note?os ... &p=pxe&f=4
Nas4Free 11.1.0.4.4517. Supermicro X10SLL-F, 16gb ECC, i3 4130, IBM M1015 with IT firmware. 4x 3tb WD Red, 4x 2TB Samsung F4, both GEOM AES 256 encrypted.

GianDO76
Starter
Starter
Posts: 52
Joined: 14 Jul 2015 08:29
Status: Offline

Re: TFTP Server and Service

#7

Post by GianDO76 » 27 Sep 2015 18:02

b0ssman wrote:you told the machine to boot from nfs. but not where the nfs server is.

see this for an example
http://www.server-world.info/en/note?os ... &p=pxe&f=4

NFS Service is just installed e configured

see attachment
You do not have the required permissions to view the files attached to this post.

User avatar
b0ssman
Forum Moderator
Forum Moderator
Posts: 2458
Joined: 14 Feb 2013 08:34
Location: Munich, Germany
Status: Offline

Re: TFTP Server and Service

#8

Post by b0ssman » 27 Sep 2015 18:04

how does the client find out about the where and which share to access from the nfs server?
Nas4Free 11.1.0.4.4517. Supermicro X10SLL-F, 16gb ECC, i3 4130, IBM M1015 with IT firmware. 4x 3tb WD Red, 4x 2TB Samsung F4, both GEOM AES 256 encrypted.

User avatar
b0ssman
Forum Moderator
Forum Moderator
Posts: 2458
Joined: 14 Feb 2013 08:34
Location: Munich, Germany
Status: Offline

Re: TFTP Server and Service

#9

Post by b0ssman » 27 Sep 2015 18:06

this is my netboot (not nfs)

Code: Select all

default rescue64
append scandelay=5 netboot=http://192.168.1.1:81/tftpboot/sysrcd.dat initrd=initram.igz setkmap=uk
timeout 300
prompt 1
display f1boot.msg
F1 f1boot.msg
F2 f2images.msg
F3 f3params.msg
F4 f4arun.msg
F5 f5troubl.msg
F6 f6pxe.msg
F7 f7net.msg
label rescue32
  kernel rescue32
  append scandelay=5 netboot=http://192.168.1.1:81/tftpboot/sysrcd.dat initrd=initram.igz
Nas4Free 11.1.0.4.4517. Supermicro X10SLL-F, 16gb ECC, i3 4130, IBM M1015 with IT firmware. 4x 3tb WD Red, 4x 2TB Samsung F4, both GEOM AES 256 encrypted.

GianDO76
Starter
Starter
Posts: 52
Joined: 14 Jul 2015 08:29
Status: Offline

Re: TFTP Server and Service

#10

Post by GianDO76 » 27 Sep 2015 18:14

b0ssman wrote:how does the client find out about the where and which share to access from the nfs server?
Is that?
I just add a line in default

root=nfs:192.168.0.2:/mnt/repo/tftpboot/swdrep/CentOS7EL/

but nothing to do

where do i mistake?

User avatar
b0ssman
Forum Moderator
Forum Moderator
Posts: 2458
Joined: 14 Feb 2013 08:34
Location: Munich, Germany
Status: Offline

Re: TFTP Server and Service

#11

Post by b0ssman » 27 Sep 2015 18:23

there is no standard for this. every distribution does it differently.
Nas4Free 11.1.0.4.4517. Supermicro X10SLL-F, 16gb ECC, i3 4130, IBM M1015 with IT firmware. 4x 3tb WD Red, 4x 2TB Samsung F4, both GEOM AES 256 encrypted.

GianDO76
Starter
Starter
Posts: 52
Joined: 14 Jul 2015 08:29
Status: Offline

Re: TFTP Server and Service

#12

Post by GianDO76 » 27 Sep 2015 18:26

b0ssman wrote:there is no standard for this. every distribution does it differently.

i tried also in this way, but nothing ...
see attachment
You do not have the required permissions to view the files attached to this post.

GianDO76
Starter
Starter
Posts: 52
Joined: 14 Jul 2015 08:29
Status: Offline

Re: TFTP Server and Service

#13

Post by GianDO76 » 27 Sep 2015 18:28

b0ssman wrote:there is no standard for this. every distribution does it differently.
So, how do i know the correct line in "default" file for nas4free?

User avatar
b0ssman
Forum Moderator
Forum Moderator
Posts: 2458
Joined: 14 Feb 2013 08:34
Location: Munich, Germany
Status: Offline

Re: TFTP Server and Service

#14

Post by b0ssman » 27 Sep 2015 19:01

you will have to read the documentation of centos.
Nas4Free 11.1.0.4.4517. Supermicro X10SLL-F, 16gb ECC, i3 4130, IBM M1015 with IT firmware. 4x 3tb WD Red, 4x 2TB Samsung F4, both GEOM AES 256 encrypted.

GianDO76
Starter
Starter
Posts: 52
Joined: 14 Jul 2015 08:29
Status: Offline

Re: TFTP Server and Service

#15

Post by GianDO76 » 27 Sep 2015 19:12

b0ssman wrote:you will have to read the documentation of centos.
Do you believe that the problem be in CentOS?
I instead believed that the problem was in Nas4Free...
I also prepared DHCP and TFTP Server on CentOS 7 and it works successfully. Clients are booted regularly, but it is not the same with Nas4Free.

User avatar
b0ssman
Forum Moderator
Forum Moderator
Posts: 2458
Joined: 14 Feb 2013 08:34
Location: Munich, Germany
Status: Offline

Re: TFTP Server and Service

#16

Post by b0ssman » 27 Sep 2015 21:09

well your image shows that it boots the kernel
the edd line is an kernel message.

at this stage the pxe boot is complete and the kernel takes over.
Nas4Free 11.1.0.4.4517. Supermicro X10SLL-F, 16gb ECC, i3 4130, IBM M1015 with IT firmware. 4x 3tb WD Red, 4x 2TB Samsung F4, both GEOM AES 256 encrypted.

GianDO76
Starter
Starter
Posts: 52
Joined: 14 Jul 2015 08:29
Status: Offline

Re: TFTP Server and Service

#17

Post by GianDO76 » 27 Sep 2015 21:37

b0ssman wrote:well your image shows that it boots the kernel
the edd line is an kernel message.

at this stage the pxe boot is complete and the kernel takes over.
And why does client reboots just after executed edd?
if i disable edd in "default" file with edd=off and i restart client the system rebooting anyway.

if you see the log file that i posted initially you will notice a line where it is wrote "in.tftp: Client does not accept options"...

User avatar
b0ssman
Forum Moderator
Forum Moderator
Posts: 2458
Joined: 14 Feb 2013 08:34
Location: Munich, Germany
Status: Offline

Re: TFTP Server and Service

#18

Post by b0ssman » 27 Sep 2015 21:52

i would assume that the centos disabled the console for better visual boot effects.

then when the kernel cant mount the root it panics and reboots.
Nas4Free 11.1.0.4.4517. Supermicro X10SLL-F, 16gb ECC, i3 4130, IBM M1015 with IT firmware. 4x 3tb WD Red, 4x 2TB Samsung F4, both GEOM AES 256 encrypted.

GianDO76
Starter
Starter
Posts: 52
Joined: 14 Jul 2015 08:29
Status: Offline

Re: TFTP Server and Service

#19

Post by GianDO76 » 27 Sep 2015 22:04

b0ssman wrote:i would assume that the centos disabled the console for better visual boot effects.

then when the kernel cant mount the root it panics and reboots.
But CentOS installation is textual, there are no graphical effects. Instead, if i do boot from CentOS DHCP and TFTP Server this problem do not appears

User avatar
b0ssman
Forum Moderator
Forum Moderator
Posts: 2458
Joined: 14 Feb 2013 08:34
Location: Munich, Germany
Status: Offline

Re: TFTP Server and Service

#20

Post by b0ssman » 28 Sep 2015 08:45

are there additional dhcp options set on centos?
Nas4Free 11.1.0.4.4517. Supermicro X10SLL-F, 16gb ECC, i3 4130, IBM M1015 with IT firmware. 4x 3tb WD Red, 4x 2TB Samsung F4, both GEOM AES 256 encrypted.

GianDO76
Starter
Starter
Posts: 52
Joined: 14 Jul 2015 08:29
Status: Offline

Re: TFTP Server and Service

#21

Post by GianDO76 » 28 Sep 2015 11:07

b0ssman wrote:are there additional dhcp options set on centos?
The same dhcp options for CentOS and Nas4Free, dhcpd.conf is the same for both.

User avatar
b0ssman
Forum Moderator
Forum Moderator
Posts: 2458
Joined: 14 Feb 2013 08:34
Location: Munich, Germany
Status: Offline

Re: TFTP Server and Service

#22

Post by b0ssman » 28 Sep 2015 11:44

try another distribution first that has debugging on.

like
SystemRescueCD
Nas4Free 11.1.0.4.4517. Supermicro X10SLL-F, 16gb ECC, i3 4130, IBM M1015 with IT firmware. 4x 3tb WD Red, 4x 2TB Samsung F4, both GEOM AES 256 encrypted.

GianDO76
Starter
Starter
Posts: 52
Joined: 14 Jul 2015 08:29
Status: Offline

Re: TFTP Server and Service

#23

Post by GianDO76 » 28 Sep 2015 20:31

b0ssman wrote:try another distribution first that has debugging on.

like
SystemRescueCD
So, i tried with Fedora21 instead CentOS and it seems to work correctly, but now there is another problem. See attachments ..
You do not have the required permissions to view the files attached to this post.

User avatar
b0ssman
Forum Moderator
Forum Moderator
Posts: 2458
Joined: 14 Feb 2013 08:34
Location: Munich, Germany
Status: Offline

Re: TFTP Server and Service

#24

Post by b0ssman » 29 Sep 2015 07:44

so go with a normal installed linux and try mounting the nfs share first.
Nas4Free 11.1.0.4.4517. Supermicro X10SLL-F, 16gb ECC, i3 4130, IBM M1015 with IT firmware. 4x 3tb WD Red, 4x 2TB Samsung F4, both GEOM AES 256 encrypted.

GianDO76
Starter
Starter
Posts: 52
Joined: 14 Jul 2015 08:29
Status: Offline

Re: TFTP Server and Service

#25

Post by GianDO76 » 29 Sep 2015 18:31

b0ssman wrote:so go with a normal installed linux and try mounting the nfs share first.
OK done. See attachment..
You do not have the required permissions to view the files attached to this post.

User avatar
b0ssman
Forum Moderator
Forum Moderator
Posts: 2458
Joined: 14 Feb 2013 08:34
Location: Munich, Germany
Status: Offline

Re: TFTP Server and Service

#26

Post by b0ssman » 29 Sep 2015 18:57

try just mounting /mnt/repo
Nas4Free 11.1.0.4.4517. Supermicro X10SLL-F, 16gb ECC, i3 4130, IBM M1015 with IT firmware. 4x 3tb WD Red, 4x 2TB Samsung F4, both GEOM AES 256 encrypted.

GianDO76
Starter
Starter
Posts: 52
Joined: 14 Jul 2015 08:29
Status: Offline

Re: TFTP Server and Service

#27

Post by GianDO76 » 29 Sep 2015 20:36

b0ssman wrote:try just mounting /mnt/repo
Done, but how you can see in attachment there is nothing to do.
You do not have the required permissions to view the files attached to this post.

User avatar
daoyama
Developer
Developer
Posts: 423
Joined: 25 Aug 2012 09:28
Location: Japan
Status: Offline

Re: TFTP Server and Service

#28

Post by daoyama » 29 Sep 2015 22:33

GianDO76 wrote:
b0ssman wrote:try just mounting /mnt/repo
Done, but how you can see in attachment there is nothing to do.
Probably, you need NFS v4 entry. I think Linux use v4 by default.

Code: Select all

[root@nas4free-testb ~]# cat /etc/exports
/mnt/data -mapall=root -network 172.18.0.0 -mask 255.255.0.0
V4: / -network 172.18.0.0 -mask 255.255.0.0
This entry can be mounted from ubuntu 14.

Code: Select all

aoyama@u14:~$ sudo mount -t nfs 172.18.0.140:/mnt/data /mnt
[sudo] password for aoyama:
aoyama@u14:~$ df
Filesystem                  1K-blocks     Used Available Use% Mounted on
/dev/mapper/ubuntu--vg-root  31613844 15100836  14884032  51% /
none                                4        0         4   0% /sys/fs/cgroup
udev                           503000        4    502996   1% /dev
tmpfs                          102596     1080    101516   2% /run
none                             5120        0      5120   0% /run/lock
none                           512980      152    512828   1% /run/shm
none                           102400       40    102360   1% /run/user
/dev/sda1                      240972    64700    163831  29% /boot
172.18.0.140:/mnt/data        1015424   360576    573568  39% /mnt
NAS4Free 10.2.0.2.2115 (x64-embedded), 10.2.0.2.2258 (arm), 10.2.0.2.2258(dom0)
GIGABYTE 5YASV-RH, Celeron E3400 (Dual 2.6GHz), ECC 8GB, Intel ET/CT/82566DM (on-board), ZFS mirror (2TBx2)
ASRock E350M1/USB3, 16GB, Realtek 8111E (on-board), ZFS mirror (2TBx2)
MSI MS-9666, Core i7-860(Quad 2.8GHz/HT), 32GB, Mellanox ConnectX-2 EN/Intel 82578DM (on-board), ZFS mirror (3TBx2+L2ARC/ZIL:SSD128GB)
Develop/test environment:
VirtualBox 512MB VM, ESXi 512MB-8GB VM, Raspberry Pi, Pi2, ODROID-C1

GianDO76
Starter
Starter
Posts: 52
Joined: 14 Jul 2015 08:29
Status: Offline

Re: TFTP Server and Service

#29

Post by GianDO76 » 29 Sep 2015 22:49

So, if I mount "/mnt/repo" when nfsv4 is disabled, linux (installed) mounts it. But, now i'd like to know how I can export on Nas4Free the following paths

/mnt/repo/tftpboot/swdrep/CentOS7EL_R
/mnt/repo/tftpboot/swdrep/Fedora21_R

User avatar
daoyama
Developer
Developer
Posts: 423
Joined: 25 Aug 2012 09:28
Location: Japan
Status: Offline

Re: TFTP Server and Service

#30

Post by daoyama » 30 Sep 2015 00:12

GianDO76 wrote:So, if I mount /mnt/repo with nfsv4 disabled from normal linux desktop installed it's ok. Now i'd like to know how I can export on Nas4Free the paths following

/mnt/repo/tftpboot/swdrep/CentOS7EL_R
/mnt/repo/tftpboot/swdrep/Fedora21_R
It's simple. You need only add "/" as NFSv4 root directory.
In my case, all directory under /mnt/data can be mounted.

Code: Select all

aoyama@u14:~$ ls -al /mnt
合計 8252
drwxrwxrwx  6 nobody nogroup    1024  6月 14 21:00 .
drwxr-xr-x 23 root   root       4096  4月  8 18:13 ..
drwxrwxr-x  2 nobody nogroup     512 12月  4  2014 .snap
-r--------  1 nobody nogroup 8388608 12月  4  2014 .sujournal
-rw-------  1 nobody nogroup      42  7月  9 23:38 .websrv_htpasswd
drwxr-xr-x  2 nobody nogroup     512 12月 14  2014 conf
drwxr-xr-x  7 nobody nogroup    1024  6月 15 02:30 samba4
drwxrwxrwx  2 nobody nogroup     512  6月 14 21:00 tmp
aoyama@u14:~$ sudo umount /mnt
aoyama@u14:~$ sudo mount -t nfs 172.18.0.140:/mnt/data/samba4 /mnt
aoyama@u14:~$ df
Filesystem                    1K-blocks     Used Available Use% Mounted on
/dev/mapper/ubuntu--vg-root    31613844 15143000  14841868  51% /
none                                  4        0         4   0% /sys/fs/cgroup
udev                             503000        4    502996   1% /dev
tmpfs                            102596     1080    101516   2% /run
none                               5120        0      5120   0% /run/lock
none                             512980      152    512828   1% /run/shm
none                             102400       44    102356   1% /run/user
/dev/sda1                        240972    64700    163831  29% /boot
172.18.0.140:/mnt/data/samba4   1015424   360576    573568  39% /mnt
aoyama@u14:~$ ls -al /mnt
合計 2144
drwxr-xr-x  7 nobody nogroup   1024  6月 15 02:30 .
drwxr-xr-x 23 root   root      4096  4月  8 18:13 ..
-rw-------  1 nobody nogroup 421888  6月 12 18:55 account_policy.tdb
-rw-r--r--  1 nobody nogroup  40200  6月 15 02:29 brlock.tdb
-rw-r--r--  1 nobody nogroup    231  6月 15 02:30 browse.dat
-rw-------  1 nobody nogroup    696  6月 14 21:03 dbwrap_watchers.tdb
-rw-r--r--  1 nobody nogroup 430080  6月 15 02:33 gencache.tdb
-rw-r--r--  1 nobody nogroup    696  7月 10 14:01 gencache_notrans.tdb
-rw-------  1 nobody nogroup    696  6月 12 18:55 group_mapping.tdb
drwxr-xr-x  2 nobody nogroup    512  6月 15 02:33 lck
-rw-r--r--  1 nobody nogroup    696  6月 15 02:29 leases.tdb
-rw-r--r--  1 nobody nogroup  40200  6月 15 02:29 locking.tdb
-rw-------  1 nobody nogroup    696  6月 14 02:54 messages.tdb
drwx------  2 nobody nogroup    512  6月 15 02:33 msg
-rw-------  1 nobody nogroup    696  7月 10 14:01 mutex.tdb
-rw-r--r--  1 nobody nogroup    696  6月 15 02:29 notify.tdb
-rw-r--r--  1 nobody nogroup    696  6月 15 02:29 notify_index.tdb
-rw-r--r--  1 nobody nogroup    696  6月 14 15:00 printer_list.tdb
drwxr-xr-x  2 nobody nogroup    512  6月 14 02:54 printing
drwxr-xr-x  6 nobody nogroup    512  6月 14 02:55 private
-rw-------  1 nobody nogroup 528384  6月 14 02:54 registry.tdb
-rw-r--r--  1 nobody nogroup   8192  6月 15 02:33 serverid.tdb
-rw-------  1 nobody nogroup 421888  6月 14 02:54 share_info.tdb
-rw-r--r--  1 nobody nogroup    650  6月 12 18:55 smb4.conf.created
-rw-------  1 nobody nogroup    696  6月 15 02:29 smbXsrv_open_global.tdb
-rw-------  1 nobody nogroup    696  6月 15 02:29 smbXsrv_session_global.tdb
-rw-------  1 nobody nogroup    696  6月 15 02:29 smbXsrv_tcon_global.tdb
-rw-------  1 nobody nogroup  16384  6月 15 02:29 smbXsrv_version_global.tdb
drwxrwx---  3 nobody nogroup    512  6月 12 18:55 sysvol
If you don't want export from all, you can limit like /mnt/repo as v4 root.
In this case, you can mount /tftpboot/swdrep/CentOS7EL_R as nfs path.
So you cannot mount above /mnt/repo (v4 root) directory.

I feel NFSv4 is simple and easy than NFSv3.

Note:
NFSv4 user map is domain base. (user@localhost by default under NAS4Free)
If your domain is not same, you might need Name = "nfsuserd_flags" and Value = "-domain YOURDOMAIN" in System|Advanced|rc.conf.

You don't mind about UID/GID like NFS v3.
NAS4Free 10.2.0.2.2115 (x64-embedded), 10.2.0.2.2258 (arm), 10.2.0.2.2258(dom0)
GIGABYTE 5YASV-RH, Celeron E3400 (Dual 2.6GHz), ECC 8GB, Intel ET/CT/82566DM (on-board), ZFS mirror (2TBx2)
ASRock E350M1/USB3, 16GB, Realtek 8111E (on-board), ZFS mirror (2TBx2)
MSI MS-9666, Core i7-860(Quad 2.8GHz/HT), 32GB, Mellanox ConnectX-2 EN/Intel 82578DM (on-board), ZFS mirror (3TBx2+L2ARC/ZIL:SSD128GB)
Develop/test environment:
VirtualBox 512MB VM, ESXi 512MB-8GB VM, Raspberry Pi, Pi2, ODROID-C1

Post Reply

Return to “TFTP”