PiBakery – foolproof custom Raspbian setup

Everybody loves cake, right? Cakes have layers. Mmm…. cake! We’re sure you’ll also love PiBakery, a brand new way to bake Raspberry Pi images, which makes creating a custom image a… piece of cake.

blocks-on-workspace

PiBakery was created by David Ferguson. He’s a talented 17-year-old whom we first met at the Big Birthday event we held to celebrate four years of Pi back in February. He showed Liz and Eben a work-in-progress version of PiBakery, and they’ve been raving about it ever since.

This crafty program enables users to mix together a customised version of Raspbian with additional ingredients, and you need absolutely no experience with computers to set up your custom image.

In PiBakery, you drag and drop blocks (just like Scratch) to add extra components. PiBakery then mixes the latest version of Raspbian with its additional sprinkles, and flashes the result directly to an SD card.

PiBakery_script

“The idea for PiBakery came about when I went to a Raspberry Pi event,” says David. “I needed to connect my Pi to the network there, but didn’t have a monitor, keyboard, and mouse. I needed a way of adding a network to my Raspberry Pi that didn’t require booting it up and manually connecting.”

“PiBakery solves this issue,” he explains. “You can simply drag across the blocks that you want to use with your Raspberry Pi, and the SD card will be created for you.”

“If you’ve already made an SD card using PiBakery, you can insert that card back into your computer, and keep editing the blocks to add additional software, configure new wireless networks, and alter different settings,” says David. “All without having to find a monitor, keyboard, and mouse.”

PiBakery is available for Mac and Windows, with a Linux version on the way. It can be downloaded directly from its website. As well as the scripts and block interface, it contains the whole Raspbian installation, so the initial download takes quite a while. However, it makes the process of building and flashing SD cards remarkably simple.

PiBakery_success

David has written a guide to creating customised SD cards with PiBakery. It’s a very easy program to use, and we followed his guide to quickly build a custom version of Raspbian that connected straight to our local wireless network. Guess what: it worked first time.

Behind the scenes, PiBakery creates a set of scripts that run when the Raspberry Pi is powered on (either just the first time, or every time it is powered). These scripts can be used to set up and connect to a WiFi network, and activate SSH.

Other options include installing Apache, changing the user password, and running Python or command line scripts.

The user controls which scripts are used with the block-based interface. You drag and drop the tasks you want the Raspberry Pi to perform when it’s powered up. Piece of cake.

We love PiBakery, and cake. Did we mention cake?

 

74 comments

Avatar

Off to download this. Looks like a really useful program. Although, I was secretly hoping for a pi based cake maker… Ah well I guess that’s my next project

Avatar

That’s truly brilliant. I’ve been looking into automating the provisioning of Pis with Ansible but the first few steps still need to be done manually. I will have fun playing with this!

Avatar

Thanks so much for your feedback – I’m glad you like PiBakery, and I hope that it makes your setup easier!

Avatar

This looks amazing. Does it only run on Mac and Windows, or is there also a Linux / Ubuntu version available?

Avatar

Read the post you’re replying to!

Avatar

Does the upcoming Linux version mean this can be installed on a Pi? Or is it only compiled for x86 Architecture?

Avatar

Brilliant! That is so visually clever!

Avatar

For a 17-year-old boy, it is a great achievement. It is a very useful software. Thanks for sharing too. I will take a note of it.

Avatar

To be honest, it’d a pretty great achievement for someone my age too. David’s done an exceptional job here.

Avatar

An achievement for even someone my age, I’ve been building computers since the Altair came out. ;-)

Nice job, this is going to make Pi setups a snap. Thanks very much for making this work!

Avatar

“Necessity is the mother of invention”

Keep it up, David. You’re going places.

I’m sure that if you go to college and eventually become a software engineer you can do for Azure or AWS what you’ve just done here (forget client-side OSes like Windows, Linux or OS X) apply this to patching together XaaS-type services on Azure or AWS and you’re set for life.

Avatar

