Saturday, November 20, 2010

Reflections on GRUB 1

I noticed that after installing openSUSE on my hardisk, I was able to boot from either FreeBSD or PC BSD but not both. Of course, I could always boot into openSUSE. I couldn't quite understand it. There were 3 operating systems on my hard disk - FreeBSD, PC BSD and openSUSE. But why was it that whenever I would choose either FreeBSD or PC BSD from the GRUB menu, I would succeed in booting into one of them?

The FreeBSD and PC BSD boot managers had simple functionality and small enough to fit into the MBR. GRUB was more complex. In fact, in Linux world, GRUB is called a boot loader and seldom boot manager. The fact is that GRUB loads in stages. The stage 1 loads first and is tiny enough to fit into the MBR. The subsequent stages of grub (1.5 and 2) load later and are present in the first sector of the respective partition (grub's home partition) or something like that.

Anyway, I need to investigate on that. But, I could solve the above problem by actually going through the installation procedure for GRUB after openSUSE had got installed. That means, GRUB was not previously installed into the MBR! Then how was openSUSE getting loaded. I noticed that the extended partition on which openSUSE was installed was marked active. When I made some other partition active, the GRUB menu was never displayed, so the partition on which GRUB (openSUSE) was installed had to be active for it to load. The fact that GRUB was not in the MBR may also have been the reason for the funny behavior I noted in the first paragraph of this post.

Jaya Sri Sridharasvami Maharaja.

Monday, October 18, 2010

An excerpt from a feedback of an interview

Himadri seems to be somewhat familiar with pointers in C. As you know, I use this as my yardstick to gauge the candidate. Her rating:
3 out of 10 in C
5 out of 10 in general software development

(10 is denotes the proficiency of an international standard software developer)

By the way I would like to give Madhusudan one more point in C++. His rating would be 2 out of 10.

It's not possible to compare proficiency in C and that in C++. Although C++ is a superset of C, when we interview a candidate for C++ we look at OOP skills in C++. This is not tested when interviewing a candidate for C.

Moreover, C skills are usually preferred when the requirement is for embedded platforms. And C++ skills (OOP) is usually preferred for developing enterprise software.

Saturday, October 16, 2010

Early encounters with Gnome and FreeBSD

I would have preferred to title this post with "My adventures with gdm". But the subject line of this email will be useful for someone searching for help. Gnome is a good desktop.

Well, I am not putting before you folk any kind of problem here. I am giving a solution that I discovered for the problem of trying to start gdm on my computer. First a little introduction. Recently I downloaded the disc 1 of the i386 7.0 Release version of freebsd. Then I installed the minimal distribution from this disc. My goal was to have a good desktop so I decided to go for gnome. But, I read in the freebsd handbook that to run gnome, I needed to install X.org system; so I installed the X.org application that came with this disc. Then I installed gnome-lite using

pkg_add -r gnome-lite

command in the terminal.

I wanted to have a login window showing up automatically at boot time and that meant that gdm had to start at boot time. The freebsd handbook mentioned that I had to stick the line

gdm_enable="YES"

at the end of the file /etc/rc.conf. I did that and restarted my computer, but gdm failed to start. After some googling, I found in the page faq2.html that I had to add the line

gnome_enable="YES"

at the end of the file /etc/rc.conf. I removed the 'gdm_enable="YES" and added the previous line. But, gdm still failed to start. Then I added both the previous two lines in this order

gnome_enable="YES"
gdm_enable="YES"

I rebooted, but still gdm failed to start. I had a feeling that gdm was not installed even though the freebsd handbook claimed that gdm will be automatically installed when gnome is installed. I tried installing gdm.

pkg_add -r gdm

I saw that gdm did get installed now. I rebooted by computer and I saw the login window! I logged in and there was my gnome. Jai Jagathguru Srila Prabhupada and Sathguru Bhagwan.

Retaining kernel boot parameters in openSUSE

Another caveat
After a kernel update, I found that the 'nomodeset' argument was missing in the kernel boot line (see this post). I understood from a beginning line of /boot/grub/menu.lst, that I had to add the arguments to the file '/etc/sysconfig/bootloader' that I needed to be retained across kernel updates.

Mercy of Sathguru
When I opened that file (/etc/sysconfig/bootloader), I noticed that a variable 'DEFAULT_APPEND' was tagged with a description that suggested that I add the 'nomodeset' to the list of arguments it already had. I did that and it worked!!

Saturday, October 2, 2010

Installing openSUSE 11.3 was a rough ride

Blessed
Yesterday, I installed openSUSE 11.3 on my HP Pavilion desktop a6340in with strong faith in Sathguru bhagwan that it will be a success. After I finished and booted into my account, the keyboard and mouse froze. There was no alternative but to restart with the power button of the PC! But there was no such problem when I booted using the 'failsafe mode' chosen from the grub menu.

Googling
I did a google search on the problem and found that there was a problem with the kernel and video driver combination. I also found a note in the 'Details' section during installation that one may have to use 'nomodeset' as boot argument for the kernel. This argument already present when booting in the 'failsafe mode'. I also found a couple of more hints of how to achieve best results in this situation.

The solution
I added 'nomodeset' to the kernel boot arguments in the /boot/grub/menu.lst file. I also added the following line to the file '/etc/X11/xorg.conf.d/50-device.conf':

Driver "intellegacy"


By the mercy of Sathguru, it worked!!