Tuesday, 26 January 2016

It was the best of Linux, the worst of Linux

Taking an update and upgrade on the Raspberry PI, I had a problem with unmet dependencies for raspberrypi-bootloader.

I ran the suggest fix of apt-get install -f and thought nothing more of it.

Unfortunately as it turns out there were problems....

I shutdown as always ( sudo shutdown now ) but when I tried to restart a couple of days later nothing.

I didn't get any response at all, connecting to the TV via HDMI yielded a blank screen but at least when I plugged the SD card into my laptop I did see all the files, so at least the card hadn't died.

This gave me an opportunity to copy over the files and re-image the card from the ISO that I still had from the original install.

I still use Win32DiskImage to setup the SD card, but as Windows only sees the boot partition I couldn't format it. The DiskManagement tool allowed me to format both, but not to remove the partitions.

Fortunately, there's a command line tool DISKPART that has much more control
  1. Open an Administrator command prompt
  2. Run diskpart to open the tool
  3. Enter list disk to see which disk is the SD card
  4. Important point here, make sure you choose the right disk or you could wipe your OS
  5. If your SD is disk is #1 enter select disk 1
  6. Enter clean to format and clear all the partitions. 
I then copied my image back onto the SD card, plugged it back into the PI and I was back up and running. The final steps were to setup WiFi, run the update/upgrade and copy back my files. All in just over an hour.

So the worst of Linux; I've never had a machine be rendered unusable from an update, on any flavours of Windows

But the best of Linux; It took me just over an hour to restore the OS, then take the updates and have all my applications and development in precisely the state it was when things went wrong. Without multiple reboots.

No comments:

Post a Comment