Yes, met Dave at Cambridge on Raspberry pi bday event. Was waiting for PiBakery from that time!! Kudos to this young man’s fantastic work..

Avatar

THIS IS AWESOME!!! I’m going to download this as soon as I can! Great job on this application David. It looks pretty sweet.

Avatar

Thanks for your feedback! I’m really glad you like PiBakery!

Avatar

Thanks for the great blog post Lucy, I’m glad you like PiBakery!

One quick thing I’d like to add is that anyone can create and add blocks in to PiBakery – see the guide http://pibakery.org/docs/contribute.html for more information on how to do that.

If anyone has any questions, suggestions or feedback, I’d love to hear it! Tweet @PiBakery and I’ll be sure to reply, or I’ll try and reply here too.

And finally, to stay up to date with the latest PiBakery news, including bug fixes, updates and new blocks, make sure to follow @PiBakery on Twitter!

Avatar

Amazing work, David! I’m looking forward to the Linux version! :D

Avatar

It should be here very soon, and there may even be a version that runs on Raspberry Pi!

Avatar

Oops. I was so excited, I forgot to ask my question:
Would you please provide checksums for the pre-compiled downloads?
Again, great work! Keep it up.

Avatar

Sure, I’ll do that very soon.

Avatar

I should have added my post in response to your comment so you would get a notification and hopefully see it. So, I’m going to be a little cross-posty and comment here with a link to my post:
https://www.raspberrypi.org/blog/pibakery/#comment-1263171

Avatar

I’m really glad David’s work is being noticed – I met him at the birthday party as well and he was a really nice guy. His tool saves me quite a lot of time!

Avatar

Excellent Work Done!

Avatar

Wow, Absolutely and utterly Wow. David is 17 now which would make him around 14 when the Raspberry Pi was first introduced. I wonder if he is proof positive of the benefit of the Introduction of the Raspberry Pi or if he is just a natural talent. I wonder if he was the recipient of one of the first Raspberry Pi’s to roll out of the factory?

This is very impressive for a programmer of any age. Congratulations to David. While I hate to say it, wait a bit so I can download the free version, but I would be happy paying for such a great utility as this.

Avatar

Although I didn’t get one of the first Raspberry Pi’s, my teacher did in June 2014, and that certainly inspired me to keep on programming, and try out physical computing.

And although I’ve been told a few times now that I should charge for it, I’m going to keep it free forever, in the hope that PiBakery might one day inspire other 14 year olds to get into programming and physical computing, just as Raspberry Pi did for me.

Avatar

I agree with that completely. this software is good enough for someone to make some money off of but I would be heartbroken if I couldn’t use it, and explore it, and modify it for free.

Avatar

Well done young man. To create software you are proud of is a every programmers goal; but for others to enjoy it is the dream. I have been programming for well over half my life and it has led me to some of my greatest achievements, I’m only 32. Continue striving to produce great things and you will be recognised for that, for as long as you do so. Again, well done!

Avatar

I’ve added a donate page to the PiBakery website (http://www.PiBakery.org/contribute.html) and any donations would be greatly appreciated.

But do know that you don’t have to donate – I’ll always keep PiBakery free forever!

Avatar

Super impressed. Keep up the awesome work!

Avatar

This is SO COOL!!! could it be modified to build your own custom OS perhaps? that would be utterly awesome!

Avatar

I’ll be adding in an option to use Raspbian Lite rather than Raspbian Full, so that’ll bring it a little closer to building your own OS.

Avatar

Great stuff, this looks like a very useful program! In addition to adding things, in some cases it is also useful to have the ability to remove things from the standard Raspbian distribution. For example in headless embedded systems there are many things you don’t need or want.

Avatar

I’ll be adding in an option to use Raspbian Lite rather than Raspbian Full, so hopefully that’ll help. If, however, you just want to remove a few packages you can always use the “Run Command” block and apt-get remove a few things!

Avatar

Avast kills the install saying its malware?????? and then requires a boot time scan WTF??

Avatar

That’s probably because I haven’t code signed the installer. I have actually bought a code signing certificate, but I haven’t got it yet (it’s been two weeks). I’m hoping that I’ll get it soon, and I’ll then be able to sign the installer.

Avatar

Avast reports the Windows installer as infected.

Avatar

That’s just because I haven’t signed the installer. I have actually bought a code signing certificate, but I haven’t got it yet (it’s been two weeks). I’m hoping that I’ll get it soon, and I’ll then be able to sign the installer.

Avatar

This is a great program and should help many people. Very well done.

For those looking for a barebones headless system then maybe a stripped down, secure version of Raspbian could be a starting point as that would be quicker than removing multiple features from the standard load:)

