Configure Your Raspberry Pi Installation With PiBakery

von Satoshi Nakamoto

You probably know how much we love the Raspberry Pi here at MakeUseOf. Over the years we’ve shown you how to use it in smart home projects, as a video game emulator, and even as the heart of a stop-motion movie studio.


But the device is not perfect. While it is simple enough to use the NOOBS installer to get one or more operating systems installed (particularly Raspbian), your first boot can be difficult, usually requiring the use of a mouse, keyboard and monitor to configure it.

MakeUseOf Linux PiBakery Drag

What if you could configure Raspbian before you booted your Raspberry Pi? Wouldn’t it be great to have the wireless network set up in advance, or configure some other options so that the Pi and its preferred OS work right out of the box?

Proof of the Pudding Is in the Eating
The solution is PiBakery, a superb block-based configuration tool for Windows and Mac computers (a Linux version is in development) by 17-year-old David Ferguson, whose explanation as to why he created this tool is one of those “Duh — why didn’t anyone else do this already?!” moments.
The idea for PiBakery came about when I went to a Raspberry Pi event. 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.
Dragging and dropping blocks, Scratch-style, to specify a particular configuration for your Raspbian install is particularly clever, and the software bakes your settings into your Raspbian configuration, which can then be written to SD card. Better still:



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.
The significance of this to Pi users old and new should not be understated.
Get Started With PiBakery

You can find PiBakery at www.pibakery.org — head there now to download the correct version for your computer and install it. It’s around 1 GB, so may take a while, but remember that it has a full copy of Raspbian Jessie bundled in with it.



5 Ways New Raspbian Jessie Makes Raspberry Pi Even Easier to Use5 Ways New Raspbian Jessie Makes Raspberry Pi Even Easier to UseFollowing the release of Debian Jessie in July, the Raspberry Pi community has been blessed with a new release of the Raspbian variant, based on the "parent" distro.READ MOREWindows users will find that the SmartScreen service initially blocks the installation, so click on More info > Run anyway. (This works for Windows 8 and Windows 10, but on Windows 7 simply click Yes.) Incidentally, if Windows SmartScreen is unavailable, as it was for us, click the Run option.

MakeUseOf Linux PiBakery SmartScreen Windows 8 10

Within a few moments you should have a copy of PiBakery running on your computer. Spend a few moments looking at the interface; you’ll notice the menu down the left, which holds the commands. These can be dragged into the work area, and instructions added. You’ll also notice the Import, Export, and Write tools across the top. We’ll take a look at those later.

For now, it’s time to configure Raspbian just the way you want it!
Pre-Configure the Raspberry Pi Network
A common problem with the Raspberry Pi is the issue of connecting to a new wireless network without a keyboard and mouse. Even using SSH, you need the device to be connected to an Ethernet cable first.

With PiBakery, you can easily circumvent this problem by pre-configuring the wireless network connection. Get started by opening Startup and dragging On First Boot into the right pane. To this, add Network > Setup Wi-Fi.

MakeUseOf Linux PiBakery Wi-Fi

To configure this, you’ll need to click into the Network: field and add the name of the wireless connection. A password will also be required; add this to the Pass: field. You can also change the network authentication Type.

Now, it’s also worth changing your password at this stage. Consider the example above. But the utility’s designer. If you’re out in public with your Pi, want to connect to a network, and haven’t changed the default password, then this is obviously a security risk, so open Settings and drag the Set user password to: block into the work area, adding a new password.

When you’re done, open Other, and add Reboot to the program. Once saved, these instructions will be added to the initial boot. Before you do this, however, click Export to save them somewhere safe. You can use the instructions in future via the Importcommand. This configuration file, saved in XML format, can be used on any computer, so you might share it with friends and collaborators!

Advanced Raspberry Pi Configuration With PiBakery
There’s more to this than pre-configured passwords and network connections, however. PiBakery also makes it possible for you to install software. For instance, you can use the Programs > Install Package: option for this, specifying a package name for an application you would like to use on your Pi.

MakeUseOf Linux PiBakery Programs

Some pre-defined options are available here, too. The Install Apache/PHP/MySQL block configures the installation of the tools to turn your Pi into a LAMP server, for instance. You might be happier having the computer pre-configured as a VNC server, however. Note that these options in Programs require the network connection to have been configured!


Meanwhile, use the Other category to drag blocks into place if you wish to run commands or Python scripts. These are best placed under the On Every Boot block.

MakeUseOf Linux PiBakery Pi Zero OTG Mode

Finally, if you’re using the Pi Zero, take a look at the Pi Zero OTG options, which enable you to specify how the USB connector is going to be used. It can be used for mass storage, MIDI, and even be disabled. It really is all up to you.


 

Remember to save with the Export command before proceeding!
Write Your Baked Pi to SD Card
Now you’re done dragging blocks, it’s time to create your Raspbian disk image. All you need to do is insert a blank microSD card (or SD card if yours is an early Raspberry Pi) and click Write. You’ll be prompted to select the SD card form a drop-down menu. Once this is done, click Start Write, and Raspbian will be written to the card, complete with the configuration you created.

MakeUseOf Linux PiBakery Write to SD Card

When complete, safely remove your SD card, return it to your Raspberry Pi, and boot. Raspbian should load up, complete with the configuration you specified in place!
Edit Your PiBakery Configuration
Perhaps the most remarkable thing about PiBakery is the ability to edit the configuration even after it has been used on your Raspberry Pi. To do this, clear any blocks in the PiBakery work area, then insert the SD card. A new button will appear on the menu bar, Update. Click this to open the configuration currently saved to the SD card.

Note here that if the Pi has been booted, anything configured as On First Boot will not be present. These changes have already been instructed and applied, so cannot be edited.

You’ll now be able to edit the configuration. Remember to save with the Export tool if you wish to retain the configuration for future Raspbian installations.
Get Into the Kitchen!

PiBakery is undoubtedly the most important Raspberry Pi tool since the NOOBS installer, and makes the job of pre-configuring Raspbian absolutely effortless. No more wireless networking issues! A compact LAMP box ready and waiting for you on first boot — the advantages of this are endless. The developer is busy adding new features, too, single-handedly revolutionizing how Pi users setup and use their computers.


Have you tried PiBakery? Would you like to see it expanded to other Pi-friendly operating systems? Tell us in the comments.

Image Credits: Monkey Business Images/Shutterstock

Read the full article
Porträt von Satoshi Nakamoto

Satoshi Nakamoto

Zur Person

Satoshi Nakamoto