Thursday, 31 March 2011

Dual Booting Blues?

It's been a while since I wrote anything. Not because I didn't have anything to say, just I didn't have the time to really write anything.

However, today I decided I would write THIS down. It's information that was gleaned from different sources and finally helped work the issue out. None of the places I read had the FULL steps to fix the issue. Hopefully this will help a poor soul.

Yesterday, someone installed Ubuntu on their system when I wasn't locally around to help out. They've installed Ubuntu on their home PC and on another desktop without really encountering any issues. That wasn't the case yesterday.

Somehow, the installation had frozen and they had therefore canceled it in mid-stride. They then reran the installer but manually selected the partition where they wanted to install (the one previously created/resized during the first install attempt.) Luckily they didn't wipe the Windows partition which they still needed, however booting into the machine was now not possible.

Investigating the issue I discovered that os-prober didn't see the Windows files it needed to boot. I went ahead and updated the system in case there were any fixes included in one of the updates. However, it seemed that the boot information for Windows was gone.

I was going to run something to recover the boot manager, but I wanted to be there to be able to troubleshoot things.

When I arrived at the office, I found out that they had taken things into their own hands and had used a Windows 7 install disk to "fix the boot manager" which in turn broke grub2 and now he couldn't boot into Windows 7 OR Ubuntu.

He could boot into the USB stick with Ubuntu, so quickly I did the following.

sudo fdisk -l
sudo mount /dev/sda5 /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /dev/pts /mnt/dev/pts
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo chroot /mnt
update-grub
grub-install /dev/sda
grub-install --recheck /dev/sda
sudo umount /mnt/dev/pts
sudo umount /mnt/dev
sudo umount /mnt/proc
sudo umount /mnt/sys
sudo umount /mnt
sudo reboot

This fixed the grub bootloader and we were now able to boot into Linux once more. However, During the update-grub, the Windows partition wasn't added to the loader. (This information came from Ubuntu's Help site.

Once in Ubuntu, I opened a terminal and did:

sudo fdisk -l
sudo mount -t ntfs /dev/sda1 /mnt
ls /mnt/boot
os-prober
sudo update-grub
sudo umount /mnt
sudo reboot

Ok, in reality I initially mounted the Windows partition and checked that the files which were missing (BCD, BCD.log, etc) were there. Then I unmounted the Windows partition, ran os-prober which didn't detect Windows. So I then mounted the partition, re-ran os-prober and it DID find the Windows installation. At that point I ran update-grub which added the Windows information to the grub.cfg file and voila!

The things I had to "put together" were:

1. os-prober seems to need the Windows partition mounted when you run it manually. Not sure why it doesn't seem to need it when Ubuntu runs updates. Maybe it takes care of that itself.
2. The Windows 7 (and Vista) Boot Manager needs the files in the C:\boot\ directory to boot and os-prober needs those files to detect Windows 7/Vista.

I hope these steps help people out.

-P

Friday, 1 October 2010

gconf-sanity-check-2 exited with error status 256

Today I discovered I knew something was wrong before it was wrong. That doesn't make much sense, but let me explain.

One day on my laptop I had a problem with my /tmp directory where the permissions had changed and therefore my user was not able to install applications, etc, etc. I didn't know what changed it, but since I didn't reboot, I just changed the permissions of /tmp back to 1777. Everything happy.

Today, a colleague of mine installed Ubuntu on his desktop. He did the usually good thing of installing all the updates. However after the reboot he got the error listed above and couldn't log into his system. The rather odd error of /usr/lib/gconf2-4/gconf-sanity-check-2 exited with error status 256 didn't really give much as to why this was happening.

We used ctrl-alt-f1 to go into a tty and look around. We tried a few things but nothing seemed to fix it. I did a quick Google search and discovered that others had had this issue even with versions prior to 10.04. The solution?
sudo chmod 1777 /tmp

And guess what? That fixed it. What exactly changed the permissions on /tmp we're not sure, but at least we were able to fix it.

-P

Cancel or Cancel?

I'm not a design guru by any means, but something caught my eye today.

I was on a web screen that gave me the options to click OK or Cancel. Those were the only two choices, which is fine because I was looking at a page that was just displaying my preferences and if I did or didn't make any changes, those were my options. However, when I click "Cancel" I got a popup that said "Do you really want to cancel?" and my options were once again "Ok" and "Cancel."

