Grub not loading after upgrade from Vista to Windows 7

 On my work laptop, I dual-boot Windows Vista Enterprise (in case it's necessary at a customer site) and Gentoo (if I get to do things my way ;-) ). I recently decided to upgrade Vista to Windows 7, which worked just fine (after installing a meeljon updates - it had been a while).

As expected, Windows 7 obliterated my MBR. Bye-bye GRUB, Gentoo LiveCD to the rescue!

In the livecd I mounted my / (on /dev/sda3), /proc and /dev to /mnt/gentoo and chrooted in:

# mount /dev/sda3 /mnt/gentoo

# mount -t proc none /mnt/gentoo/proc

# mount -o bind /dev /mnt/gentoo/dev

# chroot /mnt/gentoo /bin/bash

Now run grub, let it re-write itself to the MBR and everything's happyhappy-joyjoy again, right?

# grub

grub> root (hd0,2)

grub> setup (hd0)

grub> quit

# reboot

Right after POST, I get greeted by a blinking cursor, and that's it. No GRUB, no message, nothing. Just that blinking cursor, mocking me. Back to the livecd, and chrooting into my gentoo installation once again. I used to use grub-install, so I decided to try that again (important: after chrooting - it's not necessary but the command is different!)

# grub-install /dev/sda

/dev/sda does not have any corresponding BIOS drive

Apparently GRUB doesn't have a proper device map. Time to refresh it:

# grub-install --recheck /dev/sda

/dev/root: not found or not a block device

This one is new ... df -h reveals that / is mounted as /dev/root, instead of the expected /dev/sda3 and that /dev/root does not exist (of course - that bind command I used right before chrooting? /dev/root didn't exist in the livecd environment). A symlink ought to fix this:

# ln -s /dev/sda3 /dev/root

# grub-install /dev/sda

One reboot later my grub is back where it's always been, offering me the choice between Gentoo and Windows 7.

 Permalink

TweetDeck on Gentoo with Awesome

After seeing it in action I wanted to give TweetDeck a try so, optimist that I am, I tried their installer. It didn't work, complaining about a corrupt .air file. So I figured I'd install the AIR framework first and then see where that would get me. All the way to this error message : 

Adobe AIR could not be installed because this is not a supported Linux distribution. Only RPM- and Debian-based Linux distributions are supported.

Gentoo? Source-based distros? Get lost! Fortunately, flashman already ran into the problem and figured out a way to get AIR applications running on his distro and documented it.

One more problem : I don't use Gnome. I don't use KDE. I'm an Awesome fan. AIR doesn't like it when people don't use Gnome or KDE on linux. It requires gnome-keyring or KWallet and it gets confused rather easily. According to the Adobe troubleshooting page, you can set it straight by exporting a variable.

For gnome-keyring:

$ export GNOME_DESKTOP_SESSION_ID=1

For KWallet:

$ export KDE_FULL_SESSION=1

If you've got a KDE4 based KWallet, you also want to do:

$ export KDE_SESSION_VERSION=4

Ka-boom! TweetDeck on Awesome on Gentoo. And I can start it with Winkey-F10 as well, like so : 

awful.key({ modkey }, "F10",
    function ()
        awful.util.spawn_with_shell("export GNOME_DESKTOP_SESSION_ID=1; 
        /opt/air-sdk/bin/adl -nodebug \
        /opt/air-apps/TweetDeck/META-INF/AIR/application.xml \
        /opt/air-apps/TweetDeck")
    end),
 Permalink

Mojo SDK getting up and running

Palm finally released their WebOS SDK to the public (to be found on http://developer.palm.com ).  Here's what I did to get things up and running on my Gentoo laptop:

  • Download the .deb file
  • Convert the .deb file to a tarball ( deb2targz )
  • Extract the thing to /
  • Try `palm-emulator` and swear some because "Palm Emulator requires that VirtualBox 2.2.0 or greater is installed."  2.2.4 > 2.2.0, right?
  • Some decompiling of the jar files reveals that on Linux, the virtualbox classes simply search for /usr/bin/VBoxManage.  If it's installed somewhere else, tough luck, you don't have virtualbox.  A symlink fixes this.
    Note: on Windows, `reg query HKLM\SOFTWARE\Sun\xVM VirtualBox /v InstallDir` is used to determine the installation directory.  On my Vista x64 box I can execute this query in a DOS prompt and get the correct result, even though the emulator complains.
  • Ignore the novacom warning for now and presto, one booting WebOS VBox machine.

The novacom warning : 

In order to install or debug applications in the Palm Emulator, the novacom 
service must be running on your desktop.

Please verify that you have the latest Palm SDK installed correctly.
`sudo /opt/Palm/novacom/novacomd` fixes this.  There's a /etc/event.d/palm-novacomd script which makes the novacom service start on rulevels 2, 3, 4 and 5.  This is probably a very debian-ish way to do things, but won't quite work for me ;-)
Anyway, I have a running virtual machine and I should be able to install and debug applications from Eclipse.  I'm happy.  For now :-)
 Permalink

Gentoo: com_err and ss blocking e2fsprogs

After running into this on three computers, I figured I'd mention it here as well.  It's a rather old issue by now, but at a certain point com_err and ss were moved to e2fsprogs on Gentoo.  I found my workaround here : www.odi.ch/weblog/posting.php

Make sure not to unmerge com_err and ss before doing emerge -fuD world first!

Also, I had my "emerge" aliased to "sudo emerge".  That won't work, because sudo also relies on com_err, which is unmerged at a certain point.  Make sure you're logged in as root for this procedure.

 Permalink
1-4/4