mugshot, larkspur


Gopal Venkatesan's Former Journal

My writings on free/open source software and other technologies

Previous Entry Share Next Entry
Restoring SLES boot
mugshot, larkspur

This content has been updated and moved to a new place.

My home (desktop) computer runs three operating systems viz., Windows 7, RHEL 5.5 (evaluation copy), SLES 11 SP1 (evaluation copy) with RHEL GRUB boot loader. I did experience enough problems setting up SLES but I’ll explain them later in this post. Everything worked fine until yesterday. Since yesterday selecting SLES (SuSE Linux Enterprise Server) gave a very weird error from GRUB “Error 2: Bad file or directory type”.

What is this GRUB loader error “Error 2: Bad file or directory type” mean?

I checked for the error description and found that the error reported by GRUB stage 2 and it means the file (here kernel) is not a regular file, but something like a symbolic link, directory, or FIFO. The partition was a small “/boot” partition for SLES. When I tried to mount the partition from RHEL, it did mount without reporting any errors or warnings. Doing a file system check (fsck) after dismounting the file system also didn’t report any errors!

I searched on the Internet for this problem and came across some solutions indicating reinstallation of GRUB. I tried that, but that too didn’t work!

How I solved the problem?

I tried using SLES install DVD, trying to repair the system and finally almost gave up. I made up my mind to reinstall the OS from scratch after one more try. I mounted the file system from RHEL, copied all the files, recreated the file system and copied all the files back into it. Now that worked!

shell$ sudo mount /dev/sda6 /mnt
shell$ sudo mkdir suse_boot
shell$ sudo cp -R -p /mnt/* suse_boot
shell$ sudo umount /mnt
shell$ sudo mke2fs -j /dev/sda6
shell$ sudo mount /dev/sda6 /mnt
shell$ sudo cp -R -p suse_boot/* /mnt
shell$ sudo umount /mnt

My experience with SLES

With my personal experience with both RHEL and SLES I feel that RHEL is far ahead when it comes to a rock solid server/enterprise operating system. Right from the installation SLES makes you feel you are not installing a GNU/Linux or a Unix-like operating system, but a desktop very much like Windows or Mac OS X. Most of the options for an experienced Unix administrator has been hidden, including configuring the boot loader. You’re definitely sure of overwriting your boot loader like me if you aren’t careful about the screens. Configuring the boot loader is almost hidden from the installation process. After installation the OS doesn’t register properly with Novell. You have to use the command line “suse_register” to successfully register the evaluation copy. I’ll reserve a separate blog post for my experience with RHEL and SLES.


Log in