So, lets recap. Options: "Ok" and "Cancel" - I press "Cancel". Popup: "Ok" and "Cancel".

Now do you see the problem? I pressed "Cancel" the first time, but I have to press "OK" the second time. Why not "Cancel" and "Cancel"?

Granted the question is "Are you sure you want to cancel?" but surely if I didn't make any change there shouldn't be any reason why I'm asked if I am sure I want to cancel.

Note that pressing "OK" doesn't prompt me if I'm sure I want to "OK" the action. It just submits the form and takes me to a completely different page. In other words, I don't get to continue editing my preferences.

Oh well. I guess whoever designed that workflow didn't think anyone would want to cancel their Ok.

-P

Monday, 27 September 2010

Hair washing robots

As you know, Japan develops a lot of robots. They do so because the country has a rapidly ageing population and the idea is to have robots do chores and help out elderly, etc with as many tasks as possible.

So now, they've come up with a hair washing robot.

Meanwhile I'm still trying to put together my washing machine.

-P

Wednesday, 22 September 2010

Back on Linux! And how to get Citrix ICA Client on Linux 64bit...

I was finally able to switch my laptop to Linux. Windows 7 was too problematic and I really didn't like it. However I must say that it was better than Vista. I still had some of the issues with W7 as I did with Vista, but it was at least 64 bit and more stable.

I'm still getting everything setup on my system since so much depends on Windows specific processes, software and one of these is that being able to get into our Windows Terminal Server was starting to become a little problem. I needed to install the ICA Client on my laptop but I installed 64 bit Ubuntu. (Why use a 32 bit OS now-a-days?)

Well, I found that Citrix doesn't have a 64 bit client and it turns out that getting the 32 bit client running on here wasn't hard to do, just hard to find the solution. Amazingly, the information is actually on the Ubuntu website, but whenever I searched, nothing linked to it.

I'm posting this information to make it easier for people to find the solution.

The link to the Ubuntu instructions is here. And basically what I did was:

I downloaded the 32 bit Citrix tarball. I ran the installer:

sudo ./setupwtc

This installed the software in /usr/lib/ICAClient. You are then suppose to run from that directory a program called wtcmgr.

However it failed because it was missing libmotif3 which if you apt-get install, you get the 64 bit libraries. You therefore need to install the 32 bit version by download the 32 bit version and installing it manually.

I downloaded the package from Ubuntu's site and then I extracted the files and copied them over to the 32 bit lib directory.

sudo dpkg -x libmotif3_2.2.3-4_i386.deb /tmp
cd /tmp
sudo mv usr/lib/lib* /usr/lib32/.
sudo ln -s /usr/lib32/libXm.so.3.0.2 /usr/lib32/libXm.so.4

Then I went back into the ICA Client directory and ran the file.

Tada! Things work.

I love Linux!

-P

Update April 06 2012: I just re-installed on my machine so I could totally remove the Window 7 install. When I came to do the Citrix installation bit I was happy to discover that version 12.0 of the ICA client comes in a 64 bit deb package. Though I still had to do a thing or two. I had to manually install nspluginwrapper which installed a bunch of stuff and then the ICA client installed ok. It was great though because it worked as soon as I completed that. I didn't even have to restart Firefox (however I had copied my profile over from my backup so that may have had some info already setup.)

-P

Wednesday, 8 September 2010

Excited to see my stuff is still around...

When I started this blog, I didn't think that most of the stuff I would write about would be of use to anyone.

However, it seems I was wrong. I've found that several of the things that I've put together in these measly pages are of use!

I also checked out some of the graphics I've made (not great, but useful ones) on OpenClipArt.org and found that they're of use too!

I created some server racks in a previous job because I couldn't find any that worked in inscape without any modification. I also wanted them to be easy to use and allow me to add servers and hardware that would fit neatly. I made each U 12 pixels high and made them available. I made them in June 09 and as of today they've been downloaded over 3500 times!

Cool! Now, what else can I make and have you thought of contributing?

-P

Friday, 3 September 2010

Another great feature from Google GMAIL team...

Google enabled "Email Priority" on my accounts and I got to say, it's AWESOME!

I wish were using Google Apps where I'm working now so that this feature is available. Basically by learning which emails you consider important (because you reply to those people, you read most of their emails, etc) GMail now will mark emails from those sources as "important" - meaning you see those at the top of your inbox. Below you get starred emails and below that "the rest" which includes the ones that are priority.

Love the new feature!

-P