Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have windows XP professional installed on 1 hard drive and Ubuntu 10.10 on my second hard drive. On start up the computer completely skips the grub menu and boots straight into 10.10.

I have tried running os-prober with the windows hard drive mounted and then updating grub but it didnt work.

Any ideas?

I have changed the boot order so that the HDD with xp on it is first however the computer still booted into linux.

I tried running grub-install /dev/sda and got this

/usr/sbin/grub-setup: warn: Sector 32 is already in use by FlexNet; avoiding it.  This software may cause boot or other problems in future.  Please ask its authors not to store data in the boot track..
/usr/sbin/grub-setup: warn: Sector 33 is already in use by FlexNet; avoiding it.  This software may cause boot or other problems in future.  Please ask its authors not to store data in the boot track..
Installation finished. No error reported

I checked using disk utility and the code for my xp hard drive is sdb so i ran the camand grub-install /dev/sdb shich gave me this

Installation finished. No error reported.

So i rebooted but it still didnt work.

Any other ideas?

Additional info

gedit /boot/grub/grub.cfg:

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function recordfail {
  set recordfail=1
  if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}

function load_video {
  insmod vbe
  insmod vga
}

insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
if [ "${recordfail}" = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.35-28-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c
    linux   /boot/vmlinuz-2.6.35-28-generic root=UUID=d682c9bd-dd89-4827-9802-a1f921ebe21c ro   quiet splash
    initrd  /boot/initrd.img-2.6.35-28-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-28-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c
    echo    'Loading Linux 2.6.35-28-generic ...'
    linux   /boot/vmlinuz-2.6.35-28-generic root=UUID=d682c9bd-dd89-4827-9802-a1f921ebe21c ro single 
    echo    'Loading initial ramdisk ...'
    initrd  /boot/initrd.img-2.6.35-28-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c
    linux   /boot/vmlinuz-2.6.35-22-generic root=UUID=d682c9bd-dd89-4827-9802-a1f921ebe21c ro   quiet splash
    initrd  /boot/initrd.img-2.6.35-22-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c
    echo    'Loading Linux 2.6.35-22-generic ...'
    linux   /boot/vmlinuz-2.6.35-22-generic root=UUID=d682c9bd-dd89-4827-9802-a1f921ebe21c ro single 
    echo    'Loading initial ramdisk ...'
    initrd  /boot/initrd.img-2.6.35-22-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c
    linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c
    linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ "x${timeout}" != "x-1" ]; then
  if keystatus; then
    if keystatus --shift; then
      set timeout=-1
    else
      set timeout=0
    fi
  else
    if sleep --interruptible 3 ; then
      set timeout=0
    fi
  fi
fi
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

sudo fdisk -l:

Disk /dev/sda: 80.1 GB, 80060424192 bytes
255 heads, 63 sectors/track, 9733 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: 0x0008a483

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        9352    75112448   83  Linux
/dev/sda2            9352        9734     3068929    5  Extended
/dev/sda5            9352        9734     3068928   82  Linux swap / Solaris

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 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: 0xc5d6c5d6

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       60800   488375968+   7  HPFS/NTFS

sudo blkid

/dev/sda1: UUID="d682c9bd-dd89-4827-9802-a1f921ebe21c" TYPE="ext4" 
/dev/sda5: UUID="09e9c2cb-d903-4f0b-a181-536951845231" TYPE="swap" 
/dev/sdb1: UUID="B21844EB1844AFE1" TYPE="ntfs"

sudo os-prober

(nothing)

  Boot Info Script 0.55    dated February 15th, 2010                    

============================= Boot Info Summary: ==============================

 => Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in 
    partition #1 for (,msdos1)/boot/grub.
 => Grub 2 is installed in the MBR of /dev/sdb and looks on the same drive in 
    partition #1 for (,msdos1)/boot/grub.

sda1: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info:  
    Operating System:  Ubuntu 10.10
    Boot files/dirs:   /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sda2: _________________________________________________________________________

    File system:       Extended Partition
    Boot sector type:  Unknown
    Boot sector info:  

sda5: _________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info:  

sdb1: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows XP
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  Windows XP
    Boot files/dirs:   

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ _____________________________________________________

Disk /dev/sda: 80.1 GB, 80060424192 bytes
255 heads, 63 sectors/track, 9733 cylinders, total 156368016 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot         Start           End          Size  Id System

/dev/sda1    *          2,048   150,226,943   150,224,896  83 Linux
/dev/sda2         150,228,990   156,366,847     6,137,858   5 Extended
/dev/sda5         150,228,992   156,366,847     6,137,856  82 Linux swap / Solaris


Drive: sdb ___________________ _____________________________________________________

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot         Start           End          Size  Id System