Richard

Avatar

There’s an interesting idea… I wonder if David could make a “PiBakery Lite” (or maybe “Diet PiBakery”) based on the “Rasbian Lite” distro, in addition to the current full-fat Rasbian PiBakery version?

Avatar

(oops, Raspbian)

Avatar

Having support for Raspbian Lite is possibly the most requested feature right now (along with a block for static IP), and I’m working on that right now.

I’ll probably have an option in the installer of which one(s) you want to install, and then you can select it from the “Write” window.

My only concern is that I’ll need to make sure all the blocks are compatible with Raspbian Lite – some may require packages that are installed already in Raspbian Full. I’ll go through them and check them all.

Follow @PiBakery on twitter to get notified of when that update is released!

Avatar

It would be nice if there was an option to use PiBakery with Raspbian Lite which meant you had a smaller download filesize :)

Avatar

That’s coming – follow @PiBakery on twitter for more details!

Avatar

A very useful program. Well done. I have two questions:

1. The image above shows Pi Zero OTG in the menu, but the image on the PiBakery site does not. Is this available, and if so what does it do?

2. Is it possible to choose Jessie Lite as the OS?

Paul

Avatar

1) There are Pi Zero OTG blocks – these can be used for setting the OTG mode for a Raspberry Pi Zero (such as setting it to Ethernet over USB, or MIDI over USB). The reason it isn’t on the image on http://www.PiBakery.org is because I forgot to update the image! I’ll do that soon, thanks for pointing it out.

2) This is by far the post popular request, and I’m working on adding it in right now. If you follow @PiBakery on twitter I’ll post an announcement there when that’s released.

Thanks for your feedback!

Avatar

Very nice – but I’d really like to be able to configure where it keeps the Raspian image file – I’ve just seen my application support folder grow by 4gb. I’ve a limited (500gb!) ssd for my OS, everything else is on an external striped thunderbolt drive – where I keep almost all the stuff I don’t use everyday – that image would come in that category. Bit of a specific request I’m afraid

Avatar

I can definitely do that – I’m actually currently rewriting the installer so you can choose Raspbian Full or Lite, and I’ll add that in as well.

Thanks for using PiBakery!

Avatar

Absolutely brilliant! This is far more important than just a tool.

Avatar

So if I flitter between two houses that have different WiFi settings, I just add two blocks and it will find each WiFi domain?

Kody

Avatar

Exactly, and even better – if you then go somewhere else with another WiFi network, you can put the SD card back into a computer running PiBakery, PiBakery will detect that and load the previous settings, and then you can drag out another WiFi block with the “On Next Boot” block, sand save your changes back to the SD card!

For more details about this, see my guide: http://www.pibakery.org/docs/edit.html

Avatar

Truly outstanding, I am going to a fresh install of Jessie.. then try this.. wow… amazing work..

Kody

Avatar

Great project David Ferguson, its very very helpful.

Thank you.

Avatar

Thanks – I’m so glad you find PiBakery useful!

Avatar

I must take a look at how you have done this but it does bring nixos to mind. nixos, http://www.nixos.org, “has a completely declarative approach to configuration management” ie You write a specification of the desired configuration of your system in NixOS’s modular language, and NixOS takes care of making it happen.

James

Avatar

