Jump to content

Recommended Posts

Posted

My objective is to boot Armbian on my NanoPi Neo2 from a network server.

 

I've got Armbian running on the NanoPi Neo2 and u-boot recognizes the ethernet interface. Also, I have a DHCP server and TFTP server running. If I press space during start-up, I get in the U-boot environment. When I give the dhcp command in the U-boot environment, the NanoPi Neo2 get's an IP address and loads /boot/boot.scr from the network. So, the pre-requisites seem to work fine.

But then....

 

I just can't figure out how to start Armbian (preferrably in read only mode) from the network.

 

Maybe someone can tell me what needs to be done. I've got the following questions:

I've already searched on-line for countless hours, but I just don't get it.

 

1) I think I need to load boot.scr, initrd.img and dtb and somehow start those from the u-boot environment.

2) I think I need to tell the kernel somehow that it needs to boot from the network instead of the SD.

3) I think there is some command /switch that can be set to make Armbian read-only and prevent changes to the system

4) Which files must remain on the SD as a minimum to make netbooting Armbian from U-boot possible?

 

Regards,

Rolf

Posted

Just a question: do you just want to boot the kernel from the network, and then use a local file system on SD or USB, or do you want to run Armbian from NFS?

I ask this question because I don't really advise you to run Armbian (either Ubuntu or Debian flavors) from NFS, even on a Gigabit network.

 

Now, yes, a properly built u-boot can initialize the Ethernet interface and load the Linux kernel from the network using the PXE protocol, there are a number of references on the Internet that explain how to do this, sfx2000 above has pointed to two websites and a quick search on Google should turn up a few more.

Posted
23 hours ago, AndrewDB said:

Just a question: do you just want to boot the kernel from the network, and then use a local file system on SD or USB, or do you want to run Armbian from NFS?

I ask this question because I don't really advise you to run Armbian (either Ubuntu or Debian flavors) from NFS, even on a Gigabit network.

 

Now, yes, a properly built u-boot can initialize the Ethernet interface and load the Linux kernel from the network using the PXE protocol, there are a number of references on the Internet that explain how to do this, sfx2000 above has pointed to two websites and a quick search on Google should turn up a few more.

 

 

Just curious why you advise against it.. I use to run a PXE Boot a Ubuntu Desktop on a C2D and run over NFS and it worked pretty great... I even used docker with it?

 

Is it the network stack on the SBC thats the concern?   

Posted
4 minutes ago, lanefu said:

 

 

Just curious why you advise against it.. I use to run a PXE Boot a Ubuntu Desktop on a C2D and run over NFS and it worked pretty great... I even used docker with it?

 

Is it the network stack on the SBC thats the concern?   

It's just because of performance expectations. SBC's still have comparatively little RAM to run full-fledged desktops, and NFS latencies would kill any large program load times. On the other hand, if you can run everything from RAM(disk), SBC's have more than enough performance, the reason we have CoreElec, OpenElec, etc...

 

Containers run at the same speed as bare metal so if you have acceptable latencies with NFS, Docker is never a problem.

Posted

I'm not worried about the performance, its just simple stuff I'm doing.

 

However, I haven't gotten much further. The information on the web is really thin, maybe its because I lack sufficient background that I don't understand it.

 

U-boot reads the files but somehow the boot sequence ends in an error. I wish there was some sort of tutorial that shows me how I can compile Armbian for read only NFS boot.

 

 

Posted
37 minutes ago, Rolf Bakker said:

I'm not worried about the performance, its just simple stuff I'm doing.

 

However, I haven't gotten much further. The information on the web is really thin, maybe its because I lack sufficient background that I don't understand it.

 

U-boot reads the files but somehow the boot sequence ends in an error. I wish there was some sort of tutorial that shows me how I can compile Armbian for read only NFS boot.

 

 

 

here's some NFS boot breadcrumbs that arent armbian specific

 

but you'll need to update your initrams image with a few settings which uboot will pool.

 

see /etc/initramfs-tools/initramfs.conf  MODULES=netboot

 

also you'll want to set your rootfs  to be something like this

 

# UNCONFIGURED FSTAB FOR BASE SYSTEM
/dev/nfs       /               nfs    defaults          1       1
/proc    /proc    proc    defaults   0 0
/sys     /sys     sysfs   defaults   0 0

/dev/fd0  /mnt/floppy auto user,noauto,sync,exec,umask=000 0 0
/dev/cdrom /mnt/cdrom auto user,noauto,exec,ro   0 0
none            /tmp            tmpfs   defaults        0       0
none            /var/run        tmpfs   defaults        0       0
none            /var/lock       tmpfs   defaults        0       0
none            /var/tmp        tmpfs   defaults        0       0

 

Posted
On 2/3/2019 at 7:54 AM, sfx2000 said:

Should be able to do it all in U-Boot...

 

This might be helpful - from TI's website...

 

http://processors.wiki.ti.com/index.php/Booting_Linux_kernel_using_U-Boot

 

Some other info from ARM directly... mostly focused on their Juno Eval/DVT board...

 

https://community.arm.com/dev-platforms/w/docs/236/tftp-remote-network-kernel-using-u-boot

 

 

Second link seems ok, I would like to use it to restore backups made by ReaR (https://github.com/rear/rear) made on an orangepipc+ (For some reason rear backup only support the PXE output on arm)

I have a TFTP server set up on a windows computer on the network (with Tftpd64) serving the ReaR backup folder (containing: orangepipcplus.initrd.gz, orangepipcplus.kernel, orangepipcplus.message, rear-orangepipcplus, backup.tar.gz)

What command to use in uboot to load the image on armbian? Would need similar process indicated from https://docs.armbian.com/User-Guide_Recovery/ not sure how to make it match the example above


 

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines