29 July 2014

588. ata6: SRST failed (errno=-16) AND disk-by-uuid does not exist

The problem:
I've been having boot issues with one of my nodes. Everything is fine up to and past GRUB:

Then this happens:
[21.405411] ata6: SRST failed (errno=-16)

And typically I get dumped in a shell:
ALERT! /dev/disk/by-uuid/xxxx does not exist

Towards the solution:
blkid shows both disks:

Either way, turns out the way to get the system to boot is pretty simple. Type exit and hit enter.

exit leads to successful boot
Looking at dmesg this is what happened:
[ 1.998149] usb 2-1: Product: USB Optical Mouse [ 2.005374] input: USB Optical Mouse as /devices/pci0000:00/0000:00:12.1/usb2/2-1/2-1:1.0/input/input1 [ 2.005452] hid-generic 0003:0461:4D81.0002: input,hidraw1: USB HID v1.11 Mouse [USB Optical Mouse] on usb-0000:00:12.1-1/input0 [ 6.476845] ata6: link is slow to respond, please be patient (ready=0) [ 11.465026] ata6: device not ready (errno=-16), forcing hardreset [ 16.665379] ata6: link is slow to respond, please be patient (ready=0) [ 21.485411] ata6: SRST failed (errno=-16) [ 26.685767] ata6: link is slow to respond, please be patient (ready=0) [ 31.505806] ata6: SRST failed (errno=-16) [ 31.894576] uhci_hcd: USB Universal Host Controller Interface driver [ 36.706152] ata6: link is slow to respond, please be patient (ready=0) [ 66.579156] ata6: SRST failed (errno=-16) [ 71.611367] ata6: SRST failed (errno=-16) [ 71.623705] ata6: reset failed, giving up [ 105.133562] PM: Starting manual resume from disk [ 105.133565] PM: Hibernation image partition 8:2 present [ 105.133567] PM: Looking for hibernation image. [ 105.133775] PM: Image not found (code -22) [ 105.133777] PM: Hibernation image not present or could not be loaded. [ 105.189165] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null) [ 107.565728] udevd[725]: starting version 175

Fixing it:
Increase the rootdelay so that the harddrive(s) have time to boot up. I think in my case the issue is that I found an ancient IDE drive which may be slow to spin up, and maybe even failing (I use it for /scratch).

Either way, edit /etc/default/grub and add rootdelay=90 (for example) to the end of GRUB_CMDLINE_LINUX_DEFAULT, e.g.
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash vga=0x0318 text rootdelay=90"
Then do
sudo update-grub

and hopefully the next time your system will boot, although slowly.

28 July 2014

587. Very Briefly: Getting pictures off of a corrupted Compact Flash card using testdisk

Nothing terribly complicated here. My CFII card (above, at /dev/sdb1)  is about a decade old and occasionally becomes corrupted. To recover the photos I use photorec which is part of testdisk:

sudo apt-get install testdisk
sudo photorec

Select the correct device, in this case /dev/sdb


Pick the correct file system, typically FAT16 or 32
Also select a place to store the recovered photos. Then recover:

And you're done.

586.Very Briefly: Gnuradio, RTL-SDR, GQRX and an R280T device on debian jessie

* I did this on debian jessie which at the time has gnuradio v 3.7.3-9+b1 and rtl-sdr v 0.5.3-3

* I'm having a lot of trouble getting gqrx working on debian wheezy even with backports. Whereas the backports versions of gnuradio, rtl-sdr and gqrx-sdr install just fine, when running gqrx I get the following error:
gqrx: symbol lookup error: /usr/lib/x86_64-linux-gnu/libQtNetwork.so.4: undefined symbol: _ZN16QIODevicePrivate13putCharHelperEc
* gqrx won't work on debian wheezy systems with 2 Gb of memory for some reason. I get the same error as is shown in this post: https://groups.google.com/forum/#!topic/gqrx/20F8RMWkNbU

The post:
I recently bought a DVB USB dongle based on RTL2832 and R280T: http://www.ebay.com.au/itm/221450623699?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649. AU$11for a TV card which actually works flawlessly under linux really isn't bad!

As I already have a mythtv setup using leadtek DTV 1000S I was more interested in exploring the R820T dongle as a software defined radio (SDR).

 So, after glancing at  http://www.thepowerbase.com/2012/06/getting-started-with-rtl-sdr/2/ I did the following

sudo apt-get install rtl-sdr gnuradio gnuradio-dev libgnuradio-osmosdr0.1.1.4 git libboost-dev liblog4cpp5-dev libboost-system-dev libboost-program-options-dev checkinstall
mkdir ~/tmp
cd ~/tmp
git clone https://github.com/csete/gqrx.git gqrx.git
cd gqrx.git/
mkdir build
cd build
qmake ../
sudo checkinstall --install=no
0 - Maintainer: [ root@niobium ] 1 - Summary: [ gqrx ] 2 - Name: [ gqrx ] 3 - Version: [ 20140726 ] 4 - Release: [ 1 ] 5 - License: [ GPL ] 6 - Group: [ checkinstall ] 7 - Architecture: [ amd64 ] 8 - Source location: [ build ] 9 - Alternate source location: [ ] 10 - Requires: [ ] 11 - Provides: [ build ] 12 - Conflicts: [ ] 13 - Replaces: [ ]
sudo dpkg -i gqrx_20140726-1_amd64.deb

Starting gqrx and using it is easy:
So far I haven't managed to get anything other than regular commercial radio signals (I've only explored the FM band).