Friday, August 12, 2016

Ubuntu 16.04 on a Dell R230

I installed Ubuntu 16.04.1 server onto a fresh Dell PowerEdge R230 with a PERC H710 adapter and two mirrored SAS drives. The install went smoothly but the machine wouldn't boot when it completed. I'd see the error:

Gave up waiting for root device. Common problems:
 - Boot args (cat /proc/cmdline)
   - Check rootdelay= (did the system wait long enough?)
   - Check root= (did the system wait for the right device?)
 - Missing modules (cat /proc/modules; ls /dev)
ALERT! /dev/disk/

by-uuid/d55ef64e-2d0c-4a51-9c6f-20999ee0276e does not exist. Dropping to a shell!

I tried cranking up the rootdelay at the grub edit screen without luck. I finally checked the BIOS settings and noticed that it was set to boot as BIOS compatible. Changing it to UEFI and reinstalling fixed the problem. It now boots like one would expect.

Sunday, December 7, 2014

iPhone 4S iFixit repair

My son has an iPhone 4s whose power button failed. iFixit has a repair guide for it and sells replacement parts. A million little screws and many hours later:


and I've got it apart:


It was pretty tough going and iFixit comments like "This repair will destroy your soul. I would not recommend even attempting it without even more specialized tools (eye loupe, headlamp, preternatural patience) as it is extraordinarily easy to ruin your phone with one quick misstep. I've thrown in the towel after weeks of attempting the job." are much more understandable now.

The reassembly starts out challenging but got easy once the power button, earpiece and logic board were back in. Firing it up revealed that half of the digitizer no longer worked. The left hand of the display sensed my finger but the right half was dead. I'm guessing the the cable was damaged as it was in the way of one of the power button screws.

I have a lot more respect for how the iPhone is assembled but don't think it's weekend repair material.

Tuesday, July 15, 2014

Converting VirtualBox VMs to Parallels

I sometimes get VM "appliances" in VirtualBox format. I prefer Parallels and thankfully the conversion isn't difficult.

To convert the VirtualBox .vdi file to an .hdd file:
  • Start Parallels as it's services will be needed
  • From the command line run: 
    • /Applications/Parallels\ Desktop.app/Contents/MacOS/prl_convert .vdi --allow-no-os
This created a "naked" disk that doesn't have the wrapper virtual machine definition that Parallels needs. To make the wrapper, in Parallels:
  • Add a new virtual machine
  • Install from a DVD/image file
  • Continue without a source (iso)
  • Select the OS for the wrapper (Ubuntu)
  • Name it and select customize settings before installation
Even though you're only part way through the definition of the VM, the disk files are already there. Find the Parallels .pvm file in the Finder and show contents. 
  • Move the .hdd you created from the convert step into it
  • Choose hardware—>Hard Disk 1
  • Change the source to the converted .hdd
  • Set other options to suit
Boot your new VM and install Parallels tools.

Monday, March 25, 2013

Chrome browser crash w/Jelly Bean

I updated to Jelly Bean (4.1.2) the other day and it appeared to go well until I tried to use the Chrome browser. It would flash a blank screen and silently crash. I had installed it under ICS but now it is a system app and can't be uninstalled.

The solution, thanks to Ting support, was to go to app settings --> Chrome and uninstall updates. Chrome then worked. It continued working after I went to the Play Store and reinstalled the updates.

Sunday, March 24, 2013

iOS 1, Android 0

I have both iOS and Android devices and both have their strengths. I have a new LG Android phone that didn't come with Jelly Bean and have been waiting for it. I finally got the over-the-air update notification that Jelly Bean (4.1.2) was ready for download on 3/23/13. A long time after it's October 2012 release.

When Apple release iOS it releases directly to compatible devices. Boom -- done. When Android releases, the phone vendors have to work with it (if they even decide to), then the carriers have to approve it, then it's staged to be released to users. Apple got this one right.

Tuesday, January 22, 2013

Raspberry Pi


I was pleasantly surprised to find out that Raspberry Pi boards (http://www.raspberrypi.org/faqs) are no longer on a forever backlog. I got mine from element 14/newark.

One surprise was that the first SD card I loaded with Linux and tried to boot from failed with:


mmc0: controller never released inhibit bit(s)
mmc0: timeout waiting for hardware interrupt

Checked out an SD card compatibility page: http://elinux.org/RPi_SD_cards and bought one that worked.

Saturday, July 9, 2011

UCLA Embedded Course Overview

UCLA extension offers a 12 week evening course (Engineering x457.55) on programming embedded processors. Students use a Texas Instruments ARM evaluation kit which includes the processor mounted on an evaluation board with a Windows IDE to program the ARM chip.



The board has a 32 bit ARM chip running at up to 50 MHz. It has 64KB of flash, 8 KB of SRAM, hardware timers, digital and analog I/O. The board draws its power from the USB interface which also serves to program, debug and support a separate RS-232 style interface.

The course starts with writing a hardware abstraction layer (HAL) in C to set up hardware timers and I/O for the button and potentiometer. Since there isn't an operating system, the programmer must configure the board according to his needs including setting the clock speed of the CPU itself. The C main() method is called from a small bit of assembler that sets up the stack, heap and interrupt vectors.

Bugs frequently manifest with a hardware interrupt and no stack trace. One learns how to use the JTAG debugger to not only perform standard software debugging but to also set and query arbitrary memory addresses. This includes setting up or querying hardware.

The course then covers common design patterns for handling multiple I/O events. The common pattern we used was to code up an event loop where the hardware interrupts were mapped into events. To send a debugging printf() required that we set up the hardware for baud rate, character size and parity; load the first character into the outgoing FIFO; service the transmission complete interrupt and load the next character.

The course was wrapped up by replacing our event loop with a small, real time operating system (RTOS). We retained the assembly initialization, our HAL setup and interrupt routines but now set up semaphores, queues and tasks (threads) to partition the work. The RTOS is started as the last line of main() as opposed to having an operating system load the application.

This was an excellent introduction to the very different world of embedded systems. If you've wanted to play with hardware or embedded software, this is a great way to start.