fun! "boot up and remove sd" functionality


Tasha Upchurch
 Share

1 1

Recommended Posts

Hello there! Its nice to meet everyone and thank you so much for having me!

I have this great project i'm working on involving 30 orange pi zeros. You see SD cards are expensive when you need to buy 30 of them so I have been trying for about a month now to make armbian work without the SD card.

 

The idea is to boot into the os get a few things running and then remove the card and boot another pi.

 

I have tried creating a ramfs mount and copying/mounting (what I believe are) all the requirements and then using chroot. But that doesnt work at all. I'm imagining that outside of chroot services are still running and once they cant write to some file they decide to kill this system.

 

Does anyone have any ideas on how to achieve this "boot up and remove sd" card functionality?

Link to post
Share on other sites

Donate and support the project!

Overlay file system is NOT what you want, it requires the original media to be readable.   I'd recommend a u-boot that handles net booting (if it exists) loaded to the on-board flash, then a network root and swap if needed.  One system would require real media and the others a network connection to it.

Link to post
Share on other sites

8 hours ago, Tasha Upchurch said:

I do believe the H2 + chip does allow for Fel mode. But I'm not sure how this helps in my situation?

I saw this: https://linux-sunxi.org/FEL/USBBoot#General_description_of_the_.22sunxi-fel_uboot.22_command_implementation

 

And google this: OrangePi Zero FEL  - Result: There are no buttons or connectors to select FEL mode so the BootROM will only enter FEL mode if a special SD card is present or if there are no valid boot options.

 

And a forum search: https://forum.armbian.com/topic/2808-orange-pi-zero-went-to-the-market/?do=findComment&comment=20334

 

But by all means, I have never tried it, but I would like to do it. TK quite easily tested new Kernels that way, IIRC.

Link to post
Share on other sites

How about just using the sd card to network boot? Can i remove the sd card after? Is all this fel stuff necessary?

 

I keep searching for "armbian network boot" and all i get are posts about people wanting to write to onboard flash so it boots without the sd card at all. That is not what i need.

 

Isn't network booting kinda a common thing?

Link to post
Share on other sites

9 hours ago, Tasha Upchurch said:

Maybe it will work!? I wonder and i doubt if uboot supports wifi..


Haven't seen Wifi support but its probably doable (probably undeveloped, which means some hard work has to be done) ... In general, wired network support is at best and also I am not sure if this is enabled on all devices. This feature is not that much important to our case.
 

On 15. 12. 2017 at 1:17 AM, Tasha Upchurch said:

Can i remove the sd card after?


This should also work if you boot from the network. 

Link to post
Share on other sites

If data need to be recorded network boot with nfs will be needed but if it's just to run an small emmbedded project, it's possible to load rootfs in ramdisk and remove the sdcard in case you don't use a spi flash to boot.
It's work fine for sure with openwrt but armbian is too big to fit in ram

Link to post
Share on other sites

Okay Thank you guys for helping me get along. So I have the image able to boot to an NFS from initramfs, and i can remove the SD card! works great! except I have 30 or so of these I need to hook up and that would require crud ton of money on switches and cables. That just is not an option.

 

I have a beginner/intermediate understand of initramfs and initramfs-untils now so i understand that i need to bring up the wifi device..

I know there is a "/etc/initramfs-tools/modules" file that lists the modules that "update-initramfs"  will try to add to the initramfs... but.

 

What "modules" do i need to:

1) load the wlan0 device

2) connect to a WPA access point?

* i dont actually need dns lookup though it would be handy

 

also once i have those modules loaded into the initramfs what re the commands to actually load the device and connect to the access point?

I know that my current armbian uses network-manager and much can be done from nmcli... 

Any help would be much appreciated!!

Link to post
Share on other sites

Guest
This topic is now closed to further replies.
 Share

1 1