/dev/sdb1    *             63   976,751,999   976,751,937   7 HPFS/NTFS


blkid -c /dev/null: ____________________________________________________________

Device           UUID                                   TYPE       LABEL                         

/dev/sda1        d682c9bd-dd89-4827-9802-a1f921ebe21c   ext4                                     
/dev/sda2: PTTYPE="dos" 
/dev/sda5        09e9c2cb-d903-4f0b-a181-536951845231   swap                                     
/dev/sda: PTTYPE="dos" 
/dev/sdb1        B21844EB1844AFE1                       ntfs                                     
/dev/sdb: PTTYPE="dos" 

============================ "mount | grep ^/dev  output: ===========================

Device           Mount_Point              Type       Options

/dev/sda1        /                        ext4       (rw,errors=remount-ro,commit=0)


=========================== sda1/boot/grub/grub.cfg: ===========================

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function recordfail {
  set recordfail=1
  if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}

function load_video {
  insmod vbe
  insmod vga
}

insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
if [ "${recordfail}" = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.35-28-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c
    linux   /boot/vmlinuz-2.6.35-28-generic root=UUID=d682c9bd-dd89-4827-9802-a1f921ebe21c ro   quiet splash
    initrd  /boot/initrd.img-2.6.35-28-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-28-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c
    echo    'Loading Linux 2.6.35-28-generic ...'
    linux   /boot/vmlinuz-2.6.35-28-generic root=UUID=d682c9bd-dd89-4827-9802-a1f921ebe21c ro single 
    echo    'Loading initial ramdisk ...'
    initrd  /boot/initrd.img-2.6.35-28-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c
    linux   /boot/vmlinuz-2.6.35-22-generic root=UUID=d682c9bd-dd89-4827-9802-a1f921ebe21c ro   quiet splash
    initrd  /boot/initrd.img-2.6.35-22-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c
    echo    'Loading Linux 2.6.35-22-generic ...'
    linux   /boot/vmlinuz-2.6.35-22-generic root=UUID=d682c9bd-dd89-4827-9802-a1f921ebe21c ro single 
    echo    'Loading initial ramdisk ...'
    initrd  /boot/initrd.img-2.6.35-22-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c
    linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c
    linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ "x${timeout}" != "x-1" ]; then
  if keystatus; then
    if keystatus --shift; then
      set timeout=-1
    else
      set timeout=0
    fi
  else
    if sleep --interruptible 3 ; then
      set timeout=0
    fi
  fi
fi
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "Windows XP" {
set root=(hd1,1)
chainloader (hd1,1)+1
}
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

=============================== sda1/etc/fstab: ===============================

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
/dev/sda1       /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=09e9c2cb-d903-4f0b-a181-536951845231 none            swap    sw              0       0

=================== sda1: Location of files loaded by Grub: ===================


  51.7GB: boot/grub/core.img
  58.5GB: boot/grub/grub.cfg
   1.2GB: boot/initrd.img-2.6.35-22-generic
   1.3GB: boot/initrd.img-2.6.35-28-generic
  58.2GB: boot/vmlinuz-2.6.35-22-generic
  51.7GB: boot/vmlinuz-2.6.35-28-generic
   1.3GB: initrd.img
   1.2GB: initrd.img.old
  51.7GB: vmlinuz
  58.2GB: vmlinuz.old
=========================== Unknown MBRs/Boot Sectors/etc =======================

Unknown BootLoader  on sda2

00000000  d9 ed 13 ab ff a8 33 8c  01 b2 47 99 e1 4a b1 f1  |......3...G..J..|
00000010  69 5f a7 29 a4 1a 03 9e  31 b9 45 02 71 e6 58 78  |i_.)....1.E.q.Xx|
00000020  3d f6 ee 7b 3e 33 1b 82  c6 7d cf 1a c8 e7 bc 2f  |=..{>3...}...../|
00000030  b9 e1 70 75 cf 18 aa e7  d5 7e 3c f1 b4 e7 9e 3a  |..pu.....~<....:|
00000040  55 38 f1 b4 ee 78 59 0b  5e f7 3c 4c 57 73 9c 2a  |U8...xY.^.<LWs.*|
00000050  28 f1 19 ed 11 9c b2 19  e2 80 92 1c 7b 84 ee 0b  |(...........{...|
00000060  e2 c0 ac af 0a 50 42 b9  cf 0c dc 2c 20 77 85 dc  |.....PB...., w..|
00000070  8f 70 5f 7b 84 9b a1 f7  8c 2d ee 70 5c ae f7 39  |.p_{.....-.p\..9|
00000080  63 f7 09 8a ec 79 4c ed  9f cc ad 3c f8 1b 47 7d  |c....yL....<..G}|
00000090  3f 97 d5 16 cb 29 45 38  25 61 36 08 de 10 93 0f  |?....)E8%a6.....|
000000a0  95 4f ea 54 f9 89 ff f1  bf 9a cc bb fd b6 22 b1  |.O.T..........".|
000000b0  65 08 05 21 78 19 46 b0  24 7e fb de d4 b3 ba d6  |e..!x.F.$~......|
000000c0  ec 11 65 82 ee 10 1d 12  04 91 da 6d 67 47 ea 9b  |..e........mgG..|
000000d0  6f b0 aa fb cb 67 10 64  86 e8 26 85 fb f9 50 77  |o....g.d..&...Pw|
000000e0  9d 13 9b 9e d9 11 f3 a1  50 1b 11 b7 93 79 9f ab  |........P....y..|
000000f0  c1 b6 86 0f 35 ed d4 9f  dc f8 db bd ed 45 3a 68  |....5........E:h|
00000100  54 68 4a 1d d1 fc b8 c9  72 b4 d7 7b 60 e7 39 2f  |ThJ.....r..{`.9/|
00000110  2a 0a 4e 52 72 52 c6 e2  2a 55 6a 2a e1 82 40 71  |*.NRrR..*Uj*..@q|
00000120  11 11 e0 53 d6 ff 1b a9  c6 65 df 1e b7 15 6f a2  |...S.....e....o.|
00000130  15 02 a4 6d 19 b7 78 57  a6 ee 9e 36 08 7d 6f 7c  |...m..xW...6.}o||
00000140  fd f7 7c d5 40 ff 0f c7  97 dc aa 00 ce 8b bb dc  |..|.@...........|
00000150  e2 eb 1c 50 74 d8 14 cc  9a d6 5c a2 ab f2 67 f9  |...Pt.....\...g.|
00000160  58 ed 43 79 0e 78 7a 5c  a6 f8 7b e8 05 4e 62 8a  |X.Cy.xz\..{..Nb.|
00000170  0a 5f 22 ee a6 38 b9 e1  32 45 97 08 cc 75 66 c6  |._"..8..2E...uf.|
00000180  b3 a2 2d 89 a1 e9 95 21  28 53 fd dd be b1 b2 a2  |..-....!(S......|
00000190  78 3f a3 c9 3d e3 31 54  88 cf 78 0d e1 21 a8 74  |x?..=.1T..x..!.t|
000001a0  06 60 9d 21 c6 7a 24 e1  cc 28 f8 98 e0 99 e3 fc  |.`.!.z$..(......|
000001b0  fa 8b eb d5 56 03 20 b8  54 ba c6 ee 9f 57 00 fe  |....V. .T....W..|
000001c0  ff ff 82 fe ff ff 02 00  00 00 00 a8 5d 00 00 00  |............]...|
000001d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 55 aa  |..............U.|
00000200
share|improve this question
    
Please run boot info script as explained here: ubuntuforums.org/showthread.php?t=1291280 and post the RESULTS.txt along with the output of sudo os-prober. –  Jordan Uggla Mar 21 '11 at 7:48
1  
could it have something to do with this chiark.greenend.org.uk/ucgi/~cjwatson/blosxom/debian/… the FlexNet suggests so –  trampster Mar 21 '11 at 9:14
1  
@tornadorider It almost seems as if there is a program that is installed in the boot sector. Anything that you might know of? –  Reuben Swartz Mar 21 '11 at 13:23
    
FlexNet seems to be a software licening tool that unfortunately resides in the boot sector. –  Takkat Mar 21 '11 at 15:23
    
Does it matter that his windows drive does not have star in the boot column –  trampster Mar 22 '11 at 11:28

3 Answers 3

Grub must be installed in the hard drive that the computer boots, regardless of which OS you want to run. That means the hard drive that is set as 1st boot device in BIOS.

You BIOS is probably set up to boot your "2nd" hand drive, where Ubuntu might be the boot partition, thus completely skipping grub.

So, my hints are:

  • Go to your BIOS. Usually this means pressing DEL or F2, or some other key during boot. The right key depends on which computer / brand / model you have. Usually when the PC starts, there is text like "Press XXX for BIOS settings"

  • At BIOS setup screen, try to find your boot options. WHERE they are located also depends on your computer / brand / model. Make sure you choose your 1st hard drive as your 1st boot device. Save settings and quit.

  • Now, install grub in THAT hard drive (usually /dev/sda). Like this:

    grub-install /dev/sda

  • If you cant boot ubuntu after switching the hard drive boot order, change back to previous settings (so you can boot Ubuntu back). Now your 1st hard drive (the one that has XP partition) might be /dev/sbd. Just use the above command replacing sda for sdb. Now go back to BIOS and change boot order again

If you need, i can give you more detailed instructions. Give me your computer (or motherboard) brand and model so i can guide you for BIOS keys and menus. Also, please post the contents of:

gedit /boot/grub/grub.cfg
sudo fdisk -l
sudo blkid

Hope that helps!

UPDATE:

From all the files you posted, I have 2 theories:

1 - grub-install warning suggests me that is actully NOT being installed. Read HERE for a great explanation about FlexNet and Grub. FlexNet looks like a licence manager, anty-piracy protection that writes data in the very MBR space grub uses for its multi-booting code. So you probably have some FlexNet-dependent software in your XP, and Grub refuses to overwrite it, thus refusing to install itself. The same link has info on how to fix that.

Without grub installed on MBR, your HD is booting the traditional way: the partition flagged as bootable in your 1st HD. That means Ubuntu (check fdisk's /dev/sda1 marked as boot partition)

2 - Also, your grub.cfg dow NOT show windows XP, as if os-prober didnt find it. (take a look at your ### BEGIN /etc/grub.d/30_os-prober ### section. It should be something like this (just an example):

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Professional (on /dev/sdb1)" {
    savedefault
    insmod part_msdos
    insmod ntfs
    set root='(hd1,msdos1)'
    search --no-floppy --fs-uuid --set 485083315dc8e22a
    drivemap -s (hd1) ${root}
    chainloader +1
}
### END /etc/grub.d/30_os-prober ###

Instead, yours have no menuentry. Somehow grub did not "find" your XP parition when scanned your drives, or didnt think it was a valid OS.

Thus, as grub menu would have no OS other than Ubuntu, it automatically skips the menu and boots straight into your 1st (and only, acoording to him) OS. You could force grub to show the menu by holding SHIFT key right after the POST. But, again, it would only have Ubuntu (and memtest, and previous kernel, and recovery mode), but not XP.


So, either grub is not installed (it resuses to do so when it finds FlexNet and silently aborts), or it is installed, but since it has only Ubuntu, it bypasses the menu. Or both. Any would make Ubuntu to boot.

Now lets check and fix both theories:

1

  • Is grub actually installed on /dev/sda? Keep SHIFT pressed on boot, and menu will show up instead of being bypassed. If it doesnt show up, grub is not actually installed. Do so by removing FlexNet code from MBR (the same link above have instructions on how) . Then install grub and check if there is no warning.

  • Remember that wiping FlexNet from MBR will make its dependent software fail to work

2

Is your XP install a valid one? Can it boot without grub, in a single-OS enviroment? Somehow grub's OS Prober didnt think so. Lets test it then:

  • In Ubuntu, use gParted to mark its partition as BOOT (right-click partition -> Flags -> check BOOT)

  • Also, try to mount your XP partiton (double-click on it in Nautilus) and check if its OK. Take a look at its boot.ini file. Should be something like:

    [boot loader] timeout=30 default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS [operating systems] multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect /usepmtimer

  • Disconnect the Ubuntu HD. Leave only the XP one. Set BIOS to boot it. Try to see if XP works (it prolly wont yet, but who knows?)

  • Using any Windows bootable CD / USB / Floppy, use windows (NOT linux!) fdisk /mbr to wipe grub of it. Do not fear, grub is only needed in /dev/sda, your 1st hard drive, and since this will be back to /dev/sdb when this is over, grub is not needed on that HD.

  • Try now. It should work. Nope? Then use a XP boot CD to repair that install. If that is your only connected HD and XP is the sole OS, partition marked as boot, with a cleaned-up MBR and repaired install, it must boot, or else later grub wont be able to help you much...

It works? Cool! Connect the other (Ubuntu) HD back, set it up as before (as boot HD in BIOS), launch Ubuntu and run grub-install /dev/sda again. OS prober should detect XP now, and with 2 OSes in its list, menu will show up at boot.

Wow, that was a long answer. You have quite a lot of homework to do . I hope it all works. Good luck!

share|improve this answer
sdb1: ______________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows XP
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  Windows XP
    Boot files/dirs:   

The above section is from your boot info script output. For a working Windows XP installation that last line should be

    Boot files/dirs:   /boot.ini /ntldr /NTDETECT.COM

Your Windows partition does not appear to have files necessary for Windows to boot. This is why os-prober is not detecting any Windows install, and it also means that there is nothing that can be done from GRUB to make Windows boot.

Without knowing more about why those files are missing I can't help much with fixing the problem. Do you have any idea why they are missing?

share|improve this answer

Boot from second Hard Disk (or whichever disk you have GRUB)

I had it like that for my guest PC. When I turn it on, it went to XP straight away like any single Partition PC.

When I wanted Ubuntu, i would go to the boot selection while POST, and select my second hard drive and GRUB was loaded.

So it really depends on how you got things set up in account for your MBR and such.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.