Community discussions

MikroTik App
 
User avatar
Kamaz
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 62
Joined: Sun Apr 30, 2017 9:35 am

TFTP boot configuration

Wed Dec 20, 2017 1:06 pm

Hello everybody. I want to ask for help with my task.
I can't configure network boot via TFTP on Mikrotik. I tried various instruction but result is the same, I can't boot PC via PXE on Mikrotik.

Here is my configuration:
Mikrotik RB3011, ROS 6.39.2, SeliconPower USB 2.0 drive 16Gb
Bootloader - pxelinux.0

I have network boot server working under Debian with various images and it works fine.
I decided to configure such network boot service using mikrotik. I've formatted USB drive to ext2, but when it becomes clear that my configuration isn't working, I tried to change filesystem to fat32 but it didn't help me.
In general I've done such steeps:
  • DHCP configuration
    Formatting USB drive
    Moving files to USB
    TFTP configuration


Any advices?

Screenshots:
1.png
2.png
3.png
4.png
5.png
PS: Tell me if you need additional information.
You do not have the required permissions to view the files attached to this post.
 
User avatar
Kamaz
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 62
Joined: Sun Apr 30, 2017 9:35 am

Re: TFTP boot configuration

Thu Dec 21, 2017 8:56 am

There are is records in router's system journal about my problem:
tftp, error Error code: 0 string: permission denied!

Looks like problem with filesystem permissions. Any thoughts?

I found those topics, but I can't realize where is my mistake.
viewtopic.php?t=36036
viewtopic.php?t=58211
https://uyirpodiru.blogspot.se/2012/03/ ... -0_05.html
 
SA0BJW
newbie
Posts: 33
Joined: Sun Jul 07, 2013 12:51 am

Re: TFTP boot configuration

Wed Jan 17, 2018 11:50 pm

Have you solved it yet?

I´m trying to do the exact same thing, and get "tftp: ERROR: code 0" in the log.

My target is to have a PXE Clonezilla on the router, I have tried out several different PXE images (Fedora, Ubuntu, Clonezilla, Kali and more) and can´t get any of them to work..
 
User avatar
acruhl
Member
Member
Posts: 371
Joined: Fri Jul 03, 2015 7:22 pm

Re: TFTP boot configuration

Thu Jan 18, 2018 5:12 am

Some netboot experience from me:

1. Don't assume you know what the problem is, even if you see messages on the server end. Do a packet sniff and open it up in Wireshark to see if it looks like the the problem you think it is. It's hard to know exactly what the client is doing because there are usually no messages on the client end. So look at the traffic to see what it's doing.

2. Maybe the "req. filename" vs. "real filename" thing is an issue? Did you try putting the boot file in the actual tftp root dir? I don't know if that's even relevant on a MikroTik TFTP server, I've never tried one.

(I learned most of what I know about netbooting using NetBSD as a boot server and client in the late 90s/early 2000s and haven't done much since...)
 
User avatar
Kamaz
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 62
Joined: Sun Apr 30, 2017 9:35 am

Re: TFTP boot configuration

Thu Jan 18, 2018 8:14 pm

It's sad but I haven't enough time for that task. I'll resume my experiments in a week)
 
SA0BJW
newbie
Posts: 33
Joined: Sun Jul 07, 2013 12:51 am

Re: TFTP boot configuration

Fri Jan 19, 2018 11:51 pm

I made a Wireshark trace, but I can´t really see the problem..

The PXE client sends a request to read the file "default" as configured in the DHCP servers ´Boot File Name field´, the router answers with the file length.
Next the PXE client sends an error code "Code 0, Not defined, Message: TFTP aborted"
And after that the PXE client sends a new request to read the "default" file, the router sends an acknowledge and then transmit the "default" file, and the PXE client makes an acknowledge after receiving the file.

Thats it, nothing more is happening.

I belive I may have a problem in the "default" file, I think the PXE client should request to get the boot image and start the boot sequence after the last ack.

The default file is from the Clonezilla web page;

label Clonezilla-live
MENU LABEL Clonezilla Live (Ramdisk)
KERNEL vmlinuz
APPEND initrd=initrd.img boot=live username=user union=overlay config components quiet noswap edd=on nomodeset nodmraid locales= keyboard-layouts= ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_batch=no net.ifnames=0 nosplash noprompt fetch=tftp://$192.168.1.1/filesystem.squashfs

The file default, vmlinuz, initrd.img and filesystem.squashfs is in the tftpboot root
 
User avatar
eworm
Forum Guru
Forum Guru
Posts: 1071
Joined: Wed Oct 22, 2014 9:23 am
Location: Oberhausen, Germany
Contact:

Re: TFTP boot configuration

Sat Jan 20, 2018 12:51 am

You try to transmit kernel, initrd and filesystem via tftp? This will be no fun as the system would need ages to boot, caused by the single-block lockstep schema. IMHO pxe booting from a Mikrotik device does not make any sense until they decide to implement a simple web server at least.
 
SA0BJW
newbie
Posts: 33
Joined: Sun Jul 07, 2013 12:51 am

Re: TFTP boot configuration

Sat Jan 20, 2018 10:04 pm

You try to transmit kernel, initrd and filesystem via tftp? This will be no fun as the system would need ages to boot, caused by the single-block lockstep schema. IMHO pxe booting from a Mikrotik device does not make any sense until they decide to implement a simple web server at least.
I´m just want it to work just to learn how to configure a PXE server. Maybe a Rasperry Pi is a better host for a PXE Server..
 
7ak1m
just joined
Posts: 1
Joined: Fri May 25, 2018 5:59 am

Re: TFTP boot configuration

Fri May 25, 2018 6:05 am

do you you use : username:password@ip-address/filenamepath as parameter in your tftp client ?

"username" user should have access to tftp right.

Who is online

Users browsing this forum: No registered users and 170 guests