Skip to content

Raspberry Pi Boot step by step

ggodart edited this page Jan 23, 2021 · 1 revision

Getting a Pi to Boot using an image

To get started, download Raspbian latest version from here. This is an image of the full Pi operating system you will use to overwrite the entire contents of the SD card you're using with the Pi.

Unzip the file to create the .img file to write on the SD card. You need to get this image file onto your SD card not by copying it there normally, but by copying each byte of the image directly to the same byte on the card. To do that, you need special software. (These installation instructions)[http://elinux.org/RPi_Easy_SD_Card_Setup] cover how to set the SD card up on any operating system you happen to be using. If you're using Windows, I recommend using (Win32DiskImager available here)[http://sourceforge.net/projects/win32diskimager/files/latest/download]. Unzip all files in the Win32DiskImager zip, run Win32DiskImager.exe, click its little blue folder icon and choose the raspbian.img file you downloaded. To the right of the blue folder icon, make absolutely sure you've selected the correct drive letter for the SD card you will be erasing. For added safety, unplug any USB drives or memory cards you don't want to accidentally erase. Click the "Write" button.

Put your completed SD card in the Pi, connect your HDMI video cable, the ethernet cable, and the USB keyboard. Finally, plug in the micro USB power cable. The Pi will boot immediately. There's no on/off switch (unless you buy one).

You should see white text on a black background that scrolls by for awhile. Eventually, a grey box on a blue background should appear. .

Type the down arrow key till the red bar highlights expand_rootfs, then press Enter. This will expand the Pi OS to use your entire SD card.

Highlight change_pass, press Enter, then pick a new password to log into the Pi. You can leave it set to the default password of //raspberry//, but if anyone breaks into your network they could use the Pi as a platform for causing a lot of trouble if you leave the default password in place.

Highlight ssh and enable the SSH server. SSH is what you will use to log into the Pi remotely and upload files.

Highlight boot_behaviour and tell it to boot to desktop which will give you a graphical user interface (GUI) next time you boot. Keep in mind that running the GUi uses more power and memory and CPU. With my 850ma power supply and just a keyboard I had a lot of trouble typing when the GUI was running (the Pi wouldn't see keys being pressed, and then it would see a key press but not a release, so the key would get repeated a dozen times), but without the GUI the keyboard worked fine. I was using a fancy Dell keyboard with extra lighted buttons and a built-in USB hub and USB ports on its back, so it probably used a lot more power than a standard keyboard. Either way, I found it worthwhile to leave the GUI running so I could leave MH files open and not lose my place as I edit them off and on, adding new features and fixes.

Press the Tab key until Finished is highlighted in red, then press Enter.

It may ask if you want to reboot at this point. Tell it No. It should then leave you at a command prompt.

At this point you must decide how to set a static (non-changing) IP address for your Pi such that you can connect to it from a computer, laptop, smartphone, etc. This page has a section called //Installing VNC on the Raspberry Pi for Remote Access// which you should follow, starting from where it says to type ipconfig. Alternately, if you're familiar with setting up a "static DHCP lease" on your router, you can type ifconfig and note the MAC address of your Pi in the section labeled as "eth0", then tell your router to always give the same DHCP address to that MAC address. Either way, you should follow the guide from where it says to type sudo apt-get install tightvncserver in order to install the software necessary to look at your Pi's GUI desktop from another computer.

Once you've got tightvncserver installed, type sudo reboot

The Pi should boot to its GUI desktop, showing a big raspberry on a white background. At this point, you should be able to connect to the Pi and see that desktop by running any VNC client on another computer or smart phone/tablet. If you can't get VNC connected and you don't have a USB mouse or can't get one to work with your power supply, hold the Windows key and then press the R key. Much like in Windows, this brings up a box you can use to run a command. Type lxterminal in the box and press Enter. Now you have a command prompt you can use to type commands like ifconfig to verify the IP address of your Pi.

If you don't want to use VNC or you can't get it working, you can SSH to your Pi machine to at least get a command prompt. Log in as pi with the password you set (raspberry by default). On Windows, I recommend downloading @http://www.putty.org/ as an SSH client. On Unix and Mac, type ssh pi@192.168.x.x from a command prompt, replacing 192.168.x.x with the actual IP address of your Pi.

Once you get VNC or SSH connected, unplug the USB keyboard and mouse so they don't draw power.

Using TightVNC client to connect to the Pi from Windows, I found it kept disabling the clipboard in my other programs, especially when I copied and pasted to virtual Ubuntu machines running in VirtualBox. In fact, something about TightVNC seemed to cause VirtualBox machines to stall when hibernating or unhibernating, and one time it even affected my whole computer, preventing me from shutting down. I stopped using TightVNC and haven't had the problem again so far, so watch out for that. I was thinking of trying TigerVNC but decided it was safest to use the Remote Desktop Viewer that comes with Ubuntu from within an Ubuntu VirtualBox machine I always have up for virus-free web browsing.

The tightvncserver on the Pi actually doesn't support clipboard sharing by default. To get it working, you must run sudo apt-get install autocutsel and then run autocutsel from a command prompt on the Pi. autocutsel must be run as the same user that tightvncserver is running as or you'll get an error "Client is not authorized to connect to server", so if tightvncserver is running as root, then run sudo autocutsel instead of autocutsel. I only leave autocutsel running for as long as I need to transfer clipboard contents back and forth to the Pi because leaving it running can cause the clipboard to fail in other applications when using Remote Desktop Viewer. I have also crashed lxterminal twice trying to copy about 100,000 lines of its buffer with autocutsel running. Without autocutsel, the copy succeeds. Note that I did not have autocutsel running when TightVNC was causing all its problems.

At this point, you can use the Midori web browser you'll see in the upper left corner of the Pi GUI to download MisterHouse.

Clone this wiki locally