Bootloader doesnt work

Hello,

I have a problem with bootloader. I dont know what happend but I didnt do any specific action so:

I have oS 11.3 and W XP in dual boot. After one restart GRUB is not loading at all, it goes directly to XP.
I can access to the system via LiveCD oS 12.1, where I boot via CD, choose boot from HDD and GRUB works fine. I have tried to recovery MBR in Yast, also rebuild configuration and saved it but no success and I dont know how to repair it.

Thank you for your assistance,

Martin

And you ran some updates in XP? Looks like it.

This may be a good time to move to openSUSE 12.1, since 11.3 has already met it’s end of life, i.e. is no longer supported.
While thinking about that option, please boot into 11.3, open a terminal window, and post output of


su -c 'fdisk -l'

I havent done any update of XP. I havent been in XP for 6 months…


Disk /dev/sda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xfef1fef1

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         913     7333641    7  HPFS/NTFS
/dev/sda2             914        4865    31744440    f  W95 Ext'd (LBA)
/dev/sda5             914        4865    31744408+   b  W95 FAT32

Disk /dev/sdb: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xf8d9f8d9

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1        1275    10241406    7  HPFS/NTFS
/dev/sdb2            1276       24320   185108962+   f  W95 Ext'd (LBA)
/dev/sdb5            1276       14023   102398278+   7  HPFS/NTFS
/dev/sdb6           14024       19122    40957686    7  HPFS/NTFS
/dev/sdb7           19123       21590    19816177   83  Linux
/dev/sdb8           21590       21734     1164681   82  Linux swap / Solaris
/dev/sdb9           21735       24306    20651557   83  Linux

Disk /dev/sdc: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0003450b

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1       40001   321308001   83  Linux
/dev/sdc2           40002       91201   411264000   83  Linux

Disk /dev/sdd: 1000.2 GB, 1000170586112 bytes
255 heads, 63 sectors/track, 121597 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00042ada

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1      121598   976728064    7  HPFS/NTFS

Disk /dev/sde: 3992 MB, 3992977408 bytes
15 heads, 15 sectors/track, 34661 cylinders
Units = cylinders of 225 * 512 = 115200 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc3072e18

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1              36       34662     3895360    c  W95 FAT32 (LBA)

As soon as it is already booted in linux using the suse cd/dvd will mkinitrd work to rebuild the boot option?

No idea :). I can use only Yast and Bootloader option. So I tried there to recovery MBR and also to let system propose and save new boot options. But it is always the same.

Since you don’t have any primary Linux partition, I would assume that you have the Grub bootloader in the extended one, either sda or sdb (we can not tell for sure which one is hd0). You have to set the bootflag back on this partition:

su -l
sfdisk -A2 /dev/sdb

or/and

sfdisk -A2 /dev/sda

findgrub -a would find the right partition and fix the bootflag. But you’ll have to install in on the live system. It’s in my repo.

  • or you install Grub in MBR. That will work too.

Did you also look at the Tab “Bootloader installation” ? What happens if you tell it to install in the MBR? AFAIK then it should find the root partition and boot. The LiveCD does that in a different way, it looks for linux partitions and has it’s own GRUB.

I love crossposting when the outcome is like this :smiley:

So I have done sfdisk command. And also I entered to Bootloader option in Yast and saved bootloader to MBR. It changes now…

Booting directly from HDD:

GRUB LOADING STAGE 2

/boot/message: file not found
it goes to text mode
option:opensuse 11.3
root hd(1,6) doesnt exist

Booting directly via CD:

GRUB LOADING STAGE 1.5
it goes to graphic mode
option:opensuse 11.3
I have checked it and it is also root hd(1,6)

I have tried in Yast to make bootloaders options from zero and saved to MBR but it is always the same…

findgrub -a command not found (I mean the command)

When I said " or you install Grub in MBR", it didn’t mean “and”. Never apply 2 different methods at the same time. Resetting the bootflag is probably all you needed to do.

It’s lookink on the wrong disk. It should be (hd0,6).

Well … I don’t know. I don’t think repairing with YaST from live CD is a good idea when Linux is on the second disk. You should use the grub command.
Did you play with BIOS boot order in the meantime?

I said it was in my repo. But I had to go, sorry. I should have provided more info.

In any case, it is solved. I changed in bootlader from hd(1,6) to hd(0,6) and it works. But I dont understand why via CD there was hd(1,6) also working and when I did this modification in Yast, it said me that there is no system, if I wish to do it. I did it and it works but why it is like this, I dont understand…

I dint repair system from CD, only used it for option Boot from Hdd.

In any case, thanks for your assistance to solve it.

It’s tricky with two hard disks, because the system doesn’t really know which is the first BIOS drive. It just guesses. YaST reads the file /boot/grub/device.map to get this information (see this post: http://forums.opensuse.org/english/get-technical-help-here/install-boot-login/471406-how-does-yast-use-grub-4.html#post2434159). If the file is missing (like when you boot from live CD), it assumes that sda=hd0 and sdb=hd1. As this is not always the case, it takes the wrong disk. That’s what happened here. Don’t reinstall Grub with YaST! Use the Grub shell (the command “grub”).

Ok, thank you!