Some “long time ago” I was looking at making a Safer Computing Appliance and did a fair amount of exploration of using CD-Rom based Linux releases. Then waited a bit longer to get a couple of Raspberry Pi boards as target hardware.
Since then, there was some waiting for me to get other things done. Then, tonight, I figured it was about time to try and fire up one of these boards.
It didn’t go as well as I’d planned. (Not all that bad mind you, just, well, “Has Issues” best describes the evening…)
But not to worry, it’s running right now and doing the OS install as I type.
First off, I spent a good 2 hours just trying to figure out “Do I Have Power?” and “Why isn’t it booting?” (After “Is it booting?”…)
The RPi has a nice little bright red miniature LED on it that lights up when it has power. The “Getting Started” page doesn’t bother to tell you that… I’m sure it’s noted somewhere; just not at the point where a “newbie” following the getting started guide for beginners is going to see it.
I’d figured “It gets power through USB. I have lots of USB stuff and cables. No Problem.” In fact, it’s a problem.
They use a small USB connector that is ‘power only’, so none of the communications wires are hooked up. Takes 700 ma or so. I have a USB Hub that puts out 1000 ma on some ports, so figure I ought to be fine. Not so.
First off, my cables are all “Mini” or full sized. Turns out there is also a “micro” and I ought to have read more closely about that whole “mini” vs “micro” thing. I do have ONE cable with a “mini” end (or what looks like one); but it goes to an old digital camera. Has a large inductor in it (about 1/2 the size of a C battery). After an hour or two of trying to debug “no power?”, I decide “Maybe that cable doesn’t have the power leads”. (AFTER proving that the hub DID have power, but finding out it does not light up a ‘power’ light, only ‘device’ lights, but only for some kinds of devices, some of the time… I ended up using a USB Disk Drive that has a power light on it to detect power in the Hub.) So OK, power is IN the hub, but not getting to the RPi via the questionable type cable. No Problem, I’ll just run a cable from the ‘mini’ port on the hub to the “regular” port on the RPi just to see if it “goes”. Turns out the Hub doesn’t send power that way… out the ‘mini’ port…
Off To Fry’s…
There’s a saying in the valley that no project can be completed without at least one “run to Fry’s”. A “Geek Store” that started life as a grocery chain with added Geek Stuff and is now a Geek Hardware / Software store with snack food… Often open late, on weekends, all storts of times, with mostly what you need. Some folks assert no project can be completed without at least 3 runs to Fry’s. One of which is to return the wrong parts…
$2.40 later I have a “Micro to regular” USB cable. Plug that into the “always on power” port on the hub (having found the manual for it and read that two of the ‘regular’ USB ports were only on when the computer was on (how it knows? Who knows…) while the two ‘high power’ ones were always on.). I plug it in, and plug that into the RPi. A bright red light stares at me. It’s a dinky thing. Head of pin sized. Had I been wearing my reading glasses and inspecting closely, I might even have noticed it. It would have saved some time trying to figure out how to detect “power on”…
But now I have power.
But no output to the “Screen”.
A Few Words on Video
In another of those “maybe I ought to have thought about it more closely and actually checked the ‘gozintas’ and ‘gozoutas'” moments, When first ‘plugging things in’, I realized that the composite video (regular old TV) was only available on the TV in the bedroom. The two computer monitors in the “office” have VGA and DVI. The wired network is only in the office. I don’t have a working wireless ‘dongle’ for the thing (yet).
So I’m sitting on the bed, long composite video cable to the TV, USB keyboard on the bed spread, USB mouse on the box the RPi came in (mouse pad sized ;-), New $2.40 Micro USB cable draped over to the USB Hub that is next to the bed with a power brick plugged into a drop cord to the other end of the bedroom, and a nice long Ethernet cable headed out the door to the “office”.
I’d had to dig up an old Ethernet Hub to splice two wires together as what I had laying around didn’t reach all the way to the other side of the office where the network box lives. But it does now. Oh, and another drop cord laying to the Ethernet hub 1/2 between office and bedroom…
You see, the bedroom TV doesn’t have HDMI either. Nor, it turns out, do either of my LCD monitors.
I’d been looking to upgrade the bedroom TV to HDTV, and it’s largely HDMI based. But as most of my other stuff is ‘composite’, I’d been slow about it.
So now I’ve got a RPi that drives a video, but only a fairly low quality composite 425 lines or so Old TV kind. It does seem “a bit much” to buy a $400 TV to get a monitor for a $25 computer… I found a HDMI to DVI converter for “only” $40, but I’ve not searched a lot. That will be for “another day”.
Why? Because I’m still trying to get an OS onto the thing…
Why a Network with no OS?
Turns out there’s a couple of other little known things hiding in the weeds. (Isn’t there always?…)
First off, not all SD cards work with the RPi.
They have a web page saying what does:
By the time I was getting power to the little guy (can’t really call it a ‘box’ like I usually call a new computer…) and seeing the screen not light up, I’d already spent a few hours downloading, unpacking and putting an OS onto the card.
On ‘power up’, the screen would give a small flicker, but nothing else.
Well, after wandering that list, I didn’t find exactly my card in it, so it might work, or might not. Some very similar named ones work (but some others from the same maker with similar names don’t…) Now I’ve got a ‘card vs software’ question…
Installing the OS to the card per the basic guide has a page that says ~’download, unpack, use Linux ‘dd’ to put image on raw card’ and that’s roughly what I did. Looking over the advanced guide, it spends a lot more time talking about formatting and having two partitions, one of them a FAT one. The download had two images. One for a FAT partition, one for EXT3 and it’s looking like the ‘basic’ install doesn’t deal with that little complication…
But while I’m mentioning things, they have a list of peripherals known to be working:
So if I do end up needing a different bit of kit, I can actually check it before buying 3 and taking 2 back to Fry’s (who have a great returns policy…)
But I’m realizing that I’m likely to end up off in “format this SD card in two different file system types” land before I can make that card go (or find out if it “doesn’t go” and starting to wish I’d known about the ‘buy a preformatted preloaded card’ option (that might not have existed when I was trying to buy a card, any card, at all… as they were just shipping…)
So 3 lessons learned:
1) Make sure you get the right power / “micro” USB cable when you order one.
2) Order at least one pre-loaded SD card. Even if you will be ‘rolling your own’ version later. The ability to have a known working sample to inspect and use in testing the RPi card and peripherals will be worth it.
3) Check that you actually have something the video out drives. And that it is in the same room as the network.
Back At That OS
Somewhere along the way I was exploring the limits of Compatibility Hell and realizing that one of my USB / SD adapters worked with the laptop, but not with the Linux box, while learning that one of the Linux Live CDs would mount an SD card when the others would not, while learning that the OTHER SD card adapter had a wide body and could not be plugged in where HP put the USB ports on that desktop machine, while learning that…
A few hours later, I had a USB / SD card adapter plugged in, with a Linux release that would see and mount it, and with the SD card in it, and with the downloaded OS on media to then “dd” the image on the SD card. That card then went back to the RPi and enters the story up above (where I was trying to figure out if it was power, video, OS or what, that was causing ‘no joy’…)
At the end of that part of the story, I’d pretty much figured it was the SD card formatting, an SD card incompatibility, or maybe the RPi card just didn’t work. That last one was unlikely as I’d bought two and both behaved the same.
It was at that time I found another option on one of those pages. It’s a boot loader that lets you have multiple OS versions on the SD card and downloads them over the internet. (So now you know why I needed that network connection…)
OK, format the SD card back to FAT32. Download more software. Unpack /unzip it and put it on the card. Card into the RPi. Power and peripherals in and…
I get video on the TV! It’s working!
You also get a nice bright micro sized GREEN LED that blinks when the network is active.
So at this point, I’ve got a working card, with power, and with networking. Time to download and install the OS (again…)
Well, one of the choices is an Alpha version of Puppy. Small. It downloaded fine. As did a very small ‘server appliance’ OS version. But Debian Wheezy I’ve tried twice now. It’s 451 MB. I’ve gotten to 45% done once. This last time to 62%. Then the transfer hangs. No idea why yet. Perhaps my SD Card is not the best for RPi. Perhaps my ‘improvised’ network with a 20 year old 10 Mbit hub in the middle is causing ‘issues’. Perhaps the download site is swamped and something times out
What I know is that I’m going to be test-booting a Puppy Alpha rather than the Wheezy preferred just due to what downloads to completion. Then, perhaps tomorrow or late late tonight, I’ll try the ‘preferred’ OS again.
The software to do the ‘net download and go’ that does all the SD card formatting for you is here:
Perhaps it has issues? Who knows…
For now, I think most likely is just that the SanDisk Ultra 1 SDHC 30 mb/s 32 GB card I’ve got has a subtle compatibility issue. I may just try it all over again with Yet Another Card (IFF I can find one in the camera bag that’s empty ;-)
Though after I see if Puppy Linux boots and runs. That would tend to say “not the card”. And, I was going to add, “likely not going to happen until tomorrow”, but the clock informs me it is already tomorrow… So “later today”… A lot later.
The “berryboot” code seems pretty competent, if limited in aspirations. (You want that in a boot loader…) So far, I’m liking it. I’m still expecting that at some point I’ll do a ‘long hand roll your own’ build of a formatted SD card system from bare hardware on up, just because for a ‘more secure computing appliance’ that’s one of the things you do. Less chance something gets slipped in somewhere.
But not for several days. First I need to just get the thing running and assess how usable it really is.
Well, that, and go shopping for a nice HDTV with HDMI inputs… Either that, or accept staring at an old low res TV…
Somehow those Live CD Linux appliances are looking more “workable”… But it always looks darkest just before things completely fail… I mean, before you finally figure it out. ;-)
I’ll be back with an “update” as soon as something interesting happens. (Puppy works, or doesn’t, or Wheezy fully downloads, or I try a different SD card or…)
For now, time to move back over to the RPi and play hacker some more.