Error 0 tftp aborted received from

Загрузка по сети clonezilla Есть задача, загрузить по сети clonezilla, обязательное условие в качестве сервера выступает windows. Испробовали кучу разного софта все безрезультатно. Дабы понять в чем затык поднял всю эту лабуду на Linux, все завелось с первого раза. Все файлы (ядро, рам, сквашФС, menu.c32, pxelinux.0) параметры меню одинаковые, но в виндовсе не работает […]

Содержание

  1. Загрузка по сети clonezilla
  2. Arch Linux
  3. #1 2020-03-05 23:53:56
  4. TFTP error 0 during PXE
  5. Arch Linux
  6. #1 2014-01-02 18:22:25
  7. [Solved]PXE for old computer
  8. #2 2014-01-02 21:58:15
  9. Re: [Solved]PXE for old computer
  10. #3 2014-01-03 00:20:31
  11. Re: [Solved]PXE for old computer
  12. #4 2014-01-03 04:30:34
  13. Re: [Solved]PXE for old computer
  14. #5 2014-01-03 15:10:20
  15. Re: [Solved]PXE for old computer
  16. #6 2014-01-03 15:10:35
  17. Re: [Solved]PXE for old computer
  18. #7 2014-01-04 02:36:28
  19. Re: [Solved]PXE for old computer
  20. #8 2014-02-10 01:36:10
  21. Re: [Solved]PXE for old computer
  22. #9 2014-02-10 02:32:07
  23. Re: [Solved]PXE for old computer
  24. Contact US
  25. Come Join Us!
  26. Posting Guidelines
  27. TFTP: error code 0 received — TFTP Error: Path not found
  28. TFTP: error code 0 received — TFTP Error: Path not found
  29. TFTP: error code 0 received — TFTP Error: Path not found
  30. RE: TFTP: error code 0 received — TFTP Error: Path not found
  31. RE: TFTP: error code 0 received — TFTP Error: Path not found
  32. RE: TFTP: error code 0 received — TFTP Error: Path not found

Загрузка по сети clonezilla

Есть задача, загрузить по сети clonezilla, обязательное условие в качестве сервера выступает windows. Испробовали кучу разного софта все безрезультатно. Дабы понять в чем затык поднял всю эту лабуду на Linux, все завелось с первого раза. Все файлы (ядро, рам, сквашФС, menu.c32, pxelinux.0) параметры меню одинаковые, но в виндовсе не работает в линуксе работает, как так?

вот конфиг менюшки:

вот даже для наглядности видео сделал http://youtu.be/I30EFq8Xx5Q

Помогите плиз, а то я уже вообще не понимаю как так может быть

Думаю, вам нужно копать в сторону DHCP-сервера. Вы ничего не написали про его настройки и не понятно, разные ли они в случае windows и linux?

настройки прописывал как статические так и dhcp, результат тот же. Эта зараза (в случае с виндовс) пишет что сетевая карта не поддерживается ядром,но за тем мы видим с помощью ifconfig что интерфейс eth0 есть и настраивается, я в ступоре, противоречие. В случае с линуксом никаких настроек по настройке сети не нужно.

настойки идентичніе, используется syslinux же.

Настройки dhcp-сервера через syslinux?

На какой минуте видео пишется, что сетевая не поддерживается? Там проходит 15 секунд, в течении которых clonezilla пытается получить настройки сетевой карточки по dhcp и дальше она выпадет в осадок.

Поэтому я и спрашиваю, как настроен dhcp-сервер, когда сервером выстуает windows и какое имя у этого dhcp-сервера?

mky благодарю за наводку, сам dhcp настроен правильно и работает, оказалось что для того чтоб все заработало нужен DNS сервер, но он нужен не клиенту а серверу виндовому, вот дамп http://pastebin.com/n1cKdZCf

ИП 10.10.10.1 — это и есть сервер на ХР, клиенты в пуле 10.10.10.10 — 10.10.10.20, осталось ради спортивного азарта понять почему так, или может кто нибуть подскажет. Так как логики я в этом не вижу.

Можешь выложить скриншоты всех закладок настроек tftpd32 ? Фаервол на всякий глянь, статистику по пакетам в виндах неплохо бы посмотреть, тип сетевухи попробуй поменять, версию tftpd32 попробуй другую, как-то давно напарывался в ней на невнятное поведение, не помню уже что-там было. Да, и имя хоста винды ты так и не написал.

ПЖЖИ! Это где такое есть? Фича клонзиллы самой или чего?

ПЖЖИ! Это где такое есть? Фича клонзиллы самой или чего?

handbrake, фаервол отключен, с сетевухой и версией все путем, как выяснилось затык именно в ДНСе. хостнейм test-xp, скрины http://www.ex.ua/80907992

эту строку можно и по http грузить я делал ее такой: fetch=http://10.10.10.1/filesystem.squashfs

вот даже лог tftpd32

Message received on an unbound interface (IP 192.168.0.16)

ИП 10.10.10.1 — это и есть сервер на ХР, клиенты в пуле 10.10.10.10 — 10.10.10.20

Не смущает ? Скрины не открываются, код какой-то хочет. Сколько сетевух в xp ? Возможно имеет смысл через netsh зачистить следы старых.

На втором скрине вторую галку поставь

пробовал, результат идентичен.

а не должен быть. на третьем первую можно попробовать убрать.

аналогично, слушай а зачем имя сервера? оно же нигде не фигурирует в настройках.

а вдруг там «андрей-пк»

в общем завели всю эту беду, на виртуалке работает а на реальном железе нет. в данный момент удалось заставить работать на реальном железе следующую связку:
Dual DHCP DNS Server — в качестве DHCP севера
tftpd32 — используется только tftp
nginx — для загрузки filesystem.squashfs

на виртуалке заработало все только на tftpd32 но с участием ДНС сервера, обсасывали уже.

На данный момент хочется вовсе отказатся от tftpd32 в пользу OpenTFTPServer, на реальном железе не удается получить менюшку запуска, ошибка «error code 0 at client tftp aborder», на виртуалке все работает как часы. При чем пробовал следующую конструкцию, в роли сервера выступает виртуалка а в роли клиента (машинки что грузится реальная железка) и все опять же работает, так что даже не знаю куда копать, конфиги опять же идентичны.

Мыслей, почему работает только в виртуалке нет.

Я бы стал сравнивать дамп тарфика в этих двух случаях, при этом получал бы чего с помощью третье машины, подключая клиента на один хаб с неё (или через умный свитч с функцией port mirror). То есть смотреть то, что дейстивтельно передаётся по сети, а не то, что доходит до виртуалки. Но это долго и не факт, что будет найдена причина.

возможно сегодня, если получится, подниму все это дело на линуксе на реальном железе, и протестирую но уверен что все заработает. Как меня уже подзадолбал этот кривой вендовый софт, хорошо что nginx и Dual DHCP DNS Server на дефолте работают безотказно.

вот выхлоп Open TFTP Server

но с виртуалки на этом же конфиге все работает.

а вот и конфиг Open TFTP Server:

я пробовал с помощью tftpd32 получать менюшку а дальше все грузить с Open TFTP Server, вырубив tftpd32, также все успешно грузится.

ПС. С умным свичем также протестирую, спс за наводку.

есть вот такая железяка HP 1810-8G, port mirror поддерживает, в понедельник буду тестить.

Источник

Arch Linux

You are not logged in.

#1 2020-03-05 23:53:56

TFTP error 0 during PXE