Actually, there is an easier way to make a custom raspbian/debian jessie image- build it, customize it, then use piclone, and disk imager… like this guy did:
https://www.youtube.com/watch?v=BDaak5W2mSk

Avatar

It looks such an obvious idea: but only after somebody else has actually gone ahead and thought it up and (more importantly) built it ! (“Click ‘n Configure” ?) Nice one.

Avatar

Well done young man. I’m about twice your age and just learning to program but know you are TRULY and inspiration.

Avatar

I’m really curious if David or someone else in the community would be interested in helping out with a very similar effort. If anyone is familiar with Turnkey Linux,
they provide slimmed-down deployable VMs for various hypervisors that are all pre-configured for a specific task. Best of all, it’s Debian. In order to build and maintain all of these images, they have a special image called TKLDev (TKL is short for Turnkey Linux, obviously). Using a few short lines in a makefile, it is possible to define new builds and create images that serve different purposes. It’s an incredibly simple, slick, and powerful little tool.

Several months ago, I reached out to the Turnkey folks on their forums and asked them if they had plans to support the Pi:
https://www.turnkeylinux.org/forum/general/20160317/collaboration-rpi-foundation

Since they already have a wealth of images and definitions for TLKDev, porting that over would help out a ton of people in the RPi community. They replied that it is definitely something that they want to pursue and would even be able to host the images on their site, but they just haven’t had the time or resources to work on it.

If anyone is interested, I would be glad to put you in touch with some of the founders and maintainers. I think it would be a great way to build, maintain, and distribute new (and existing) images quite easily.

Avatar

thanks for PiBakery. It is great piece of work, and so helpful to those of us just starting our Linux adventure. … looks good too :)

I have some questions. Do they go here, or is there a forum somewhere?

Is there somewhere I can see a log of any failures or warnings during 1st or “every” boot? (eg. failed package install, or failed download from urls, or python program which didn’t start for some reason). I looked through /var/log but didn’t find anything.

What happens if a step in the chain fails? Are the following steps attempted? Are the failed steps retried at next boot?

If I need the Pi to re-run 1st boot, following a failure of one of the steps (maybe some web site didn’t respond to a file download request), do I need to rewrite the SD card, or is there some way to re-trigger 1st boot?

Avatar

