Page 1 of 1
TFTP boot configuration
Posted: Wed Dec 20, 2017 1:06 pm
by Kamaz
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.
Re: TFTP boot configuration
Posted: Thu Dec 21, 2017 8:56 am
by Kamaz
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
Re: TFTP boot configuration
Posted: Wed Jan 17, 2018 11:50 pm
by SA0BJW
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..
Re: TFTP boot configuration
Posted: Thu Jan 18, 2018 5:12 am
by acruhl
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...)
Re: TFTP boot configuration
Posted: Thu Jan 18, 2018 8:14 pm
by Kamaz
It's sad but I haven't enough time for that task. I'll resume my experiments in a week)
Re: TFTP boot configuration
Posted: Fri Jan 19, 2018 11:51 pm
by SA0BJW
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
Re: TFTP boot configuration
Posted: Sat Jan 20, 2018 12:51 am
by eworm
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.
Re: TFTP boot configuration
Posted: Sat Jan 20, 2018 10:04 pm
by SA0BJW
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..
Re: TFTP boot configuration
Posted: Fri May 25, 2018 6:05 am
by 7ak1m
do you you use : username:password@ip-address/filenamepath as parameter in your tftp client ?
"username" user should have access to tftp right.