Saturday, 27 October 2012

Pc won't turn off (?)

The title of this post is the Google search that wasted many hours of my life.
You see, I had built a new pc and everything was sweet except when I shutdown the pc, Windows would shutdown but the hardware would stay on. It just would not turn off any way other than forcefully.
I tried checking power connections, power button connections, booting from a Linux DVD, replacing the power supply and much more. Nothing worked.
I was amazed at how many people had the issue but none had a fix that worked for me until...
I flashed the BIOS and then flushed the BIOS memory. Huzza! That worked a treat.
I hope this helps someone.

Wednesday, 10 October 2012

How to move your installed Linux to another drive and keep it working.

When I was trialling Linux, I installed it onto a drive (partition) that became too small (as I was installing more and more things). I had my original and much larger Windows 7 drive gathering dust so I thought to get rid of that and move Linux there. Here's how I moved my Linux without having to re-install anything.
That's not an easy task under Windows and is fraught with danger, however it's easy under Linux. In fact I can keep both copies and be able to boot either, which is a great failsafe, should one not boot.

Copying 
  • Mount both your source and destination partitions. 
  • Run this command from a terminal: 
      $ sudo cp -afv /path/to/source/* /path/to/destination 
      Don’t forget the asterisk after the source path.
  • After the command finishes copying, shut down, remove the source drive, and boot the live CD again. 

Configuration 
  • Mount your destination drive (or partition). 
  • Run the command “gksu gedit” (or use nano or vi). 
  • Edit the file /etc/fstab. Change the UUID or device entry with the mount point / (the root partition) to your new drive. 
  • You can find your new drive’s (or partition’s) UUID with this command:
      $ ls -l /dev/disk/by-uuid/ 
  • Edit the file /boot/grub/menu.lst. Change the UUID of the appropriate entries at the bottom of the file to the new one. 

Install Grub 
  • Run sudo grub. 
  • At the Grub prompt, type: 
      find /boot/grub/menu.lst 
      This will tell you what your new drive and partition’s number is. 
      (Something like hd(0,0)) 
  • Type: 
      root hd(0,0) 

      but replace "hd(0,0)" with your partition’s number from above.
  • Type: setup hd(0) but replace "hd(0)" with your drive's number from above. (Omit the comma and the number after it). 

That’s it! You should now have a bootable working copy of your source drive on your destination drive! You can use this to move to a different drive, partition, or filesystem.

Monday, 8 October 2012

Jellybean and the vanishing widgets.

I recently installed an experimental version of Android Jellybean. One "feature" I uncovered is that widgets are installed to the SD card and not internal storage. That is a bad thing and tends to make them vanish from the phone's desktop. The solution is move them using a tool such as Titanium Backup.
Problem solved. :-)

Android Jellybean for me

I recently upgraded my HTC One X so that I had root access. This gives me the ability for example, to block ads and remove manufacturer-installed programs. In doing so I broke the over the air (OTA) updates from HTC. This was a bummer because over time my phone's Wi-Fi became unusable.
A little bit of Google-Fu found that HTC had released an update to fix this issue but as I couldn't receive updates, I had to replace my HTC android with a custom "Rom".
I went with the well-respected Cyanogen Rom, version 10 using Android Jellybean. Jellybean is the newest Android.
As it turned out, it wasn't as simple as I had experienced before. I installed the Rom and the "Google apps" add-on without issue, however rebooting the phone showed it stuck it in a perpetual boot loop.
I found instructions that said to extract the file boot.img from the Rom and install that via the developers ADB kit from a pc.
For reasons I couldn't determine, my Linux pc would not properly see the phone via USB, so I had to resort to using a Windows pc to apply the file.
Once done, the phone booted fine.
I have say, I'm impressed especially as I installed a "nightly" version. That's a version that's freshly compiled and not tested. Talk about living on the edge, haha.
I'm loving my Jellybean though. It's snappy to the touch and noticeably faster then earlier Androids. The other great thing is that my Wi-Fi is now back to normal, really fast and reliable. Yippee!
I'm also experiencing occasional crashes of the phone. I'm yet to determine the cause of this but given I'm using an experimental Rom, I can't complain. I'll just update the Rom when a stable version is released.