Windows starts automatically

Hi, I just installed openSuse11.3 on my desktop, but when I switch on my pc, windows starts aumatically. I can run openSuse only if I insert installation cd, select BOOT FORM HARD DISK and then Grub appears…

PS: I have a problem also with screen resolution, I installed nVidia drivers, but the maximum resolution is 1024X768…

So, do you have more than one hard drive? Where did you load Grub? Is it in the Master Boot Record or in the openSUSE partition? Did you mark the openSUSE partition active for booting? So many questions and so few answers. It would be helpful to boot up openSUSE using your CD and then getting some information about your setup. Open up a terminal session and then type the following commands:

su -
password:
fdisk -l
cat /boot/grub/menu.lst
cat /boot/grub/device.map
cat /etc/fstab

Copy and paste each item into a code window using the advance message editor. Highlight each block of text in the message and press the code (#) function to enclose it as code, which prevents it from being reformatted and allows long text to be placed in your message.

This information will be helpful in determining what to do next.

Thank You,

Thanks for your help…The commands output is:

  • for fdisk -l

linux-9fms:~ # fdisk -l

Disk /dev/sda: 251.0 GB, 251000193024 bytes
255 heads, 63 sectors/track, 30515 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: 0x33e633e6

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       16971   136311525    7  HPFS/NTFS
/dev/sda2           16971       30515   108800181    f  W95 Ext'd (LBA)
/dev/sda5           16971       19581    20972794+  83  Linux
/dev/sda6           19582       30253    85722808+  83  Linux
/dev/sda7           30254       30515     2104483+  82  Linux swap / Solaris

Disk /dev/sdb: 251.0 GB, 251000193024 bytes
255 heads, 63 sectors/track, 30515 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: 0x33e633e5

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       30515   245111706    7  HPFS/NTFS

Disk /dev/sdc: 82.0 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 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: 0x00072351

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1        9964    80035798+   7  HPFS/NTFS

  • for cat /boot/grub/menu.lst

linux-9fms:~ # cat /boot/grub/menu.lst                                                                                             
# Modified by YaST2. Last modification on dom set 26 23:23:03 CEST 2010
# THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader
# Configure custom boot parameters for updated kernels in /etc/sysconfig/bootloader

default 1
timeout 8
gfxmenu (hd1,4)/boot/message
##YaST - activate

###Don't change this comment - YaST2 identifier: Original name: windows 2###
title Windows XP
    map (hd1) (hd0)
    map (hd0) (hd1)
    rootnoverify (hd1,0)
    makeactive
    chainloader +1

###Don't change this comment - YaST2 identifier: Original name: linux###
title Desktop -- openSUSE 11.3 - 2.6.34.7-0.3
    root (hd1,4)
    kernel /boot/vmlinuz-2.6.34.7-0.3-desktop root=/dev/disk/by-id/ata-Maxtor_6L250S0_L59KHR2G-part5 resume=/dev/disk/by-id/ata-Maxtor_6L250S0_L59KHR2G-part7 splash=silent quiet showopts vga=0x31a
    initrd /boot/initrd-2.6.34.7-0.3-desktop

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- openSUSE 11.3 - 2.6.34.7-0.3
    root (hd1,4)
    kernel /boot/vmlinuz-2.6.34.7-0.3-desktop root=/dev/disk/by-id/ata-Maxtor_6L250S0_L59KHR2G-part5 showopts apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe vga=0x31a
    initrd /boot/initrd-2.6.34.7-0.3-desktop

###Don't change this comment - YaST2 identifier: Original name: windows 1###
title windows 1
    rootnoverify (hd0,0)
    chainloader +1

###Don't change this comment - YaST2 identifier: Original name: windows 3###
title windows 3
    map (hd2) (hd0)
    map (hd0) (hd2)
    rootnoverify (hd2,0)
    makeactive
    chainloader +1

###Don't change this comment - YaST2 identifier: Original name: floppy###
title Dischetto
    rootnoverify (fd0)
    chainloader +1

  • for cat /boot/grub/device.map

linux-9fms:~ # cat /boot/grub/device.map
(hd2)   /dev/disk/by-id/ata-Maxtor_6L250S0_L59LZ1YG                                                                                                                                                      
(fd0)   /dev/fd0                                                                                                                                                                                         
(hd0)   /dev/disk/by-id/ata-Maxtor_6L080L0_L21JS91H                                                                                                                                                      
(hd1)   /dev/disk/by-id/ata-Maxtor_6L250S0_L59KHR2G 

  • for cat /etc/fstab

linux-9fms:~ # cat /etc/fstab                                                                                                                                                                            
/dev/disk/by-id/ata-Maxtor_6L250S0_L59KHR2G-part7 swap                 swap       defaults              0 0                                                                                              
/dev/disk/by-id/ata-Maxtor_6L250S0_L59KHR2G-part5 /                    ext4       acl,user_xattr        1 1                                                                                              
/dev/disk/by-id/ata-Maxtor_6L250S0_L59KHR2G-part6 /home                ext4       acl,user_xattr        1 2                                                                                              
/dev/disk/by-id/ata-Maxtor_6L080L0_L21JS91H-part1 /windows/C           ntfs-3g    users,gid=users,fmask=133,dmask=022,locale=it_IT.UTF-8 0 0                                                             
/dev/disk/by-id/ata-Maxtor_6L250S0_L59KHR2G-part1 /windows/D           ntfs-3g    users,gid=users,fmask=133,dmask=022,locale=it_IT.UTF-8 0 0                                                             
/dev/disk/by-id/ata-Maxtor_6L250S0_L59LZ1YG-part1 /windows/E           ntfs-3g    users,gid=users,fmask=133,dmask=022,locale=it_IT.UTF-8 0 0                                                             
proc                 /proc                proc       defaults              0 0                                                                                                                           
sysfs                /sys                 sysfs      noauto                0 0                                                                                                                           
debugfs              /sys/kernel/debug    debugfs    noauto                0 0                                                                                                                           
usbfs                /proc/bus/usb        usbfs      noauto                0 0                                                                                                                           
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0

You have three hard drives and I assume that /dev/sda is set as your boot drive. I can see that dev sda1 is the bootable partition and it is the Windows partition. Since the Windows partition is booting automatically, then Grub was not loaded into the Master Boot Record.

   Device Boot      Start         End      Blocks   Id  System 
/dev/sda1   *           1       16971   136311525    7  HPFS/NTFS 
/dev/sda2           16971       30515   108800181    f  W95 Ext'd (LBA) 
/dev/sda5           16971       19581    20972794+  83  Linux 
/dev/sda6           19582       30253    85722808+  83  Linux 
/dev/sda7           30254       30515     2104483+  82  Linux swap / Solaris 

I suggest you consider downloading the GParted boot disk to fix the grub issue. Location of the GParted Disk:

GParted – Live CD/USB/PXE/HD

I am thinking you could download the GParted Boot disk and then Check out the following detail on what to do next.

Re-Install Grub Quickly with Parted Magic

Do this to reinstall the grub boot loader onto the disk. I found a really good article on grub located here:

GRUB bootloader - Full tutorial

Now I must tell you, that unless you really want to save this setup, I would suggest a different partition setup. To do so though will require going into a manual partitioning mode to setup. Here is what I would suggest you do:

  1. Load Generic Boot code into MBR (Master Boot Record)
  2. /dev/sda1 Primary Partition, NTFS for Windows, No Change (Except it will not be marked active for booting).
  3. /dev/sda2 Primary Partition, SWAP and 2 GB in size
  4. /dev/sda3 Primary Partition, EXT4 and 50 GB in size, Marked Active for booting for / root openSUSE partition.
    5, /dev/sda4 Primary Partition, EXT4 and 60 GB (Or rest of Disk) for /home Partition.

This is how I woulds set it up, but openSUSE will likely not suggest this by default. Depending on what you do, we can suggest several things to reduce the size of your grub menu.lst, but not until you decide the direction you are going.

Thank You,