Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
creating a tftpboot server [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5135

PostPosted: Sat Oct 28, 2017 6:28 am    Post subject: creating a tftpboot server [solved] Reply with quote

Greetings,

I have a x86_64 server and a arm64 board, I want to setup a ftfp server on the x86_64 server so I can use it to boot the arm64 board.
I've taken a look at this: https://wiki.gentoo.org/wiki/Diskless_nodes but I'm not sure what parts of it I need.
I have the arm64 board's kernel image compiled, what I need to setup so I can boot that kernel image?

Thanks.
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball


Last edited by DaggyStyle on Fri Nov 03, 2017 9:31 am; edited 1 time in total
Back to top
View user's profile Send private message
bbgermany
Veteran
Veteran


Joined: 21 Feb 2005
Posts: 1698
Location: Oranienburg/Germany

PostPosted: Sat Oct 28, 2017 2:49 pm    Post subject: Reply with quote

Hi,

you need at least the dhcp server, the tftp server and the nfs server for the root filesystem.

Then you can choose between pxeboot or etherboot. this is your choice.

greets, bb
_________________
1st: i5-4440, 16GB, 1.75TB
2nd: i5-3470T, 8GB, 620GB
3rd: i5-3450, 12GB, 64GB USB+ 6.25TB
4th: Asus N61VN, 8GB, 120GB
5th: RPi, 512MB, 8GB USB + NFS
6th: C2D T7200, 2GB, 16GB USB + NFS
7th: RPi3 1GB, 64GB USB
Back to top
View user's profile Send private message
P.Kosunen
Apprentice
Apprentice


Joined: 21 Nov 2005
Posts: 176
Location: Finland

PostPosted: Sat Oct 28, 2017 3:52 pm    Post subject: Reply with quote

Dnsmasq is quite easy choice for server side, DHCP/DNS/TFTP/PXE boot in same tool and easy to configure.

I think PXELINUX does not support ARM, so you need to load kernel image directly from TFTP root.

dnsmasq.conf:
Code:

dhcp-boot=vmlinuz-4.11.0-gentoo
enable-tftp
tftp-root=/var/ftpd
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 39275
Location: 56N 3W

PostPosted: Sat Oct 28, 2017 6:50 pm    Post subject: Reply with quote

DaggyStyle,

What will run on the arm board to fetch the kernel over tftp?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
bbgermany
Veteran
Veteran


Joined: 21 Feb 2005
Posts: 1698
Location: Oranienburg/Germany

PostPosted: Sat Oct 28, 2017 7:01 pm    Post subject: Reply with quote

As far as i can see, it should be u-boot which needs to fetch the kernel via tftp.

greets, bb
_________________
1st: i5-4440, 16GB, 1.75TB
2nd: i5-3470T, 8GB, 620GB
3rd: i5-3450, 12GB, 64GB USB+ 6.25TB
4th: Asus N61VN, 8GB, 120GB
5th: RPi, 512MB, 8GB USB + NFS
6th: C2D T7200, 2GB, 16GB USB + NFS
7th: RPi3 1GB, 64GB USB
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5135

PostPosted: Wed Nov 01, 2017 5:38 pm    Post subject: Reply with quote

as said below, the board uses u-boot so I want to fetch the kernel via tftp and boot from the root which on the board's card.

do I need dhcp server? I've already have one on my server.
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball
Back to top
View user's profile Send private message
P.Kosunen
Apprentice
Apprentice


Joined: 21 Nov 2005
Posts: 176
Location: Finland

PostPosted: Wed Nov 01, 2017 6:07 pm    Post subject: Reply with quote

DaggyStyle wrote:
do I need dhcp server? I've already have one on my server.

https://wiki.gentoo.org/wiki/Diskless_nodes#Configuring_the_DHCP_server_2

You can use your existing DHCP server.
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5135

PostPosted: Wed Nov 01, 2017 9:04 pm    Post subject: Reply with quote

so I can use the Diskless_nodes tutorial minus the dhcp configure?
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball
Back to top
View user's profile Send private message
P.Kosunen
Apprentice
Apprentice


Joined: 21 Nov 2005
Posts: 176
Location: Finland

PostPosted: Thu Nov 02, 2017 5:27 pm    Post subject: Reply with quote

Yes i believe and also no PXELINUX part.

Code:
allow booting;
next-server "TFTP server ip";
filename "kernel filename";


Add these options to dhcpd.conf. Kernel goes to TFTP root directory, AFAIK kernel boot parameters need to be compiled in kernel.
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5135

PostPosted: Thu Nov 02, 2017 6:36 pm    Post subject: Reply with quote

but if I can use existing dhcp, why do I need to define dhcp.conf?
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball
Back to top
View user's profile Send private message
bbgermany
Veteran
Veteran


Joined: 21 Feb 2005
Posts: 1698
Location: Oranienburg/Germany

PostPosted: Fri Nov 03, 2017 5:37 am    Post subject: Reply with quote

The dhcp server need to provide the information for the tftp boot file/server iirc. Otherwise your system will not start as well.

greets, bb

EDITH: maybe this can help you a bit more then the diskless howto: https://rechtzeit.wordpress.com/2013/01/16/tftp-boot-using-u-boot/

It looks like, you just need a working dhcp server for providing an ip and the tftp server. then fire up your system with u-boot and stop the autoboot process and continue with the howto ;)
_________________
1st: i5-4440, 16GB, 1.75TB
2nd: i5-3470T, 8GB, 620GB
3rd: i5-3450, 12GB, 64GB USB+ 6.25TB
4th: Asus N61VN, 8GB, 120GB
5th: RPi, 512MB, 8GB USB + NFS
6th: C2D T7200, 2GB, 16GB USB + NFS
7th: RPi3 1GB, 64GB USB
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5135

PostPosted: Fri Nov 03, 2017 9:30 am    Post subject: Reply with quote

got it to work but unfortunately, I'm getting an error. it seems that the tftpboot is working so this issue is solved.
to put it simple, I've installed tftp-hpa, modified the conf file, started it, posted the files in the folder and the rest was done via uboot.
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum