Skip to main content

Fedora 10 (Cambridge) to Fedora 12 (Constantine) with PreUpgrade

Ok, here goes my first blog post ever...

Last Friday, I decided to upgrade from Fedora 10 to 12 using the PreUpgrade tool. The download and the installation process went well until the time came to boot into the new system. I suspected something was wrong when I realized the fc12 kernel line was missing from the Grub menu, and I was "relieved" to see I was right the whole time when I was presented with:

Give root password for maintenance (or type Control-D to continue):

I could not even type. Every time I hit a key, i was prompted with the same line... Thankfully, I had that old custom compiled vanilla kernel sitting in the Grub menu that allowed me to boot and utilize the command line at least.

Although I was able to interact with Grub during the boot process, I decided to complicate the problem for no apparent reason and thought there must be something wrong with the grub itself... I burned the Fedora 12 DVD iso image and booted the computer into rescue mode... Two commands:


chroot /mnt/sysimage
grub-install /dev/sda


and a reboot later, I was staring at the same screen again...

This time I decided to check the /boot partition to see if the new kernel was properly installed. And voila: No fc12 vmlinuz or initrd files there! As usual, without any respect to conventional wisdom, I forcefully installed the first kernel rpm package that I could find on the Fedora 12 DVD. A quick check revealed that the required image files were created in the /boot partition along with the Grub entry. Confident, I rebooted with a smirk on my face only to discover a corrupted display - imagine a GUI with heavy texture and kaleidoscope effects.

A quick examination of the log revealed the following error:

Unable to load the kernel module 'nvidia.ko'

So I tried to reinstall the NVIDIA drivers:


yum remove kmod-nvidia
yum install kmod-nvidia


I had no luck there. Further investigation into /etc/rc.d/init.d/nvidia file clarified the loading process for nvidida.ko:

modname="nvidia.ko"
modpath="/lib/modules/$(uname -r)"
# Default to no module
module="noneWithSomeCrazyNameSoItsNeverFound"
# If one exists, then use it.
if test -e "${modpath}/extra/${modname}";then
    module="${modpath}/extra/${modname}"
elif test -e "${modpath}/extra/nvidia/${modname}";then
    module="${modpath}/extra/nvidia/${modname}"
elif test -e "${modpath}/kernel/drivers/video/nvidia/${modname}";then
    module="${modpath}/kernel/drivers/video/nvidia/${modname}"
fi

In my case, the older version of the kernel rpm package that I had forcefully installed was causing "uname -r" to return "2.6.31.5-127.fc12.i686". On the other hand, yum was installing everything into "/lib/modules/2.6.31.12-174.2.3.fc12.i686" due to the original kernel package that was also present on the system. I simply removed the old kernel package, reinstalled the original kernel package to generate the /boot images and the grub entry, and ran the nvidia install commands above...

After wasting six hours due to another logic exception, I got my computer working again.

Comments

Popular posts from this blog

Securing Symfony2 REST services with FOSOAuthServerBundle

Overview In my previous article, I wrote about setting up a Symfony2 REST service using FOSRestBundle. However, this REST service was behind a firewall protected by a generic form_login provider. Not really ideal if you wish to open your REST API to other applications. So in this article, I will try to explain how to set up FOSOAuthServerBundle to protect your REST API methods using OAuth2. Before we start getting into the gritty details, it is a good idea to have a look at the official OAuth2 documentation . Let's begin... FOSOAuthServerBundle Installation You have to install v1.1.0 of FOSOAuthServerBundle if you are using Symfony 2.0.x. If not, see the docs . First, add the following entries to your deps file: [FOSOAuthServerBundle] git=git://github.com/FriendsOfSymfony/FOSOAuthServerBundle.git target=bundles/FOS/OAuthServerBundle version=origin/1.1.x [oauth2-php] git=git://github.com/FriendsOfSymfony/oauth2-php.git Run the vendors script to install these...

Unexpected token "name" of value "if" ("end of statement block" expected) in "WebProfilerBundle:Collector:logger.html.twig"

Encountered this WebProfilerBundle error message when I ran the bin/vendors script to update my Symfony2 bundles. Make sure your deps file is up to date; you need to pay special attention to your version values. In this case, update your twig version to v1.2.0 as illustrated below: [twig] git=http://github.com/fabpot/Twig.git version=v1.2.0 Run the vendors script to update your bundle and the error message should disappear. You can get the most up to date deps file from the symfony-standard repository located at: https://github.com/symfony/symfony-standard/blob/master/deps

Symfony2 SecurityBundle and FOSUserBundle integration: How does it work?

Overview A couple of days ago, I realized I needed to add some new functionality to the login process. Specifically, I needed to track all previous login attempts. Not knowing anything about the new Symfony2 SecurityBundle, I had to go through the underlying code to understand what was going on. In the process, I think got a basic idea about how the new SecurityBundle interacts with FOSUserBundle. Configuration I have a basic security configuration as illustrated below. app/config/security.yml security: encoders: Symfony\Component\Security\Core\User\User: plaintext role_hierarchy: ROLE_ADMIN: ROLE_USER ROLE_SUPER_ADMIN: ROLE_ADMIN providers: fos_userbundle: id: fos_user.user_manager firewalls: main: pattern: .* form_login: provider: fos_userbundle check_path: /user/login_check login_path: /user/login lo...