You can ask your questions either here, or you can submit a new issue of the PiBakery GitHub page (https://github.com/davidferguson/pibakery/issues/new).

At the moment there isn’t any log for PiBakery – but this is something that I’m adding in and should be in the next version of PiBakery.

If a step fails On First Boot, that step will be skipped, and never run again. Again, this is something that may change in the future.

To re-run First Boot, you should have a look at the On Next Boot scripts. See http://pibakery.org/docs/edit.html for more information about that.

Thanks for using PiBakery!

Avatar

Logging: good that you are working on a log, as without one it is difficult to debug newbie things like authority issues, or even to be certain that everything completed.

Re-run 1st boot: I had read about On Next Boot, but have just discovered how your SD card update option is triggered. That improves some of the tedium and delays while trying to debug.

What I was asking about was whether there was any way on the RPi to trigger it to rerun On First Boot at next boot. ie. (provided that my OFB block was designed to OK for rerun) to trigger a re-initialisation of the RPi w/o having to pull out the SD card, and rewrite it?

Avatar

You can manually run the pibakery firstboot script using:
sudo /boot/PiBakery/firstBoot.sh

If you want to get that to run on the next boot, you can (probably – I’ve not tested this) run:

sudo cp /boot/PiBakery/firstBoot.sh /boot/PiBakery/nextBoot.sh

to copy the firstBoot script to the nextBoot script, and then run:

sudo touch /boot/PiBakery/runNextBoot

to enable the nextBoot script.

Hope this helps!

Avatar

thanks. Will test this further in the morning.
At the moment firstBoot.sh is empty. Presumably because I put the SD card through a PiBakery card update procedure.

Avatar

BarryM: I can’t reply directly to your comment, so I’ll reply here.

Yes, if you’ve used the Update feature of PiBakery, it will erase the firstBoot.sh script. But up until the time that you use PiBakery Update, the script would have still been there.

Avatar

There seems to be something I don’t understand.
The following url downloads a txt file in the RPi’s browser, but gets a 406 when I use it with PiBakery’s Download File block.
http://albumplays.com/download/test-dl/?wpdmdl=3713

It looked into GIT, and see that it eventually calls a Linux curl command. I tried a curl command from inside a terminal session, and got a 406 error there too.

What is acceptable in your Download File block?

Avatar

Would you be able to create a new issue on the PiBakery github page (https://github.com/davidferguson/pibakery/issues/new) for this, and include the exact error message and what you’ve tried to get round it?

Thanks!

Avatar

Done.

Avatar

bug ???
new pi 3
install with pi bakery with vnc install and wify setup:
tried to set a static ip on lan with the pibackery install (not through pi bakery but after) every time after setting static i could not ping out, dns would not resolve.

Install without pibakery:
set static (same method) all dns resolves, all is well.
I would like to use pi bakery for obvious reasons.

Avatar

Can you describe how PiBakery updates work?

I notice that PiBakery seems to dial out when I open it. I received the blocks update a day or so ago (thanks). What about updates to PiBakery itself? I saw at Git and on twitter that there is a new version, but I don’t seem to have it. ie. no Windows resizing here.

What should I see if there is an update to PiBakery? How do I tell which version I am on? Is there a release note with a new versions giving heads up for any changes?

One other thing, is there a typo on your web site here?
http://pibakery.org/docs/create.html

Point #2 … “Click on the Hats category” ? … should be “Startup category”?

Avatar

Thanks – “Hats” is what the “Startup” category used to be called ages ago, and I’ve obviously forgotten to update the docs when I changes it.

As for updates, PiBakery will not automatically download application updates. The reasons for this are partially technical and partially my thoughts on auto-updaters.

The technical issue is that without having code signed PiBakery (and I’m STILL waiting on my code signing certificate to be processed – 5 weeks after I bought it!) I can’t use Electron’s official updater, and although I could, and actually did write my own, it had issues and I wasn’t sure how best to resolve them.

The other reason that prevented me from adding an autoupdater was the fact that anyone with my GitHub password would be able to push out new code that would run on many people’s computers. Although I do have a unique password for GitHub, and I consider it very secure, it’s a big risk, and not one that I’m really prepared to take. Block updates and Raspbian updates are OK, as they are never downloading code that is going to be run, only files that are used with PiBakery.

Basically, for the moment at least, you’ll need to download the latest version of PiBakery and install that manually if you want the latest features. If it helps, you can have multiple versions of PiBakery installed at one time, so you don’t have to uninstall the older version if you don’t want to.

David

Avatar

If i need a restart for Pi Zero OTG mode ethernet to work, why is there no “On Second Boot” option, so i can reboot and then continue my package downloads, etc after it reboots?

Maybe on firstboot, have it write a file containing “1”

Then with your reboot command, before rebooting set that value to 1++. On new boot you’ll know which boot # is happening.

Avatar

Thanks for your informative response. I am sure that the following is painfully obvious to you, and that you are juggling many conflicting priorities, and doing a great job btw :), but anyway …

40,000 downloads of PiBakery
464 followers on twitter

How do the majority know about the improvements and the bug fixes?

Is not easy to see which version we are running.
Is not possible to see whether the version on your web site available for download is any different.

So? … run a 1.2gb download, and look for any differences?

Maybe in the meantime you could:

* show the executing version number on PiB front panel somewhere.
* popup an info dbox during pgm initialisation to say that a new version is available. Give a download link.
* show the current version number on your downloads screen, and provide a list of changes for each version.

Avatar

Awesome work, David… thanks so much for sharing!

Avatar

Great Application.It saves my time.Absolute work.

Avatar

Just given this a download – so awesome man, very handy tool.

Also I like the little click noises when things slot together – tickles my brain.

Leave a Comment

Comments are closed