Grub problem

hi

i have installed SUSE 10.3 while m having already Debian lenny and win XP.

After installing SUSE 10.3 m not able to boot debian lenny

But grub shows option for booting lenny.

but when i select it’s not able to find kernel image

and says bad file or directory.

Plz help me

I suggest you to:
Open YaST. Select the System tab and click to Boot Loader. Here you can see the list of bootable operating systems. You can try 2 things:

  1. Click to Other button (bottom right), and in the menu select the Reread configuration from Disk. Click to Finish, reboot, and try to boot Debian lenny.
  2. Another way is that in the same window (Boot Loader), select Debian lenny and click to Edit button. In this window into the Kernel Image field type the patch to your Debian lenny kernel.

I had a similar experience when I installed 64studio (based on Debian Etch) on my system alongside openSUSE 11 and WinXP.

First back-up your openSUSE /boot/grub/menu.lst file.

If you can access the Debian Lenny files from within openSUSE then copy and paste the relevant stanzas from the Lenny menu.lst file to the openSUSE menu.lst file. They should look something like:

title        64studio, kernel 2.6.21-1-multimedia-amd64
root        (hd0,7)
kernel        /boot/vmlinuz-2.6.21-1-multimedia-amd64 root=/dev/sda8 ro vga=791 splash=silent 
initrd        /boot/initrd.img-2.6.21-1-multimedia-amd64
savedefault

title        64studio, kernel 2.6.21-1-multimedia-amd64 (single-user mode)
root        (hd0,7)
kernel        /boot/vmlinuz-2.6.21-1-multimedia-amd64 root=/dev/sda8 ro vga=791 splash=silent single
initrd        /boot/initrd.img-2.6.21-1-multimedia-amd64
savedefault

Of course in your case they will say Debian Lenny rather than 64studio. I also had to delete the savedefault lines to get 64studio to boot.

If you can’t access your Lenny files from openSUSE you will need to edit your /etc/fstab file so your Lenny partition will be mounted to, for example, /media/lenny on next boot. Guide on editing fstab: Fstab - openSUSE

I did as u suggested (copy and pasting)

but it shows

Error 2 : Bad file or directory type

my fdisk -l with description for linux partitions is as follows :

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x9c879c87

Device Boot Start End Blocks Id System
/dev/sda1 * 1 2349 18868311 7 HPFS/NTFS
/dev/sda2 2350 19457 137420010 f W95 Ext’d (LBA)
/dev/sda5 2350 8723 51199123+ 7 HPFS/NTFS
/dev/sda6 8724 11910 25599546 b W95 FAT32
/dev/sda7 11911 13857 15639246 83 Linux | Debian
/dev/sda8 13858 15097 9960268+ 83 Linux | free Ext 3
/dev/sda9 15098 15228 1052226 83 Linux | /boot (only for Suse & Debian’s boot is also on /dev/sda7)
/dev/sda10 15229 16533 10482381 83 Linux | Suse
/dev/sda11 16534 16794 2096451 82 Linux swap / Solaris | Swap
/dev/sda12 16795 19457 21390516 83 Linux | free Ext 3

According to SuSELinuxSupport: Grub Installer Error Codes :

2 : Bad file or directory type - This error is returned if a file requested is not a regular file, but something like a symbolic link, directory, or FIFO.
I had a look around and noticed this error may also occur due to a bad partition and may require a reinstall: GRUB Error 2 - openSUSE Forums

Before considering a reinstall, could you copy and paste the original Lenny menu.lst and your current openSUSE menu.lst inside

 tags? Thanks.

Sorry, ignore that last link I posted. It’s probably quite unrelated to your problem. That user was trying to boot openSUSE 11.0 using an Ubuntu Gutsy GRUB menu while you are trying to use an openSUSE 10.3 GRUB menu to boot Debian Lenny.

openSUSE 11.0 formats partitions with inode size set at 256 bytes. Older versions of GRUB can only handle 128 byte inode size. That’s possibly why the Gutsy GRUB couldn’t boot the openSUSE 11.0 partition. The openSUSE 11.0 GRUB can handle both inode sizes.

If you don’t have any luck with the 10.3 GRUB it might be worth a shot installing 11.0 and seeing how that goes?