If I buy a PC without Windows pre-installed, I have to either copy Windows installer to
a flash drive from another computer, or install Windows from a special image server on my network.
That is, assuming I wanna run Windows in the first place!
But guess what? This little Raspberry Pi can set itself up, without any flash drive,
directly over the Internet, using a new feature called Network Install!
Like Apple's Internet Recovery, you don't have to have any OS installed on your computer to use it.
And you don't need to run a separate server to boot your Pi and image its drive. Now,
one thing I have to make clear right away, because I *know* you're gonna comment on it: this feature
is NOT netbooting. The Pi supports that too. This is similar, in a sense, but this goes deeper.
What this new feature means is you could walk into a store, buy a Raspberry Pi and
any old micro SD card, go home, plug it into your network, and the Pi could set itself up.
Sort of. I mean, you might not be able to _find_ a new Raspberry Pi anywhere right now. And since
the feature's in beta, it's not actually running on existing Pis unless you update their firmware.
But soon. Once it's out of beta, that'll be possible.
And heck, you can't even do that on Macs! Their Internet Recovery feature is only possible
because Apple burns that into the storage that's soldered into the Mac. On the Pi, you can use any
storage you want. Heck, you can set up a Pi with just a thumb drive, no other computer required!
This new feature is also cool because at this point, you can boot a Pi
a buncha different ways: you can boot from SD cards, or built-in eMMC on the Compute
Module. You can boot from any USB drive, like flash drives, hard drives, or SSDs.
You can netboot using PXE boot. You can even boot Compute Module 4's from NVMe SSDs. And
now, you can boot a Pi directly over the Internet, using this Network Installer mode. Pretty cool!
But seeing is believing.
First I'll show you how to update your existing Pi to be able to do network install.
You have to have a Pi 4, Pi 400, or Compute Module 4, though.
Older Pis don't have the EEPROM that makes this possible.
The EEPROM is inside this tiny chip here. I actually did a whole video on how the Pi 4
boots itself up, so go check that out if you want the gory details. ... And I mean gory.
While this feature's in beta, you actually _do_ need another computer
to update your Pi's firmware, which is ironic, because the whole point of the
feature is to _not_ require another computer... but it is what it is.
On my Mac, I opened up Raspberry Pi Imager, then I clicked 'Choose OS'. In the pop up,
scroll down to 'Misc utility images', and click on it. Then click on 'Beta Test Bootloader',
and in that menu, click on 'SD Card boot'. Then pop a microSD card into your card reader,
and choose it with 'Choose storage'. Click 'write', then enter your password when prompted.
Since the software needed to flash the firmware is pretty tiny, this should be pretty fast.
Now pop out the microSD card,
insert it into your Pi, then boot up the Pi, ideally with a monitor connected.
The activity LED should start flashing pretty rapidly. What's interesting is that pattern
of flashes is actually indicating individual bytes being written to the EEPROM in real time.
Once that's done, the green LED starts flashing in a steady pattern, and if you
have a monitor plugged in, it should show a green screen, meaning flashing was successful.
Unplug the Pi, and take out the microSD card.
At this point, you're running the beta bootloader, and it should be able to do a Network Install.
Make sure you have a keyboard and Ethernet cable plugged in,
and pop in a microSD card that _doesn't_ already have Pi OS or another operating system on it.
If you wanna use the same microSD card,
you can actually do that without even erasing it. Just pull it out of the Pi,
do the next few steps, and then pop the card back in once Pi Imager's running.
But assuming you have a different card or erased your original card,
it's time to power on the Raspberry Pi.
And look at that! There's a new fancy-looking screen that pops
up when the Pi doesn't detect an operating system.
Hold down the Shift key for a few seconds, then when it asks, press the space bar.
After that, the Network Installer will connect to the Internet,
and download the Raspberry Pi Imager to RAM.
The Imager download was pretty slow for me, and heck, right now it doesn't even work with IPv6,
but hopefully those things get fixed before it gets out of beta.
Anyways, once that download's finished, the same old Raspberry Pi Imager we all know and love
boots up from RAM, and you can flash the microSD card—straight from the Pi itself!
You know what's _really_ cool? You don't even need a mouse! Every part of the interface can
be reached just using the keyboard, though advanced configuration takes a lotta tabbing.
But I love that, because I don't always have a mouse sitting nearby.
And right now the installer isn't accessible for blind users, but according to Raspberry Pi,
they might integrate Orca, so assistive devices could work with the Imager's UI.
Anyways, select an OS, select the microSD card, and hit 'Write',
then watch as the Pi simultaneously downloads and writes your image to the card.
How much RAM you have on your Pi shouldn't be an issue, even if you choose a big OS image,
because the image is actually decompressed and written straight through to the microSD card.
Once it's done writing, the Pi will automatically reboot,
and since there's an operating system on the card now, the Pi should boot from it!
Now, what about USB flash drives or SSDs?
Well, I have this TCELL 4K Fire flash drive that a viewer sent in,
and I've been meaning to test it out on a Pi. So now's as good a time as ever!
I'll shut down the Pi, pull out the microSD card,
plug in the USB flash drive, and power up the Pi again.
And after holding down Shift, then pressing Space, and waiting for the Imager to start up,
it looks like the USB flash drive is selectable.
I flashed it, and after that finished, the Pi rebooted off it without a problem.
This is awesome!
One other thing I wanted to try out: what if I had a custom Pi OS image, like a RetroPie build,
or some other OS I wanted to install that I couldn't get to through the Imager's defaults?
Could I just put an image file on a USB flash drive, pop that into the Pi,
and flash it to my card? Yes, in fact, I can! I tried it out, and when I chose the
'Use custom' option in the Operating System menu, it showed all the image files on my flash drive.
I should mention I formatted my flash drive as FAT32.
I'm not sure if it'll work with other formats.
But this makes it even better. In addition to being able to set up a
Pi from scratch anywhere with an Internet connection, I could carry around a flash
drive with my favorite OS and flash it to the Pi, too, all without having another computer!
This is all great, but one question I hear a lot is how secure is it?
Well, for anyone who's really concerned about it, I'd recommend never installing
something over the Internet regardless—always use local images you've independently verified.
But for most users, the security in place is adequate; the Imager that runs in the
Pi's RAM is verified using a self-signed certificate that Raspberry Pi created,
and it looks like the cert they're currently using is valid for about 24 years.
And the Imager itself is signed with a separate key so it can be verified before the Pi boots it.
Once rebooted, the Imager actually fetches the current date and time over the web,
not using NTP but using HTTP, since it needs to have a somewhat accurate time and date
so the image downloads work correctly.
Is the end-to-end security absolutely bulletproof? No, but it's good enough for me. Also, since I
know some of you will ask: the source code that actually builds the Raspberry Pi Imager
buildroot image that makes this all work
is up on GitHub in the imager project's embedded directory.
There are a few other limitations with the current Network Install process.
Some people are asking about fully headless automated provisioning.
That's actually been possible on the Compute Module 4 for almost a year.
But right now, at least, it still requires extra steps
if you wanna try to do that on a Pi 4 or Pi 400.
Also, you can't do any of this stuff over WiFi for now. The Pi's EEPROM is already a
bit space constrained. I've been told that's part of the reason why they can't add SATA boot to the
Compute Module 4. So adding more code to support WiFi in addition to Ethernet for Network Install
might be impossible, at least with the current generation of Raspberry Pis.
And what about the Compute Module 4? Updating _it's_ bootloader is
a little more complicated, because it's EEPROM works a bit different.
On the CM4, you need to use the rpiboot tool to flash the beta bootloader.
Finally, I also wanted to point out two features on the Raspberry Pi that can come in handy when
you mess around with the EEPROM: You can check your current config with `rpi-eeprom-config`,
and edit it using the `--edit` option. Or run `sudo raspi-config`, go to Advanced Options,
then Boot Order, if you just wanna change the boot order on the Pi.
It's great Raspberry Pi is adding this feature. I think back ten years ago,
when Apple released iOS 5 for the iPhone.
Sure there were big new features like iCloud and iMessage, but the biggest
update—the one that took the iPhone from a glorified iPod to the behemoth it is today?
That feature was independence from iTunes. With iOS 5,
you could activate and update iPhones without connecting them to another computer.
I think once Network Install is outta beta, a major barrier to first-time Pi
owners will disappear: they won't have to set it up from another computer. And
heck, it works well enough that I'll be using it a lot, now, too.
Power users like me will still use Imager on another computer, but I think for many people,
this new way of setting up a Pi might be the only way they ever do it. If you try it out
and find a problem, there's a forum topic where Raspberry Pi's asking for feedback.
Also, I mentioned at the beginning of this video that this feature _isn't_ the same
thing as netboot. That's a different beast, and Wendell over at Level1Techs just posted a thorough
blog post covering netbooting a Raspberry Pi, so check that out if you're interested.
I plan on covering it in a future video, too, so be sure to subscribe!
Until next time, I'm Jeff Geerling.