jceajcea
Posts: 10
Joined: Sat Sep 16, 2017 9:35 pm

Examples/advice of running linux "live" from initramfs

Thu Jul 30, 2020 5:02 pm

Hi there!

I wonder if there is any project out there that runs linux from an initramfs?. Of course, minimum Linux, since it is running from RAM, let's say < 500MB uncompressed.

I need to run my idea from initramfs and I wonder if I can learn/steal from somebody else already doing something similar.

Advice welcomed too.

Some details: The idea is to run the Raspberry from PXE (network booting) without using the usual NFS root filesystem. I want it to run from RAM using a ramdisk.

Since PXE boot is slow because TFTP is slow (and raspberry PXE booting is fragile and too much sensitive to packet loss), I would love to provide a small "initramfs" that just do DHCP and a HTTP/socket fetch to further populate the ramdisk. This would be next step. First step would be to run from (a big) initramfs.

Thanks.

User avatar
thagrol
Posts: 6451
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Examples/advice of running linux "live" from initramfs

Thu Jul 30, 2020 6:21 pm

Buildroot? (ask google et al for more info)
I'm a volunteer. Take me for granted or abuse my support and I will walk away

All advice given is based on my experience. it worked for me, it may not work for you.
Need help? https://github.com/thagrol/Guides

User avatar
DougieLawson
Posts: 41958
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Examples/advice of running linux "live" from initramfs

Thu Jul 30, 2020 6:52 pm

Languages using left-hand whitespace for syntax are ridiculous

DMs sent on Twitter/LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

jceajcea
Posts: 10
Joined: Sat Sep 16, 2017 9:35 pm

Re: Examples/advice of running linux "live" from initramfs

Thu Jul 30, 2020 11:41 pm

Cool. Thanks for the suggestions.

I am evaluating too "raspbian-ua-netinst". The point is that PXE booting is SLOW and fragile, so it would be faster to do a minimal booting via PXE and then download a real OS in a RAMDISK from a webserver, instead of trying to deliver a 300MB payload thru the venerable but "slow as snail" TFTP.

I am currently pursuing both approaches. Good progress so far.

Links and suggestions very welcomed.

Thanks.

PS: I will publish tutorials and software in the future, your time and effort will not be wasted in a blackhole (me).

jceajcea
Posts: 10
Joined: Sat Sep 16, 2017 9:35 pm

Re: Examples/advice of running linux "live" from initramfs

Fri Jul 31, 2020 4:41 am

Maybe this issue would be of interest to you: https://github.com/debian-pi/raspbian-u ... issues/524 . TL;DR: gauging interest in PXE support for "raspbian-ua-netinst".

JovianPyx
Posts: 132
Joined: Fri Nov 20, 2015 9:34 pm

Re: Examples/advice of running linux "live" from initramfs

Sat Aug 01, 2020 8:28 pm

+1 for tinycore - specifically piCore.

I've been using piCore for a pi zero-w with a camera that stays on 24x7. It supports lighttpd (light weight web server) so I can see the camera (pointed at the front porch) image over wifi. piCore also supports wiringPi. My application uses about 250 megabytes so about half the pi zero RAM is free.

The tinycore documentation is quite good.

cybersmythe
Posts: 1
Joined: Sat Apr 13, 2019 3:13 am
Location: Houston, Texas, USA

Re: Examples/advice of running linux "live" from initramfs

Tue Aug 11, 2020 9:33 pm

At work we use Yocto https://www.yoctoproject.org/ but I'd not be all that anxious to set that up from scratch if I didn't have to.

I keep thinking that it should be possible to take something like Debian's debootstrap to build a ramdisk image, but it keeps not working.

Mostly, I'm commenting because I'm interested in a solution that works for generating functional initrd images because everything I want to do with a pi requires one, so this is kind of a +1.

User avatar
dickon
Posts: 2135
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, in Towcester

Re: Examples/advice of running linux "live" from initramfs

Wed Aug 12, 2020 2:39 pm

mkinitramfs and friends just work -- I use them on my Pis. Minor issue with kernel updates not triggering a rebuild, but I've worked around that.
As it is apparently board policy to disallow any criticism of anything, as it appears to criticise something is to criticise all the users of that something, I will no longer be commenting in threads which are not directly relevant to my uses of the Pi.

Return to “Advanced users”