Apparently the new Unity based desktop environment introduced in Ubuntu 12.04 has some stability issues to sort out. Once in a while, the GUI becomes non-responsive. Mouse pointer is alive, so is the keyboard CAPS lock kind of keys that give LED indications. Just that nothing happens on the UI. It's frozen. So, what do you do? Kind of obvious for some, but still...
Login to a text-only terminal by pressing Ctrl+Alt+F1 (or F2..F6). This is assuming the keyboard is still responding.
Run top at command prompt. You will see all your application programs running happily in the status shown. You need to kill compiz. That's the name of the program for Unity shell.
Press 'k'. Enter PID for compiz. Press Enter. And then Enter again for the second time to accept the default kill signal [15] to send to compiz. That's it! You can logoff from terminal.
Get back to X-Windows GUI by pressing Ctrl+Alt+F7. You shall see the GUI applications again. In a few seconds, the system will revive compiz and you shall see the Unity UI consisting of the app launch bar, the Dash, etc.
I am making efforts to save time for others, and to show how not to name symbols, how not to miss information required for kernel config help, and broken sanity checks.
Many days after I started using custom built kernel with Ubuntu 12.04 LTS, I noticed that the swap partition was missing. During a busy session involving Google Chrome, the biggest memory hog of all apps I use, VirtualBox, LibreOffice, etc., the system was thrashing non-stop. I had to power off the PC to gain any control! The swap was present with the stock kernel. So, the obvious candidate was tried: update-initramfs. No change.
Inspection of fstab config revealed that cryptswap is being used now! So far, I did not have any of the related settings in my custom config. Worse, there was no hint while wading through the config to let me know of this change and the needful config setting. That is the real culprit!
$ cat /etc/fstab... # swap was on /dev/sdaX during installation #UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx none swap sw 0 0 /dev/mapper/cryptswap1 none swap sw 0 0
$ cat /etc/crypttab # cryptswap1 /dev/sdaX /dev/urandom swap,cipher=aes-cbc-xxx... $ file /dev/mapper/cryptswap1 /dev/mapper/cryptswap1: symbolic link to `../dm-0'
These config flags are hidden under apparently unrelated sub-part "Multiple device driver support (RAID and LVM)" under Drivers config:
CONFIG_DM_CRYPT=m
CONFIG_MD=y
These flags cannot be searched under xconfig. You will have to enable "Device mapper support" and only then they appear in search. Due to bad inter-dependent code, the compilation fails on usage of debug output function/ macros; so you will have to also enable "RAID support". For brevity I have not listed config settings that get enabled due to that.
Encrypted file system config is (still!?) under experimental. I learned that earlier, similarly the hard way. It will be nice if these changes are available on the Ubuntu wiki that lists instructions for building custom kernels using Ubuntu released kernel code.
And I say this because I still have higher regards and consequent expectations about products coming from Ubuntu community.
The network based upgrade itself went smooth. Seems like things are messed up with the new GRUB. When I rebooted the PC to boot Windows XP (can we live without one?), GRUB did show Windows as an option to boot. Earlier during the upgrade I had noticed this entry was added as the upgrade process prompted me whether to replace existing copy of
/boot/grub/grub.cfg
Thankfully at the point I had saved a copy of the one being replaced! So, when I selected to boot Windows, all I was shown was a blank screen with a text mode cursor blinking at me infinitely.
Thanks to the active community out there, I realized I'm not alone :-)
And finally, the official bug report... (Shame! I expected a better job after all that Microsoft product bashing we have witnessed for so many years).
People say this issue slipped between release candidate and actual production release as they never faced issue during beta testing. That highlights importance of freezing development/ new check-ins before an important milestone.
During this exploration, I discovered some useful tools:
TestDisk is a powerful free data recovery software, primarily
designed to help recover lost partitions and/or make non-booting
disks bootable again when these symptoms are caused by faulty
software, certain types of viruses or human error (such as
accidentally deleting a Partition Table).
This tool really did the job for me! And I learned that there exists a backup copy of MBR on the disk. I'm not newbie to OS internals and its programming; but never had chance to deal with gory details of boot record, partition tables, disk geometry, and the likes (yikes! :-) )