I have an old system which does not support USB boot and doesn’t have a CD player, I used [https://wiki.archlinux.org/index.php/PXE] this method for booting over LAN and install Arch Linux.
Everything goes well and both of computer recognized each other, but as soon as the first file was on the fly to go to the other computer these error raised within DNSMASQ:

Mar 06 02:10:01 archlinux dnsmasq-dhcp[25928]: DHCP, IP range 192.168.0.50 — 192.168.0.150, lease time 12h
Mar 06 02:10:01 archlinux dnsmasq-dhcp[25928]: DHCP, sockets bound exclusively to interface eno1
Mar 06 02:10:01 archlinux dnsmasq-tftp[25928]: TFTP root is /mnt/archiso
Mar 06 02:11:15 archlinux dnsmasq-dhcp[25928]: DHCPDISCOVER(eno1) 00:19:66:1b:fa:ce
Mar 06 02:11:15 archlinux dnsmasq-dhcp[25928]: DHCPOFFER(eno1) 192.168.0.131 00:19:66:1b:fa:ce
Mar 06 02:11:17 archlinux dnsmasq-dhcp[25928]: DHCPREQUEST(eno1) 192.168.0.131 00:19:66:1b:fa:ce
Mar 06 02:11:17 archlinux dnsmasq-dhcp[25928]: DHCPACK(eno1) 192.168.0.131 00:19:66:1b:fa:ce
Mar 06 02:11:17 archlinux dnsmasq-tftp[25928]: error 0 TFTP Aborted received from 192.168.0.131
Mar 06 02:11:17 archlinux dnsmasq-tftp[25928]: failed sending /mnt/archiso/arch/boot/syslinux/lpxelinux.0 to 192.168.0.131
Mar 06 02:11:17 archlinux dnsmasq-tftp[25928]: sent /mnt/archiso/arch/boot/syslinux/lpxelinux.0 to 192.168.0.131

I would be happy if you help me to solve this problem.

Источник

Arch Linux

You are not logged in.

#1 2014-01-02 18:22:25

[Solved]PXE for old computer

I am trying to install arch on a acer aspire 3500 that has a broken cd. I tried the tutorial and archlinux with dnsmasq, as put in the tutorial, but half of the transmission tftp client sends a fragmented ip protocol paquet and stops. I do not understand about networks and have no idea how to interpret this, much less how to fix it.

Server logs

Server config

PXE packet dump
This is the capture with wireshark only pxe. Wireshark capture only pxe 180 p

I tested the server with a Thinkpad T430u and it works. I searched older tftp servers but not cleared me. I’ve also noticed that the tsize in package 5 marked as 0. I do not understand much about this topic.
Please help me save this junk.

Last edited by botika (2014-02-10 01:36:37)

#2 2014-01-02 21:58:15

Re: [Solved]PXE for old computer

does your computer support USB booting? if yes, use that to install Arch

if not, does your computer have a floppy drive?

There’s no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

#3 2014-01-03 00:20:31

Re: [Solved]PXE for old computer

It has no floppy or USB boot. the hard disk is the stone age, the connector is similar to IDE but more small. And the cd sounds like it’s chewing.
The service works with a current computer. Only problem is copyright of the pxe client is 2003-2006.
By if it is useful pxe client is SiS900 PXE BootROM v1.09f — ZL5_0324 Use BEV/BBS I already have searched and found nothing.
Now I am studying in depth Dnsmasq Man and BOOTP / DHCP options and when I finish the final exams I will watch the RCP source to see the changes.

Sorry, I think I have not made that clear. I need to know why the packet number 117 of dump is fragmented IP protocol, and any idea to solve. Please, no dump packages before looking if it boot from usb. I’m dumb but not quite.

thanks for your answer

Last edited by botika (2014-01-03 00:40:56)

#4 2014-01-03 04:30:34

Re: [Solved]PXE for old computer

I know nothing about PXE so here are some more potential workarounds:

1. If you can borrow another laptop you can just transplant the hard drive and install from there.
2. If your laptop has a working Windows install and you want to have some fun, I believe you can install grub2 using cygwin and then chainload a usb drive from grub (https://help.ubuntu.com/community/BootF … g_via_GRUB) .

Steven [ web : git ]
GPG: 327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com

#5 2014-01-03 15:10:20

Re: [Solved]PXE for old computer

Very good the second method, even so does not help me either because I have no conditions. Thanks

#6 2014-01-03 15:10:35

Re: [Solved]PXE for old computer

Are you sure that this is not RPL? The network card may need to be flashed to accept PXE. But if you can download anything to the hard drive, get ipxe, and grub4dos (if needed) to load the ipxe kernel and it should recognize your network card, and then you can boot from the pxe boot directly over the internet from instructions on https://releng.archlinux.org/pxeboot/.

I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces.
Look ma, no mouse.

#7 2014-01-04 02:36:28

Re: [Solved]PXE for old computer

Sorry I do not know the term RPL. I have no way to get into the hard drive, except PXE, and has a hard drive installed freebsd but I broke the boot a few years ago while learning; I bought the tower and was in a storage room until recently because my father needs to some scales or something told me.
thanks for your answer, probably was dhcp options. I’ve been looking and the 209 and 210 belong to RFC 5071 dated 12/2007 and is copyright 2003-2006 may not support and this failure. I have to look at it, before but will the linear geometry. the test is on the 8th but rather I had not posted. Or this option —tftp-no-blocksize. I don’t know

thank you very much, least behaved as if I were a secretary

PD: I hope that no secretary in this forum,

Last edited by botika (2014-01-04 02:42:29)

#8 2014-02-10 01:36:10

Re: [Solved]PXE for old computer

I have not managed to run PXE, luckily I found a laptop in the trash and remove the CD.

#9 2014-02-10 02:32:07

Re: [Solved]PXE for old computer

Of course, having a permanent PXE installation is easier to manage once you get the hang of it. Just point your tftp and dhcp options to a directory where your PXE installation is at. Add the net and nfs hooks, (share the nfs exports here also), and recompile the kernel and that’s really the only difference. Oh, well better luck next time.

I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces.
Look ma, no mouse.

Источник

Thanks. We have received your request and will respond promptly.

Come Join Us!

  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It’s Free!

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

TFTP: error code 0 received — TFTP Error: Path not found

TFTP: error code 0 received — TFTP Error: Path not found

TFTP: error code 0 received — TFTP Error: Path not found

I am able to copy flash from a 2505 to my tftp server, and I can copy the running-config fine from the 2501 to the same tftp server, but when I try to copy the flash, this is what I get:
2501#copy flash tftp

System flash directory:
File Length Name/status
1 9404512 rtr/c2500-js-l.113-5.T.bin
[9404576 bytes used, 7372640 available, 16777216 total]
Address or name of remote host [192.168.1.100]? 192.168.1.100
Source file name? rtr/c2500-js-l.113-5.T.bin
Destination file name [rtr/c2500-js-l.113-5.T.bin]?
Verifying checksum for ‘rtr/c2500-js-l.113-5.T.bin’ (file # 1). OK
Copy ‘rtr/c2500-js-l.113-5.T.bin’ from Flash to server
as ‘rtr/c2500-js-l.113-5.T.bin’? [yes/no]y
TFTP: error code 0 received — TFTP Error: Path not found

Copy aborted — TFTP timeout
2501#
What could cause this? Here is some more information.
2501#sh flash all

System flash directory:
File Length Name/status
addr fcksum ccksum
1 9404512 rtr/c2500-js-l.113-5.T.bin
0x40 0x5257 0x5257
[9404576 bytes used, 7372640 available, 16777216 total]
16384K bytes of processor board System flash (Read ONLY)

Chip Bank Code Size Name
1 1 01AD 2048KB AMD 29F016
2 1 01AD 2048KB AMD 29F016
3 1 01AD 2048KB AMD 29F016
4 1 01AD 2048KB AMD 29F016
1 2 01AD 2048KB AMD 29F016
2 2 01AD 2048KB AMD 29F016
3 2 01AD 2048KB AMD 29F016
4 2 01AD 2048KB AMD 29F016
Executing current image from System flash
2501#
Thanks to anyone who can help.
Jeff

RE: TFTP: error code 0 received — TFTP Error: Path not found

Can you ping the computer that host the TFTP server? If no, are they on the same subnet/same IP rage?

RE: TFTP: error code 0 received — TFTP Error: Path not found

rename the file on the tftp server from

then try again, by the way what OS and TFTP server are you using?

RE: TFTP: error code 0 received — TFTP Error: Path not found

>>Can you ping the computer that host the TFTP server? If no, are they on the same subnet/same IP rage? >rename the file on the tftp server from

then try again, by the way what OS and TFTP server are you using?

Источник

strongsaxophone
Member
From: Mashhad , Iran
Registered: 2018-12-31
Posts: 2
Website

TFTP error 0 during PXE

Hi Friends,

  I have an old system which does not support USB boot and doesn’t have a CD player, I used [https://wiki.archlinux.org/index.php/PXE] this method for booting over LAN and install Arch Linux.
Everything goes well and both of computer recognized each other, but as soon as the first file was on the fly to go to the other computer these error raised within DNSMASQ:

Mar 06 02:10:01 archlinux dnsmasq-dhcp[25928]: DHCP, IP range 192.168.0.50 — 192.168.0.150, lease time 12h
Mar 06 02:10:01 archlinux dnsmasq-dhcp[25928]: DHCP, sockets bound exclusively to interface eno1
Mar 06 02:10:01 archlinux dnsmasq-tftp[25928]: TFTP root is /mnt/archiso
Mar 06 02:11:15 archlinux dnsmasq-dhcp[25928]: DHCPDISCOVER(eno1) 00:19:66:1b:fa:ce
Mar 06 02:11:15 archlinux dnsmasq-dhcp[25928]: DHCPOFFER(eno1) 192.168.0.131 00:19:66:1b:fa:ce
Mar 06 02:11:17 archlinux dnsmasq-dhcp[25928]: DHCPREQUEST(eno1) 192.168.0.131 00:19:66:1b:fa:ce
Mar 06 02:11:17 archlinux dnsmasq-dhcp[25928]: DHCPACK(eno1) 192.168.0.131 00:19:66:1b:fa:ce
Mar 06 02:11:17 archlinux dnsmasq-tftp[25928]: error 0 TFTP Aborted received from 192.168.0.131
Mar 06 02:11:17 archlinux dnsmasq-tftp[25928]: failed sending /mnt/archiso/arch/boot/syslinux/lpxelinux.0 to 192.168.0.131
Mar 06 02:11:17 archlinux dnsmasq-tftp[25928]: sent /mnt/archiso/arch/boot/syslinux/lpxelinux.0 to 192.168.0.131

I would be happy if you help me to solve this problem.

Thank you.
Ali


Is it life like a box of chocolate ?

Issue

After attempting PXE boot of machine to build a RHEL 7.6 image:
* Client boots in PXE Subnet
* Foreman discovery menu item loads
* vmlinuz0 loads
* initrd0.img attempts to load… Dots repeat a number of times (sometimes up to 3 lines) and then stop. After a few minutes it fails.

In /var/log/messages we can see lots of in.tftpd[PID] log messages.

After RRQ from IP filename pxelinux.0 it shows
Error code 0: TFTP Aborted
Then RRQ from IP filename pxelinux.0 again
Client IP finished pxelinux.0
Lots more RRQ/Client lines before:
RRQ from IP filename boot/fdi-image/initrd0.img
Client IP finished boot/fdi-image/initrd0.img
Client IP timed out

Environment

Red Hat Satellite or Proxy

6.4

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In


0

1

Есть задача, загрузить по сети clonezilla, обязательное условие в качестве сервера выступает windows. Испробовали кучу разного софта все безрезультатно. Дабы понять в чем затык поднял всю эту лабуду на Linux, все завелось с первого раза. Все файлы (ядро, рам, сквашФС, menu.c32, pxelinux.0) параметры меню одинаковые, но в виндовсе не работает в линуксе работает, как так?

вот конфиг менюшки:

DEFAULT menu.c32
TIMEOUT 60
MENU TITLE ==============( PXE BOOT MENU SIA )================

LABEL Clonezilla
MENU LABEL Clonezilla
KERNEL images/clonezilla/vmlinuz
APPEND initrd=images/clonezilla/initrd.img boot=live config noprompt noswap nomodeset nolocales/nosplash edd=on vga=788 ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_keymap="" ocs_live_bash="no" ocs_lang="" fetch=tftp://10.10.10.1/images/clonezilla/filesystem.squashfs

вот даже для наглядности видео сделал
http://youtu.be/I30EFq8Xx5Q

Помогите плиз, а то я уже вообще не понимаю как так может быть

I am trying to PXE boot from a Windows 2019 server running tftpd32, as installed by CloneDeploy 1.4.0. The server’s firewall is disabled. When trying to PXE boot (ipxe), the clients get an IP through DCHP, and are able to connect to the TFTP server, but then transfer times out:

TFTP.
PXE-E35
PXE-E39

This setup had been working pre-Corona, but now no longer. I am a bit rusty on what may have changed since. I have updated my computer BIOS/UEFI, but that is not the issue I think as i meet the same trouble when PXE-booting another machine that i have not touched. Both booting through Intel NICs on multiple machines and through a QLogic NIC fails, same symptoms and log (see below). I have updated the pfsense version (separate box running DHCP server), but i don’t see how that could affect things as the DHCP side of things seems to work fine?

Client and server are on the same subnet, with only a (definitely not overloaded) switch in between. Switch has no traffic restrictions defined on it.

I have locally booted a computer from which I tried to network boot. When running a TFTP client on this computer, i can download the file in question, pxeboot.0 just fine.
This is the tftpd32 log of a failed boot attempt:

Connection received from 10.0.1.76 on port 2070 [21/08 09:20:14.219]
Read request for file <pxeboot.0>. Mode octet [21/08 09:20:14.219]
OACK: <tsize=67641,> [21/08 09:20:14.219]
Using local port 60476 [21/08 09:20:14.219]
Peer returns ERROR <TFTP Aborted> -> aborting transfer [21/08 09:20:14.219]
Connection received from 10.0.1.76 on port 2071 [21/08 09:20:14.219]
Read request for file <pxeboot.0>. Mode octet [21/08 09:20:14.219]
OACK: <blksize=1456,> [21/08 09:20:14.219]
Using local port 60477 [21/08 09:20:14.219]
Ack block 1 ignored (received twice) [21/08 09:20:16.235]
TIMEOUT waiting for Ack block #2  [21/08 09:20:34.279]

and here a log from a successful transfer using a tftp client when booted into Windows (also works with default blocksize, which removed that from the OACK):

Connection received from 10.0.1.36 on port 59131 [21/08 10:19:54.213]
Read request for file <pxeboot.0>. Mode octet [21/08 10:19:54.213]
OACK: <blksize=1024,tsize=67641,> [21/08 10:19:54.213]
Using local port 49403 [21/08 10:19:54.213]
<pxeboot.0>: sent 67 blks, 67641 bytes in 0 s. 0 blk resent [21/08 10:19:54.213]

I have tried changing the settings of tftpd32: tried all combinations of «option negotiation» and «PXE Compatibility» on and off, doesn’t fix the problem.

What could i try to diagnose or fix this?

If you are using DHCP server in your network environment, it’s handy to be able to boot from network. It brings you many advantages especially when you are not able to boot operating system from the workstation’s disk.

I would like to describe my experience with DHCP server called Dnsmasq. This software can also serve TFTP requests and act as DNS forwarder.

There are many how-to pages how to setup PXE. In most of them you need NFS, xinetd or similar CPU/memory consuming stuff.

You can see how you can setup working boot environment «only» with ISO image of SystemRescueCd and dnsmasq.

Let’s start with installing dnsmasq and downloading iso image of SystemRescueCd:

aptitude install dnsmasq bzip2
mkdir -vp /home/ftp/pub/distributions
cd /home/ftp/pub/distributions
wget http://sourceforge.net/projects/systemrescuecd/files/sysresccd-x86/1.5.1/systemrescuecd-x86-1.5.1.iso/download

Mount ISO file and make it permanent in fstab:

mkdir -v systemrescuecd tftpboot
echo "`readlink -f systemrescuecd*.iso` $PWD/systemrescuecd iso9660 ro,loop,auto 0 0" >> /etc/fstab
mount systemrescuecd

Fill tftpboot directory with necessary files/links:

mkdir -v tftpboot/pxelinux.cfg
sed 's@initrd=initram.igz@initrd=initram.igz netboot=tftp://192.168.0.1/sysrcd.dat  rootpass=xxxx setkmap=us@' systemrescuecd/isolinux/isolinux.cfg >tftpboot/pxelinux.cfg/default
for FILE in systemrescuecd/isolinux/* systemrescuecd/sysrcd* systemrescuecd/ntpasswd systemrescuecd/bootdisk
  do ln -vs ../$FILE tftpboot/`basename $FILE`
done
wget http://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-3.86.tar.bz2 -O - | 
tar xvjf - --to-stdout syslinux-3.86/core/pxelinux.0 >tftpboot/pxelinux.0

Configure dnsmasq to listen on eth1:

mv -v /etc/dnsmasq.conf /etc/dnsmasq.conf.old
cat < EOF >/etc/dnsmasq.conf
domain-needed
bogus-priv
interface=eth1
bind-interfaces
expand-hosts
domain=linux.xvx.cz
dhcp-range=192.168.0.50,192.168.0.150,12h
dhcp-boot=pxelinux.0
enable-tftp
tftp-root=$PWD/tftpboot
EOF

Restart dnsmasq daemon and try to boot over network from computer connected to eth1 interface.

ifconfig eth1 192.168.0.1 netmask 255.255.255.0
dnsmasq --keep-in-foreground --no-daemon --log-queries --log-facility=/tmp/dnsmasq_log --log-dhcp --dhcp-leasefile=/tmp/dhcp-leasefile

You should see something like:
(I included examples for 100 Mbit and 1 Gbit network to see the speed difference)

Another example from VirtualBox:

Dnsmasq produced this output:

root@debian:/home/ftp/pub/distributions# dnsmasq --keep-in-foreground --no-daemon --log-queries --log-facility=/tmp/dnsmasq_log --log-dhcp --dhcp-leasefile=/tmp/dhcp-leasefile
dnsmasq: started, version 2.52 cachesize 150
dnsmasq: compile time options: IPv6 GNU-getopt DBus I18N DHCP TFTP
dnsmasq-dhcp: DHCP, IP range 192.168.0.50 -- 192.168.0.150, lease time 12h
dnsmasq-tftp: TFTP root is /home/ftp/pub/distributions/tftpboot
dnsmasq: reading /etc/resolv.conf
dnsmasq: using nameserver 208.67.220.220#53
dnsmasq: ignoring nameserver 192.168.0.1 - local interface
dnsmasq: read /etc/hosts - 7 addresses
dnsmasq-dhcp: 3587244887 Available DHCP range: 192.168.0.50 -- 192.168.0.150
dnsmasq-dhcp: 3587244887 Vendor class: PXEClient:Arch:00000:UNDI:002001
dnsmasq-dhcp: 3587244887 DHCPDISCOVER(eth1) 00:13:d4:d1:03:57
dnsmasq-dhcp: 3587244887 DHCPOFFER(eth1) 192.168.0.90 00:13:d4:d1:03:57
dnsmasq-dhcp: 3587244887 requested options: 1:netmask, 2:time-offset, 3:router, 5, 6:dns-server,
dnsmasq-dhcp: 3587244887 requested options: 11, 12:hostname, 13:boot-file-size, 15:domain-name,
dnsmasq-dhcp: 3587244887 requested options: 16:swap-server, 17:root-path, 18:extension-path,
dnsmasq-dhcp: 3587244887 requested options: 43:vendor-encap, 54:server-identifier, 60:vendor-class,
dnsmasq-dhcp: 3587244887 requested options: 67:bootfile-name, 128, 129, 130, 131, 132,
dnsmasq-dhcp: 3587244887 requested options: 133, 134, 135
dnsmasq-dhcp: 3587244887 tags: eth1
dnsmasq-dhcp: 3587244887 next server: 192.168.0.1
dnsmasq-dhcp: 3587244887 sent size:  1 option: 53:message-type  02
dnsmasq-dhcp: 3587244887 sent size:  4 option: 54:server-identifier  192.168.0.1
dnsmasq-dhcp: 3587244887 sent size:  4 option: 51:lease-time  00:00:a8:c0
dnsmasq-dhcp: 3587244887 sent size:  4 option: 58:T1  00:00:54:60
dnsmasq-dhcp: 3587244887 sent size:  4 option: 59:T2  00:00:93:a8
dnsmasq-dhcp: 3587244887 sent size: 11 option: 67:bootfile-name  70:78:65:6c:69:6e:75:78:2e:30:00
dnsmasq-dhcp: 3587244887 sent size:  4 option:  1:netmask  255.255.255.0
dnsmasq-dhcp: 3587244887 sent size:  4 option: 28:broadcast  192.168.0.255
dnsmasq-dhcp: 3587244887 sent size:  4 option:  3:router  192.168.0.1
dnsmasq-dhcp: 3587244887 sent size:  4 option:  6:dns-server  192.168.0.1
dnsmasq-dhcp: 3587244887 sent size: 13 option: 15:domain-name  linux.xvx.cz
dnsmasq-dhcp: 3587244887 Available DHCP range: 192.168.0.50 -- 192.168.0.150
dnsmasq-dhcp: 3587244887 Vendor class: PXEClient:Arch:00000:UNDI:002001
dnsmasq-dhcp: 3587244887 DHCPREQUEST(eth1) 192.168.0.90 00:13:d4:d1:03:57
dnsmasq-dhcp: 3587244887 DHCPACK(eth1) 192.168.0.90 00:13:d4:d1:03:57
dnsmasq-dhcp: 3587244887 requested options: 1:netmask, 2:time-offset, 3:router, 5, 6:dns-server,
dnsmasq-dhcp: 3587244887 requested options: 11, 12:hostname, 13:boot-file-size, 15:domain-name,
dnsmasq-dhcp: 3587244887 requested options: 16:swap-server, 17:root-path, 18:extension-path,
dnsmasq-dhcp: 3587244887 requested options: 43:vendor-encap, 54:server-identifier, 60:vendor-class,
dnsmasq-dhcp: 3587244887 requested options: 67:bootfile-name, 128, 129, 130, 131, 132,
dnsmasq-dhcp: 3587244887 requested options: 133, 134, 135
dnsmasq-dhcp: 3587244887 tags: eth1
dnsmasq-dhcp: 3587244887 next server: 192.168.0.1
dnsmasq-dhcp: 3587244887 sent size:  1 option: 53:message-type  05
dnsmasq-dhcp: 3587244887 sent size:  4 option: 54:server-identifier  192.168.0.1
dnsmasq-dhcp: 3587244887 sent size:  4 option: 51:lease-time  00:00:a8:c0
dnsmasq-dhcp: 3587244887 sent size:  4 option: 58:T1  00:00:54:60
dnsmasq-dhcp: 3587244887 sent size:  4 option: 59:T2  00:00:93:a8
dnsmasq-dhcp: 3587244887 sent size: 11 option: 67:bootfile-name  70:78:65:6c:69:6e:75:78:2e:30:00
dnsmasq-dhcp: 3587244887 sent size:  4 option:  1:netmask  255.255.255.0
dnsmasq-dhcp: 3587244887 sent size:  4 option: 28:broadcast  192.168.0.255
dnsmasq-dhcp: 3587244887 sent size:  4 option:  3:router  192.168.0.1
dnsmasq-dhcp: 3587244887 sent size: 13 option: 15:domain-name  linux.xvx.cz
dnsmasq-tftp: sent /home/ftp/pub/distributions/tftpboot/pxelinux.0 to 192.168.0.90
dnsmasq-tftp: error 0 TFTP Aborted received from 192.168.0.90
dnsmasq-tftp: failed sending /home/ftp/pub/distributions/tftpboot/pxelinux.0 to 192.168.0.90
dnsmasq-tftp: sent /home/ftp/pub/distributions/tftpboot/pxelinux.0 to 192.168.0.90
dnsmasq-tftp: file /home/ftp/pub/distributions/tftpboot/pxelinux.cfg/28ce5d8a-0000-0080-385d-ff0000004746 not found
dnsmasq-tftp: file /home/ftp/pub/distributions/tftpboot/pxelinux.cfg/01-00-13-d4-d1-03-57 not found
dnsmasq-tftp: file /home/ftp/pub/distributions/tftpboot/pxelinux.cfg/C0A8005A not found
dnsmasq-tftp: file /home/ftp/pub/distributions/tftpboot/pxelinux.cfg/C0A8005 not found
dnsmasq-tftp: file /home/ftp/pub/distributions/tftpboot/pxelinux.cfg/C0A800 not found
dnsmasq-tftp: file /home/ftp/pub/distributions/tftpboot/pxelinux.cfg/C0A80 not found
dnsmasq-tftp: file /home/ftp/pub/distributions/tftpboot/pxelinux.cfg/C0A8 not found
dnsmasq-tftp: file /home/ftp/pub/distributions/tftpboot/pxelinux.cfg/C0A not found
dnsmasq-tftp: file /home/ftp/pub/distributions/tftpboot/pxelinux.cfg/C0 not found
dnsmasq-tftp: file /home/ftp/pub/distributions/tftpboot/pxelinux.cfg/C not found
dnsmasq-tftp: sent /home/ftp/pub/distributions/tftpboot/pxelinux.cfg/default to 192.168.0.90
dnsmasq-tftp: sent /home/ftp/pub/distributions/tftpboot/f1boot.msg to 192.168.0.90
dnsmasq-tftp: sent /home/ftp/pub/distributions/tftpboot/rescuecd to 192.168.0.90
dnsmasq-tftp: sent /home/ftp/pub/distributions/tftpboot/initram.igz to 192.168.0.90
dnsmasq-dhcp: 804374645 Available DHCP range: 192.168.0.50 -- 192.168.0.150
dnsmasq-dhcp: 804374645 Vendor class: udhcp 1.15.3
dnsmasq-dhcp: 804374645 DHCPDISCOVER(eth1) 00:13:d4:d1:03:57
dnsmasq-dhcp: 804374645 DHCPOFFER(eth1) 192.168.0.90 00:13:d4:d1:03:57
dnsmasq-dhcp: 804374645 requested options: 1:netmask, 3:router, 6:dns-server, 12:hostname,
dnsmasq-dhcp: 804374645 requested options: 15:domain-name, 28:broadcast, 42:ntp-server
dnsmasq-dhcp: 804374645 tags: eth1
dnsmasq-dhcp: 804374645 bootfile name: pxelinux.0
dnsmasq-dhcp: 804374645 next server: 192.168.0.1
dnsmasq-dhcp: 804374645 sent size:  1 option: 53:message-type  02
dnsmasq-dhcp: 804374645 sent size:  4 option: 54:server-identifier  192.168.0.1
dnsmasq-dhcp: 804374645 sent size:  4 option: 51:lease-time  00:00:a8:c0
dnsmasq-dhcp: 804374645 sent size:  4 option: 58:T1  00:00:54:60
dnsmasq-dhcp: 804374645 sent size:  4 option: 59:T2  00:00:93:a8
dnsmasq-dhcp: 804374645 sent size:  4 option:  1:netmask  255.255.255.0
dnsmasq-dhcp: 804374645 sent size:  4 option: 28:broadcast  192.168.0.255
dnsmasq-dhcp: 804374645 sent size:  4 option:  3:router  192.168.0.1
dnsmasq-dhcp: 804374645 sent size:  4 option:  6:dns-server  192.168.0.1
dnsmasq-dhcp: 804374645 sent size: 13 option: 15:domain-name  linux.xvx.cz
dnsmasq-dhcp: 804374645 Available DHCP range: 192.168.0.50 -- 192.168.0.150
dnsmasq-dhcp: 804374645 Vendor class: udhcp 1.15.3
dnsmasq-dhcp: 804374645 DHCPREQUEST(eth1) 192.168.0.90 00:13:d4:d1:03:57
dnsmasq-dhcp: 804374645 DHCPACK(eth1) 192.168.0.90 00:13:d4:d1:03:57
dnsmasq-dhcp: 804374645 requested options: 1:netmask, 3:router, 6:dns-server, 12:hostname,
dnsmasq-dhcp: 804374645 requested options: 15:domain-name, 28:broadcast, 42:ntp-server
dnsmasq-dhcp: 804374645 tags: eth1
dnsmasq-dhcp: 804374645 bootfile name: pxelinux.0
dnsmasq-dhcp: 804374645 next server: 192.168.0.1
dnsmasq-dhcp: 804374645 sent size:  1 option: 53:message-type  05
dnsmasq-dhcp: 804374645 sent size:  4 option: 54:server-identifier  192.168.0.1
dnsmasq-dhcp: 804374645 sent size:  4 option: 51:lease-time  00:00:a8:c0
dnsmasq-dhcp: 804374645 sent size:  4 option: 58:T1  00:00:54:60
dnsmasq-dhcp: 804374645 sent size:  4 option: 59:T2  00:00:93:a8
dnsmasq-dhcp: 804374645 sent size:  4 option:  1:netmask  255.255.255.0
dnsmasq-dhcp: 804374645 sent size:  4 option: 28:broadcast  192.168.0.255
dnsmasq-dhcp: 804374645 sent size:  4 option:  3:router  192.168.0.1
dnsmasq-dhcp: 804374645 sent size:  4 option:  6:dns-server  192.168.0.1
dnsmasq-dhcp: 804374645 sent size: 13 option: 15:domain-name  linux.xvx.cz
dnsmasq-tftp: sent /home/ftp/pub/distributions/tftpboot/sysrcd.md5 to 192.168.0.90
dnsmasq-tftp: sent /home/ftp/pub/distributions/tftpboot/sysrcd.dat to 192.168.0.90

To enable NAT + routing for the hosts run these commands:

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
sed --in-place=.old 's/^#(net.ipv4.ip_forward=1)/1/' /etc/sysctl.conf
sysctl -p

The SystemRescueCd guys did a great job. If you have similar PXE SystemRescueCd installation like I described above it’s handy to put these lines into GRUB2 configuration to be able to boot it when something going wrong with the Linux box:

cat << EOF >>/etc/grub.d/40_custom

menuentry "SystemRescueCd 1.5.1" {
    loopback loop /home/ftp/pub/distributions/systemrescuecd-x86-1.5.1.iso
    linux (loop)/isolinux/rescue64 docache setkmap=us rootpass=xxxx isoloop=/home/ftp/pub/distributions/systemrescuecd-x86-1.5.1.iso rdinit=/linuxrc2
    initrd (loop)/isolinux/initram.igz
}
EOF

update-grub

Good luck ;-)

2018-04-15

tagged:
network,
windows

So I needed to install Windows 10 on some laptop — without optical drive — here. I downloaded the iso from Microsoft, used dd to copy it to an SD card and tried to boot from it — without success. After various attempts to fix booting from SD (or USB) on that laptop with that (non-damaged) iso I decided to go a bit further:

Overview

The approach I ended up with needs some systems / servers to play nicely together. First of all, I connected the laptop directly per an ethernet cable to a NixOS machine.

What happens at boot?

  • The laptop boots, PXE (“network boot”) selected as primary boot option.
  • The BIOS tries to get an IP address and a “boot-filename” via DHCP.
  • The BIOS tries to connect to a TFTP server and download a file with the boot-filename. It then boots that file.
  • That file should be a special bootloader, pxelinux in my case, which uses TFTP to load further program modules, especially the memdisk module.
  • The bootloader boots the memdisk module. This loads a special minimalistic windows operating system called “Windows PE” or short “WinPE” into main memory (over TFTP) and boots it.
  • WinPE runs wpeinit to detect hardware, followed by ipconfig to get network settings via DHCP.
  • WinPE can now access a SMB network drive which contains the files from the Windows install iso and run setup.exe to start the installation.

What’s needed?

  • A DHCP server supporting PXE. (ISC-)dhcpd works but dnsmasq is a much better choice in my case because it also has a builtin TFTP server. It also supports being a proxy DHCP server if there’s already a DHCP server on the network which doesn’t support PXE.
  • A TFTP server. dnsmasq does this for me, but there’s also tftp-hpa.
  • pxelinux and memdisk. Both are often part of syslinux packages.
  • A compatible WinPE iso. This can be created from the Windows install iso using wimlib.
  • A SMB/CIFS server. I use Samba on the NixOS machine, but a Windows server would do, too.

The firewall

Fighting against the my own firewall on the NixOS machine is unnecessary, I just allow any traffic from the laptop:

iptables -I INPUT 1 -i eno1 -j ACCEPT

The DHCP server

With nothing configured (except the BIOS of the laptop for network boot) and the two systems connected by the ethernet cable it is possible to check that the BIOS is actually looking for a DHCP server by running tcpdump -ttttnnvvS -i eno1 (where eno1 is the — unconfigured — ethernet network interface on the NixOS machine):

2018-04-15 15:25:14.037484 IP (tos 0x0, ttl 20, id 0, offset 0, flags [none], proto UDP (17), length 576)
    0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 20:6a:8a:0f:74:75, length 548, xid 0x8b0f7475, secs 4, Flags [Broadcast] (0x8000)
          Client-Ethernet-Address 20:6a:8a:0f:74:75
          Vendor-rfc1048 Extensions
            Magic Cookie 0x63825363
            DHCP-Message Option 53, length 1: Discover
            Parameter-Request Option 55, length 36: 
              Subnet-Mask, Time-Zone, Default-Gateway, Time-Server
              IEN-Name-Server, Domain-Name-Server, RL, Hostname
              BS, Domain-Name, SS, RP
              EP, RSZ, TTL, BR
              YD, YS, NTP, Vendor-Option
              Requested-IP, Lease-Time, Server-ID, RN
              RB, Vendor-Class, TFTP, BF
              Option 128, Option 129, Option 130, Option 131
              Option 132, Option 133, Option 134, Option 135
            MSZ Option 57, length 2: 1260
            GUID Option 97, length 17: 0.214.110.241.0.166.215.17.223.159.26.249.56.166.111.192.84
            ARCH Option 93, length 2: 0
            NDI Option 94, length 3: 1.2.1
            Vendor-Class Option 60, length 32: "PXEClient:Arch:00000:UNDI:002001"

This is a BOOTP/DHCP request (with a DHCPDISCOVER inside) from 20:6a:8a:0f:74:75 with no IP address assigned (thus 0.0.0.0) to the broadcast address 255.255.255.255. It’s sending from port 67 (client side DHCP) to port 68 (server side DHCP) and asking for various network parameters, including BF (the so called boot filename) and TFTP.

Starting dnsmasq -C dnsmasq.conf with

port=0 # disable DNS server
interface=eno1
bind-interfaces
dhcp-option=3,192.168.42.1 # default gateway
dhcp-option=6,8.8.8.8,8.8.4.4 # dns servers
dhcp-range=192.168.42.10,192.168.42.20,12h

results in the NixOS machine answering:

2018-04-15 15:42:01.801824 IP (tos 0xc0, ttl 64, id 43076, offset 0, flags [none], proto UDP (17), length 328)
    192.168.42.1.67 > 255.255.255.255.68: [bad udp cksum 0xebee -> 0x8eff!] BOOTP/DHCP, Reply, length 300, xid 0x9c0f7475, secs 38, Flags [Broadcast] (0x8000)
          Your-IP 192.168.42.17
          Server-IP 192.168.42.1
          Client-Ethernet-Address 20:6a:8a:0f:74:75
          Vendor-rfc1048 Extensions
            Magic Cookie 0x63825363
            DHCP-Message Option 53, length 1: Offer
            Server-ID Option 54, length 4: 192.168.42.1
            Lease-Time Option 51, length 4: 43200
            RN Option 58, length 4: 21600
            RB Option 59, length 4: 37800
            Subnet-Mask Option 1, length 4: 255.255.255.0
            BR Option 28, length 4: 192.168.42.255
            Domain-Name-Server Option 6, length 8: 8.8.8.8,8.8.4.4
            Default-Gateway Option 3, length 4: 192.168.42.1

This offers an IP address (192.168.42.17 here) to the laptop (mac 20:6a:8a:0f:74:75), sends DNS information, the default gateway and some other stuff. But the BIOS ignores it and keeps sending DHCPDISCOVER requests. That’s because the reply — the DHCPOFFER — doesn’t include a boot-filename. After some seconds the BIOS on the laptop thus announces:

PXE-E53 no boot filename received

To fix this, I need to tell dnsmasq to send a boot filename by adding this to the config:

dhcp-boot=boot/pxelinux.0

Then, the exchange between the machines reads as follows:

2018-04-15 15:51:14.641613 IP (tos 0x0, ttl 20, id 5, offset 0, flags [none], proto UDP (17), length 576)
    0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 20:6a:8a:0f:74:75, length 548, xid 0x900f7475, secs 14, Flags [Broadcast] (0x8000)
          Client-Ethernet-Address 20:6a:8a:0f:74:75
// ...
            DHCP-Message Option 53, length 1: Discover
// ...

2018-04-15 15:51:15.558948 IP (tos 0xc0, ttl 64, id 12988, offset 0, flags [none], proto UDP (17), length 342)
    192.168.42.1.67 > 255.255.255.255.68: [bad udp cksum 0xebfc -> 0xc4bd!] BOOTP/DHCP, Reply, length 314, xid 0x8f0f7475, secs 12, Flags [Broadcast] (0x8000)
          Your-IP 192.168.42.17
          Server-IP 192.168.42.1
          Client-Ethernet-Address 20:6a:8a:0f:74:75
// ...
            DHCP-Message Option 53, length 1: Offer
// ...
            BF Option 67, length 16: "boot/pxelinux.0^@"
// ...

2018-04-15 15:51:16.728848 IP (tos 0x0, ttl 20, id 6, offset 0, flags [none], proto UDP (17), length 576)
    0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 20:6a:8a:0f:74:75, length 548, xid 0x900f7475, secs 14, Flags [Broadcast] (0x8000)
          Client-Ethernet-Address 20:6a:8a:0f:74:75
// ...
            DHCP-Message Option 53, length 1: Request
// ...

2018-04-15 15:51:16.821564 IP (tos 0xc0, ttl 64, id 13949, offset 0, flags [none], proto UDP (17), length 342)
    192.168.42.1.67 > 255.255.255.255.68: [bad udp cksum 0xebfc -> 0xc0bb!] BOOTP/DHCP, Reply, length 314, xid 0x900f7475, secs 14, Flags [Broadcast] (0x8000)
          Your-IP 192.168.42.17
          Server-IP 192.168.42.1
          Client-Ethernet-Address 20:6a:8a:0f:74:75
// ...
            DHCP-Message Option 53, length 1: ACK
// ...
            BF Option 67, length 16: "boot/pxelinux.0^@"

The replies from the NixOS DHCP server notably now contain the BF option. Moreover the complete Discover, Offer, Request, ACK cycle is now complete — thus the laptop now has IP address 192.168.42.17.

The TFTP server, pxelinux and memdisk

Next, the BIOS asks (via ARP) who’s 192.168.42.1 (the DHCP server, probably because it doesn’t know better) and sends a TFTP RRQ resource request for the boot filename. The NixOS machine blocks the request because there’s (currently) no TFTP server running on it:

2018-04-15 15:51:16.823557 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.42.1 tell 192.168.42.17, length 46
2018-04-15 15:51:16.823576 ARP, Ethernet (len 6), IPv4 (len 4), Reply 192.168.42.1 is-at 34:e6:d7:1a:33:48, length 28
2018-04-15 15:51:16.823672 IP (tos 0x0, ttl 20, id 7, offset 0, flags [none], proto UDP (17), length 60)
    192.168.42.17.2070 > 192.168.42.1.69: [udp sum ok]  32 RRQ "boot/pxelinux.0" octet tsize 0
2018-04-15 15:51:16.823755 IP (tos 0xc0, ttl 64, id 28676, offset 0, flags [none], proto ICMP (1), length 88)
    192.168.42.1 > 192.168.42.17: ICMP 192.168.42.1 udp port 69 unreachable, length 68

After numerous tries the BIOS then fails with the error message:

PXE-E32: TFTP open timeout

So I add this to dnsmasq.conf:

enable-tftp
tftp-root=/tmp/win-pxe/tftp

Also I create a file /tmp/win-pxe/tftp/boot/pxelinux.cfg/default:

UI         menu.c32
MENU TITLE Network Boot
TIMEOUT    50

LABEL      winpe
MENU LABEL Boot Windows PE from network
KERNEL     /memdisk
INITRD     winpe.iso
APPEND     iso raw

LABEL      localboot
MENU LABEL Boot from local disk
LOCALBOOT  0

Turning the laptop on again now boots pxelinux with the menu, given that the required files are in /tmp/win-pxe-tftp/:

dnsmasq: started, version 2.78 DNS disabled
dnsmasq: compile time options: IPv6 GNU-getopt DBus no-i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify
dnsmasq-dhcp: DHCP, IP range 192.168.42.10 -- 192.168.42.20, lease time 12h
dnsmasq-dhcp: DHCP, sockets bound exclusively to interface eno1
dnsmasq-tftp: TFTP root is /tmp/win-pxe/tftp 
dnsmasq-dhcp: DHCPDISCOVER(eno1) 20:6a:8a:0f:74:75 
dnsmasq-dhcp: DHCPOFFER(eno1) 192.168.42.17 20:6a:8a:0f:74:75 
dnsmasq-dhcp: DHCPREQUEST(eno1) 192.168.42.17 20:6a:8a:0f:74:75 
dnsmasq-dhcp: DHCPACK(eno1) 192.168.42.17 20:6a:8a:0f:74:75 
dnsmasq-tftp: error 0 TFTP Aborted received from 192.168.42.17
dnsmasq-tftp: failed sending /tmp/win-pxe/tftp/boot/pxelinux.0 to 192.168.42.17
dnsmasq-tftp: sent /tmp/win-pxe/tftp/boot/pxelinux.0 to 192.168.42.17
dnsmasq-tftp: sent /tmp/win-pxe/tftp/boot/ldlinux.c32 to 192.168.42.17
dnsmasq-tftp: file /tmp/win-pxe/tftp/boot/pxelinux.cfg/d66ef100-a6d7-11df-9f1a-f938a66fc054 not found
dnsmasq-tftp: file /tmp/win-pxe/tftp/boot/pxelinux.cfg/01-20-6a-8a-0f-74-75 not found
dnsmasq-tftp: file /tmp/win-pxe/tftp/boot/pxelinux.cfg/C0A82A11 not found
dnsmasq-tftp: file /tmp/win-pxe/tftp/boot/pxelinux.cfg/C0A82A1 not found
dnsmasq-tftp: file /tmp/win-pxe/tftp/boot/pxelinux.cfg/C0A82A not found
dnsmasq-tftp: file /tmp/win-pxe/tftp/boot/pxelinux.cfg/C0A82 not found
dnsmasq-tftp: file /tmp/win-pxe/tftp/boot/pxelinux.cfg/C0A8 not found
dnsmasq-tftp: file /tmp/win-pxe/tftp/boot/pxelinux.cfg/C0A not found
dnsmasq-tftp: file /tmp/win-pxe/tftp/boot/pxelinux.cfg/C0 not found
dnsmasq-tftp: file /tmp/win-pxe/tftp/boot/pxelinux.cfg/C not found
dnsmasq-tftp: sent /tmp/win-pxe/tftp/boot/pxelinux.cfg/default to 192.168.42.17
dnsmasq-tftp: sent /tmp/win-pxe/tftp/boot/menu.c32 to 192.168.42.17
dnsmasq-tftp: sent /tmp/win-pxe/tftp/boot/libutil.c32 to 192.168.42.17
dnsmasq-tftp: sent /tmp/win-pxe/tftp/boot/pxelinux.cfg/default to 192.168.42.17

Wait … winpe.iso?

This is where wimlib comes into play. That’s a library (and set of programs) that work with Windows Imaging files. It contains mkwinpeimg which allows to create a (even customized) WinPE iso from either a Windows install iso or a “Windows Automated Installation Kit (WAIK)”. I use a Windows install iso. I mount the iso to be able to access its contents:

mount -o loop,ro /tmp/isos/Win10_1709_German_x64.iso /tmp/win10iso/

I also create a start.cmd script to define what’s happening once Windows PE boots:

Then I can create the WinPE iso:

mkwinpeimg --iso --windows-dir=/tmp/win10iso 
  --start-script=/tmp/win-pxe/start.cmd /tmp/winpe.iso

This first failed with an unexpected error (I have lots of free disk space):

// ...
[ERROR] Error writing raw data to WIM file: No space left on device                                                                                              [BUSY] 
ERROR: Exiting with error code 72:
       Failed to write data to a file.

An educated guess later I decided to explicitly specify a temporary directory on my disk (with much of free space) by adding --tmp-dir=/home/mustersel/temporary to the mkwinpeimg command line. This gives me a winpe.iso file with a size of about 316M, which I place in /tmp/win-pxe/boot/.

Booting WinPE

On the laptop, I select “Boot Windows PE from network”. This causes the memdisk module to be sent via TFTP:

dnsmasq-tftp: sent /tmp/win-pxe/tftp/boot//memdisk to 192.168.42.17

Then on the laptop memdisk shows:

Loading winpe.iso

Looking at the NixOS machine reveals that memdisk loads winpe.iso also via TFTP (which is a rather slow protocol, so this takes some time):

dnsmasq-tftp: sent /tmp/win-pxe/tftp/boot/winpe.iso to 192.168.42.17

The laptop then greets me with some Windows loading screen, followed by a command line.

On WinPE in cmd.exe

According to the ArchWiki page on Windows PE I need to run the following once I’m on the Windows command line:

wpeinit
ipconfig

According to some Microsoft page wpeinit “[..] installs Plug and Play devices, [..], and loads network resources”. ipconfig seems to be the equivalent to ifconfig, run without arguments it probably set up networking. After running these commands I could see on the NixOS machine how the laptop running WinPE requested an IP via DHCP. Note the hostname minint-t10cd8a that is logged — it’s no longer the BIOS doing the DHCP but the WinPE environment:

dnsmasq-dhcp: DHCPDISCOVER(eno1) 20:6a:8a:0f:74:75 
dnsmasq-dhcp: DHCPOFFER(eno1) 192.168.42.17 20:6a:8a:0f:74:75 
dnsmasq-dhcp: DHCPREQUEST(eno1) 192.168.42.17 20:6a:8a:0f:74:75 
dnsmasq-dhcp: DHCPACK(eno1) 192.168.42.17 20:6a:8a:0f:74:75 minint-t10cd8a

For the next steps WinPE needs access to all of the Windows install iso.

The Samba server

Setting up a SMB/CIFS network drive with Samba is pretty easy. I use the following config, but most of it is actually unnecessary:

[global]
map to guest = Bad User # Required
workgroup = home
log level = 5
unix extensions = No
client min protocol = SMB2
client max protocol = SMB3

min protocol = SMB2
max protocol = SMB3

state directory = /tmp/win-pxe/samba
pid directory = /tmp/win-pxe/samba
cache directory = /tmp/win-pxe/samba
lock directory = /tmp/win-pxe/samba

# "guest" in between [] is the name of the share
[guest]
path = /tmp/win10iso # Required
readonly = yes
guest ok = yes # Required

I can then “mount” this network drive from within WinPE with:

net use I:\192.168.42.1GUEST

This should make the contents of the Windows install iso (which is mounted to /tmp/win10iso on the NixOS machine) available under I: from WinPE. But I ran into the following issue: On the NixOS machine I got:

// ...
Server exit (NT_STATUS_CONNECTION_RESET)
Terminated

Basically Samba just died. On the WinPE side the error message read:

System error 58 has occurred. The specified server cannot perform the requested operation

The solution is unintuitive but simple. I just need to access the network share with some username and password (doesn’t matter which, can be just random strings):

net use I: \192.168.42.1GUEST /user:user pass

I actually spent quite a lot of time searching for this solution, even though it’s right in the ArchWiki page down at the bottom…

Finally, the setup

I:setup.exe

This starts the Windows install setup, which is guided and thus easy to follow … until it complained with a mysterical message that I couldn’t use the partitions I just created and formatted:

We couldn’t create a new partition or locate an existing one. For more information, see the Setup log files.

After I found (there were lots of files in these directories — I just scrolled over them one after the other) these “Setup log files” I noticed messages like these:

install drive does not meet requirements for installation
Couldn't find boot disk on this BIOS-based computer

The “solution” was to remove the SD card that still was in the card reader from my attempts at booting Windows from that SD card. Apparently the Windows installer otherwise tries to install Windows on that SD card instead of on the (just partioned) drive. Sigh.


INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Thanks. We have received your request and will respond promptly.

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!

  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It’s Free!

*Tek-Tips’s functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

TFTP: error code 0 received — TFTP Error: Path not found

TFTP: error code 0 received — TFTP Error: Path not found

(OP)

15 Jun 03 18:51

I am able to copy flash from a 2505 to my tftp server, and I can copy the running-config fine from the 2501 to the same tftp server, but when I try to copy the flash, this is what I get:
2501#copy flash tftp

System flash directory:
File  Length   Name/status
  1   9404512  rtr/c2500-js-l.113-5.T.bin
[9404576 bytes used, 7372640 available, 16777216 total]
Address or name of remote host [192.168.1.100]? 192.168.1.100
Source file name? rtr/c2500-js-l.113-5.T.bin
Destination file name [rtr/c2500-js-l.113-5.T.bin]?
Verifying checksum for ‘rtr/c2500-js-l.113-5.T.bin’ (file # 1)…  OK
Copy ‘rtr/c2500-js-l.113-5.T.bin’ from Flash to server
  as ‘rtr/c2500-js-l.113-5.T.bin’? [yes/no]y
TFTP: error code 0 received — TFTP Error: Path not found

Copy aborted — TFTP timeout
2501#
What could cause this? Here is some more information.
2501#sh flash all

System flash directory:
File  Length   Name/status
        addr      fcksum  ccksum
  1   9404512  rtr/c2500-js-l.113-5.T.bin
        0x40      0x5257  0x5257
[9404576 bytes used, 7372640 available, 16777216 total]
16384K bytes of processor board System flash (Read ONLY)

   Chip    Bank    Code      Size      Name
    1      1       01AD      2048KB    AMD   29F016
    2      1       01AD      2048KB    AMD   29F016
    3      1       01AD      2048KB    AMD   29F016
    4      1       01AD      2048KB    AMD   29F016
    1      2       01AD      2048KB    AMD   29F016
    2      2       01AD      2048KB    AMD   29F016
    3      2       01AD      2048KB    AMD   29F016
    4      2       01AD      2048KB    AMD   29F016
Executing current image from System flash
2501#
Thanks to anyone who can help.
Jeff

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Join Tek-Tips® Today!

Join your peers on the Internet’s largest technical computer professional community.
It’s easy to join and it’s free.

Here’s Why Members Love Tek-Tips Forums:

  • Tek-Tips ForumsTalk To Other Members
  • Notification Of Responses To Questions
  • Favorite Forums One Click Access
  • Keyword Search Of All Posts, And More…

Register now while it’s still free!

Already a member? Close this window and log in.

Join Us             Close

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Error 0 reading the device ultraiso
  • Error 0 occurred while receiving the document proxmox как исправить
  • Error 0 error decoding json data syntax error
  • Error 0 creating local image of screen size 0x0 ammy
  • Error 0 checking dll signature valiant hearts

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии