It is marked Raspberry Pi 2 Model B V1.1 2014. Date codes on chips look like 2014, so I have probably had this thing for at least 5 years without using it.
The first thing to do is to find a micro-SD card for it and then download some appropriate Linux distribution onto it.
The Raspberry Pi download site tells me that Raspbian is now called Raspberry Pi OS and is some form of Debian Buster. There are 3 choices. I pick the big one (which is 2.5G), which is Raspberry Pi OS with desktop and recommended software. While it is downloading, I scrounge around for a micro-SD card.
I find a new in package 8G Sandisk card, and the download ends up giving me:
-rw-rw-r-- 1 tom tom 2645200349 Jul 25 16:06 2020-05-27-raspios-buster-full-armhf.zipNow I do this on my Fedora 30 desktop:
ls -l 2020* -rw-r--r-- 1 tom tom 7365197824 May 27 00:46 2020-05-27-raspios-buster-full-armhf.img -rw-rw-r-- 1 tom tom 2645200349 Jul 25 16:06 2020-05-27-raspios-buster-full-armhf.zipIt looks like this will just fit on my 8G card. I put the card into my USB card reader. It detects and mounts the useless VFAT partition as /dev/sdf1. This is important to get right, so I don't do some stupid thing and dd the raspberry image onto my system hard drive. Now I do:
umount /dev/sdf1 su dd bs=4M if=2020-05-27-raspios-buster-full-armhf.img of=/dev/sdf conv=fsync syncThis takes a while, but hey -- I am moving 8G of stuff over USB. When it is done, I would think I could put the card into the raspberry, but keep reading.
Apparently ssh will not be enabled by default, but the claim is that if I write an empty file named "ssh" to the root directory, it will enable sshd on the first boot. This is wrong. The file needs to be in the boot partition, as I learn by following this bad advice and wasting time. So, I do the following. I unplug and replug the card in my card reader. Fedora detects and mounts both boot and rootfs for me. Then I do:
su cd /run/media/tom/boot touch ssh sync cd umount /dev/sdfAnd just for entertainment:
fdisk -l /dev/sdf Disk /dev/sdf: 7.4 GiB, 7948206080 bytes, 15523840 sectors Disklabel type: dos Device Boot Start End Sectors Size Id Type /dev/sdf1 8192 532479 524288 256M c W95 FAT32 (LBA) /dev/sdf2 532480 14385151 13852672 6.6G 83 Linux
The claim is that I power this via USB. One source recommends a 2.0 or even a 2.5 amp power supply -- but says that you may get away with 1.0 amp for light use. I plan to just use this headless. My only real option is the supply for my Samsung phone, which is labeled at 2.0 amps.
The article above talks about powering it via pins on the GPIO header. Clearly the thing needs a barrel jack. Provision for a serial console would not hurt either.Actually, the problem is the imbeciles at Tom's hardware don't know the root partition from the boot partition, the file belongs in the boot partition. I was suspicious of this from the start -- and I was right. Here is the official word from the documentation:
3. Enable SSH on a headless Raspberry Pi.Happily for me, I don't have to "dd" the whole image to the card and start over. I just put the ssh file into the root partition, boot it again, and it is responding to ssh.
For headless setup, SSH can be enabled by placing a file named ssh, without any extension, onto the boot partition of the SD card from another computer. When the Pi boots, it looks for the ssh file. If it is found, SSH is enabled and the file is deleted. The content of the file does not matter; it could contain text, or nothing at all.
Go to /etc/ssh/sshd_config change the line as below
PermitRootLogin yes #(i just added this to the bottom of the file)After this I do "service sshd restart". I also set the same password for root and for "pi". And now life is good.
This is a hot topic for some people, and I don't know why. I am an old hand in the Fedora world and there is none of this sudo nonsense. But it takes all kinds to make a world.
su apt-get update apt-get install picocomThat was easy and took less than 30 seconds.
picocom -b 9600 /dev/ttyUSB0And it works! I am looking at the NMEA messages pouring forth from my GPS gadget. With this running on a little headless computer, I can stick this out in my yard (with all due care to finding long enough network and power cables) and see if the antenna does better than in my house.
Tom's electronics pages / [email protected]