PDA

View Full Version : [SOLVED] 9.10 - Bad GRUB - can no longer boot XP-Pro



n4pgw
December 6th, 2009, 10:23 PM
I installed Ubuntu 9.10 from a live cd onto a second internal HDD in my Dell desktop computer. I first partitioned the 120 GB with a 5GB swap partition at the far end, next to that an extended NTFS partition and left 60GB unused for Ubuntu. The installation completed and rather than reboot, I used Gparted to remove the swap partition the install created and set Swapon to the partition I created. I shut down the computer and powered it back up. The result is that I get "GRUB _" in the top left corner of the screen and nothing else happens.

I reinstalled to the 120 GB again, and told it to setup GRUB on the 120GB drive. When I tell the computer to boot from the secondary hdd, it goes strait to Ubuntu with no GRUB options.

All my files are there on the windows drive. I have booted from XP CD and run Fdisk /mbr but it doesn't help.

==============
After getting this far in the post, I decided to look at the package manager. I am installing Grub 2 now. I installed Grub2 which installed Grub-pc and I installed grub-rescue-pc but see nothing I can do with it yet. I rebooted the computer and get the same old GRUB. however, when I boot to the secondary, HDD, I get the grub menu this time. It includes an option for XP which is on the primary hdd, but I get GRUB when I choose it.

HELP!!

Thanks
Buck

darkod
December 6th, 2009, 10:31 PM
Download the script in my signature, move it to the desktop for example and run it with:
sudo bash ~/Desktop/boot_info_script*.sh

It will create results.txt file. Copy the content of that file here and also put CODE tags around it (button # in the toolbar here above) to make it easier for reading. That will give info about your whole boot process.

n4pgw
December 6th, 2009, 10:49 PM
Here it is, but remeber that I booted on the secondary slave and the problem is with the primary master.

Thanks
Buck


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

=> Windows is installed in the MBR of /dev/sda
=> Grub 1.97 is installed in the MBR of /dev/sdb and looks on the same drive
in partition #6 for /boot/grub.

sda1: __________________________________________________ _______________________

File system: vfat
Boot sector type: Dell Utility: Fat16
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files/dirs:

sda2: __________________________________________________ _______________________

File system: ntfs
Boot sector type: Grub 1.97
Boot sector info: Grub 1.97 is installed in the boot sector of sda2 and
looks at sector 1110861 on boot drive #1 for core.img,
but core.img can not be found at this location. No
errors found in the Boot Parameter Block.
Operating System: Windows XP
Boot files/dirs: /boot/grub/menu.lst /boot/grub/grub.cfg /boot.ini
/ntldr /NTDETECT.COM /boot/grub/core.img

sdb1: __________________________________________________ _______________________

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

sdb5: __________________________________________________ _______________________

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

sdb6: __________________________________________________ _______________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 9.10
Boot files/dirs: /boot/grub/menu.lst /boot/grub/grub.cfg /etc/fstab

sdb3: __________________________________________________ _______________________

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

=========================== 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
Disk identifier: 0x4b3d4b3d

Partition Boot Start End Size Id System

/dev/sda1 63 80,324 80,262 de Dell Utility
/dev/sda2 * 80,325 156,248,189 156,167,865 7 HPFS/NTFS


Drive: sdb ___________________ __________________________________________________ ___

Disk /dev/sdb: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x381e381e

Partition Boot Start End Size Id System

/dev/sdb1 * 63 224,203,139 224,203,077 5 Extended
/dev/sdb5 102,687,480 224,203,139 121,515,660 7 HPFS/NTFS
/dev/sdb6 189 102,687,479 102,687,291 83 Linux
/dev/sdb3 224,203,140 234,436,544 10,233,405 82 Linux swap / Solaris


blkid -c /dev/null: __________________________________________________ __________

/dev/sda1: SEC_TYPE="msdos" LABEL="DellUtility" UUID="07D5-060F" TYPE="vfat"
/dev/sda2: UUID="621474FD1474D58F" TYPE="ntfs"
/dev/sdb3: UUID="b7140e7e-8d28-4aa3-b799-800d6ff1d835" TYPE="swap"
/dev/sdb5: UUID="6CB5A8F40E094D32" LABEL="NTFS" TYPE="ntfs"
/dev/sdb6: UUID="f78ae0e7-6f8e-490b-b68c-6080ae8896c9" TYPE="ext4"

=============================== "mount" output: ===============================

/dev/sdb6 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/buck/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=buck)


=========================== sda2/boot/grub/menu.lst: ===========================

# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default saved

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 3

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=f78ae0e7-6f8e-490b-b68c-6080ae8896c9 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=f78ae0e7-6f8e-490b-b68c-6080ae8896c9

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## specify if running in Xen domU or have grub detect automatically
## update-grub will ignore non-xen kernels when running in domU and vice versa
## e.g. indomU=detect
## indomU=true
## indomU=false
# indomU=detect

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title Ubuntu 9.10, kernel 2.6.31-16-generic
uuid f78ae0e7-6f8e-490b-b68c-6080ae8896c9
kernel /boot/vmlinuz-2.6.31-16-generic root=UUID=f78ae0e7-6f8e-490b-b68c-6080ae8896c9 ro quiet splash
initrd /boot/initrd.img-2.6.31-16-generic

title Ubuntu 9.10, kernel 2.6.31-16-generic (recovery mode)
uuid f78ae0e7-6f8e-490b-b68c-6080ae8896c9
kernel /boot/vmlinuz-2.6.31-16-generic root=UUID=f78ae0e7-6f8e-490b-b68c-6080ae8896c9 ro single
initrd /boot/initrd.img-2.6.31-16-generic

title Ubuntu 9.10, kernel 2.6.31-14-generic
uuid f78ae0e7-6f8e-490b-b68c-6080ae8896c9
kernel /boot/vmlinuz-2.6.31-14-generic root=UUID=f78ae0e7-6f8e-490b-b68c-6080ae8896c9 ro quiet splash
initrd /boot/initrd.img-2.6.31-14-generic

title Ubuntu 9.10, kernel 2.6.31-14-generic (recovery mode)
uuid f78ae0e7-6f8e-490b-b68c-6080ae8896c9
kernel /boot/vmlinuz-2.6.31-14-generic root=UUID=f78ae0e7-6f8e-490b-b68c-6080ae8896c9 ro single
initrd /boot/initrd.img-2.6.31-14-generic

title Chainload into GRUB 2
root f78ae0e7-6f8e-490b-b68c-6080ae8896c9
kernel /boot/grub/core.img

title Ubuntu 9.10, memtest86+
uuid f78ae0e7-6f8e-490b-b68c-6080ae8896c9
kernel /boot/memtest86+.bin

### END DEBIAN AUTOMAGIC KERNELS LIST

=========================== sda2/boot/grub/grub.cfg: ===========================

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

### BEGIN /etc/grub.d/00_header ###
if [ -s /boot/grub/grubenv ]; then
have_grubenv=true
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
saved_entry=${prev_saved_entry}
save_env saved_entry
prev_saved_entry=
save_env prev_saved_entry
fi
insmod ext2
set root=(hd0,6)
search --no-floppy --fs-uuid --set f78ae0e7-6f8e-490b-b68c-6080ae8896c9
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
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/white
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, Linux 2.6.31-14-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,6)
search --no-floppy --fs-uuid --set f78ae0e7-6f8e-490b-b68c-6080ae8896c9
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=f78ae0e7-6f8e-490b-b68c-6080ae8896c9 ro quiet splash
initrd /boot/initrd.img-2.6.31-14-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,6)
search --no-floppy --fs-uuid --set f78ae0e7-6f8e-490b-b68c-6080ae8896c9
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=f78ae0e7-6f8e-490b-b68c-6080ae8896c9 ro single
initrd /boot/initrd.img-2.6.31-14-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ ${timeout} != -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 ###

================================ sda2/boot.ini: ================================

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

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


.0GB: boot/grub/grub.cfg
.0GB: boot/grub/menu.lst
.0GB: boot/initrd.img-2.6.31-14-generic
.0GB: boot/initrd.img-2.6.31-16-generic
.0GB: boot/vmlinuz-2.6.31-14-generic
.0GB: boot/vmlinuz-2.6.31-16-generic

=========================== sdb6/boot/grub/menu.lst: ===========================

# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default saved

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 3

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=f78ae0e7-6f8e-490b-b68c-6080ae8896c9 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=f78ae0e7-6f8e-490b-b68c-6080ae8896c9

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## specify if running in Xen domU or have grub detect automatically
## update-grub will ignore non-xen kernels when running in domU and vice versa
## e.g. indomU=detect
## indomU=true
## indomU=false
# indomU=detect

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title Ubuntu 9.10, kernel 2.6.31-16-generic
uuid f78ae0e7-6f8e-490b-b68c-6080ae8896c9
kernel /boot/vmlinuz-2.6.31-16-generic root=UUID=f78ae0e7-6f8e-490b-b68c-6080ae8896c9 ro quiet splash
initrd /boot/initrd.img-2.6.31-16-generic

title Ubuntu 9.10, kernel 2.6.31-16-generic (recovery mode)
uuid f78ae0e7-6f8e-490b-b68c-6080ae8896c9
kernel /boot/vmlinuz-2.6.31-16-generic root=UUID=f78ae0e7-6f8e-490b-b68c-6080ae8896c9 ro single
initrd /boot/initrd.img-2.6.31-16-generic

title Ubuntu 9.10, kernel 2.6.31-14-generic
uuid f78ae0e7-6f8e-490b-b68c-6080ae8896c9
kernel /boot/vmlinuz-2.6.31-14-generic root=UUID=f78ae0e7-6f8e-490b-b68c-6080ae8896c9 ro quiet splash
initrd /boot/initrd.img-2.6.31-14-generic

title Ubuntu 9.10, kernel 2.6.31-14-generic (recovery mode)
uuid f78ae0e7-6f8e-490b-b68c-6080ae8896c9
kernel /boot/vmlinuz-2.6.31-14-generic root=UUID=f78ae0e7-6f8e-490b-b68c-6080ae8896c9 ro single
initrd /boot/initrd.img-2.6.31-14-generic

title Chainload into GRUB 2
root f78ae0e7-6f8e-490b-b68c-6080ae8896c9
kernel /boot/grub/core.img

title Ubuntu 9.10, memtest86+
uuid f78ae0e7-6f8e-490b-b68c-6080ae8896c9
kernel /boot/memtest86+.bin

### END DEBIAN AUTOMAGIC KERNELS LIST

=========================== sdb6/boot/grub/grub.cfg: ===========================

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

### BEGIN /etc/grub.d/00_header ###
if [ -s /boot/grub/grubenv ]; then
have_grubenv=true
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
saved_entry=${prev_saved_entry}
save_env saved_entry
prev_saved_entry=
save_env prev_saved_entry
fi
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/white
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, Linux 2.6.31-16-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
linux /boot/vmlinuz-2.6.31-16-generic root=/dev/sdb6 ro quiet splash
initrd /boot/initrd.img-2.6.31-16-generic
}
menuentry "Ubuntu, Linux 2.6.31-16-generic (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
linux /boot/vmlinuz-2.6.31-16-generic root=/dev/sdb6 ro single
initrd /boot/initrd.img-2.6.31-16-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
linux /boot/vmlinuz-2.6.31-14-generic root=/dev/sdb6 ro quiet splash
initrd /boot/initrd.img-2.6.31-14-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
linux /boot/vmlinuz-2.6.31-14-generic root=/dev/sdb6 ro single
initrd /boot/initrd.img-2.6.31-14-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Professional (on /dev/sda2)" {
insmod ntfs
set root=(hd0,2)
search --no-floppy --fs-uuid --set 621474fd1474d58f
drivemap -s (hd0) ${root}
chainloader +1
}
### 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 ###

=============================== sdb6/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 defaults 0 0
# / was on /dev/sda6 during installation
UUID=f78ae0e7-6f8e-490b-b68c-6080ae8896c9 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda7 during installation
UUID=c6066569-d7fa-40c1-ad23-ccd784e5eba5 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0

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


.0GB: boot/grub/grub.cfg
.0GB: boot/grub/menu.lst
.0GB: boot/initrd.img-2.6.31-14-generic
.0GB: boot/initrd.img-2.6.31-16-generic
.0GB: boot/vmlinuz-2.6.31-14-generic
.0GB: boot/vmlinuz-2.6.31-16-generic
.0GB: initrd.img
.0GB: initrd.img.old
.0GB: vmlinuz
.0GB: vmlinuz.old

darkod
December 6th, 2009, 10:58 PM
One thing immediately. Why is grub2 installed on sda2? First of all, that's a partition and it's always recommended to have it on MBR of a disk. Second, sda2 is your windws partition, what would grub2 do there?

n4pgw
December 6th, 2009, 11:00 PM
I imagine they are two good questions, but I am too ignorant to know the answers.... can they be fixed?


Buck

darkod
December 6th, 2009, 11:06 PM
Not sure. And that's your XP partition so I wouldn't want to send it to hell. :)
Also this could happen only if you specifically told grub2 to install there, just so you know. You can't blame this on ubuntu. :)
Even without this problem, the partitions layout is rather chaotic. So I'll start with the main question: How big of a problem would it be to reinstall boh XP or Ubuntu? Ubuntu is working if I understood correctly so you might not need to do that, but reinstalling XP (and all software on it) might be the only solution.
You could use Ubuntu to copy the data from XP you need.

oldfred
December 6th, 2009, 11:21 PM
I would try to repair the XP install. You definitely need to overwrite the grub installed there. And how did you get both windows files and grub files in the windows partition. Is that from Wubi - I do not know Wubi.

Our standard link is a simple fixmbr, fixboot since that is all that is usually required but I have seen other commands.

Make sure you have sda set in BIOS to boot so the install of windows to the MBR is to that drive and then switch sdb back to first after you are sure you can boot into windows. update-grub will then find a working windows.

How to restore the Ubuntu/XP/Vista/7 bootloader (Updated for Ubuntu 9.10)
http://ubuntuforums.org/showthread.php?t=1014708

The extra commands I have seen to rebuild from XP install disk:
FIXMBR C:
FIXBOOT C:
COPY [CDDRIVE]:\I386\NTLDR C:\
COPY [CDDRIVE]:\I386\NTDETECT.COM C:\
BOOTCFG /rebuild

presence1960
December 6th, 2009, 11:28 PM
I agree with oldfred, try to repair windows install. Before you boot from the windows install disk be sure to go into BIOS and put sda disk as first disk in the hard disk boot order. If the other disk (sdb) is first in that order windows will attempt to write it's bootloader onto the sdb disk's MBR.

Then for safe measure I would reinstall GRUB 1.97 from the Live CD. See here (https://help.ubuntu.com/community/Grub2#Reinstalling%20from%20LiveCD) for instructions. Make sure you put sdb back as first boot in BIOS and install GRUB to /dev/sdb

n4pgw
December 7th, 2009, 01:29 AM
Darkod,
I probably chose the windows partition because there were two partitions that had stuff on them and only windows booted. OOPS! Oh well, so goes life. I saw a lot when I read the file you had me create. Thank you very much for the help.

OldFred,
I followed the list of commands you showed me. I probably did more than is necessary, but it is working now, so no harm done there. Thank you very much for the info.

Presence1960,
I still need to reinstall the GRUB, but I don't think I need to change the drives. First of all, I can't as the bios doesn't give me that option. I have to press F-12 in the process of booting to select the alternative drive. I would like Grub to work with both windows and Linux and then I would like to learn how to edit it so I can have windows and Linux at the top two positions.

Everyone else:
I am going to leave this as unsolved for the time being until I get GRUB working as it should. While the problem here was annoying, I had no fear that I could not resolve it. I am aware that there are many problems people have had with Grub, Lilo and others but I have never heard of any that were unrepairable. (that's not to say there are none.)

SO, what would happen if I reverse the drives so the 120 GB (Ubuntu) drive is the primary master and the 80GB (XP) is the secondary slave?

Thank you again,
Buck

oldfred
December 7th, 2009, 02:02 AM
BIOS boots first drive. If you still have Pata it will boot the primary master. It used to be you had to reset jumpers on the hard drive but if you have a newer 80 wire cable with two different color connectors you are using cable select and should be just able to reverse them.

With grub2 it seems the easiest way to make windows first is to copy osprober to a lower number or turn off osprober and copy 40_custom to 06_custom, make executable and put entries there.

Lots of links to grub2 info:
https://help.ubuntu.com/community/Grub2#Using%20CLI%20to%20Boot
The Grub 2 Guide (formerly Grub 2 Basics)
http://ubuntuforums.org/showthread.php?t=1195275
https://help.ubuntu.com/community/Grub2
http://members.iinet.net/~herman546/p20.html
http://kubuntuforums.net/forums/index.php?topic=3106368.0
https://help.ubuntu.com/community/Grub2#Reinstalling%20from%20LiveCD
http://www.dedoimedo.com/computers/grub-2.html
Grub2 info by ranch hand and many links to other grub2 info sites
http://ubuntuforums.org/showthread.php?p=8191211#post8191211

n4pgw
December 7th, 2009, 02:21 AM
Currently Grub points to sda which is windows. When windows boot comes up, it displays Windows XP in two configurations. When I boot to Grub, it says WIndows XP but gives me the Windows Boot Loader. Can I not add a line in boot.ini with windows to point to Grub in the same way?


Thanks
Buck

n4pgw
December 8th, 2009, 06:59 PM
This problem isn't solved entirely, but I am going to close it as I have a new problem to solve.

Thanks for all the help.
Buck

n4pgw
December 8th, 2009, 08:16 PM
Final Reply here....

In the process of trying to setup DVD drivers, I accidentally created a location and mounted it that was not needed. When I rebooted, the system said it could not mount something and froze up.

I decided to delete and reinstall Ubuntu on the 120GB internal drive. I have a USB 1/2 TB drive that I have a working copy of Ubuntu on. I booted on the live CD and deleted the Ubuntu partition on the 120 GB drive. Then I ran the install to HDD option and moved the swap partition to the end. I now have a 60 GB Ubuntu partition, a 50GB+ NTFS partition for common data used between Linux and XP and a 5GB linux swap partition.

When I rebooted, I got the Grub loading message, but after a few minutes (maybe more than a few...) it came up with the Grub options and booted to Ubuntu. I went to test it again, and it crashed. This time it said "Unrecognized file system."

I thought I would have to reinstall the Windows Boot loader, but before doing so, I booted directly to the second (120GB) drive. When it came up, I checked for updates and ran them.

After running the updates and rebooting the computer, GRUB stalled out similar to the way it appeared in the beginning of this thread. I then 'Solved" this thread in preparation for creating a new thread, but I got called away for a few hours.

When I returned, Ubuntu was on the screen. I rebooted without the external drive attached and it went to the Grub menu, loaded Ubuntu just fine, then loaded XP just fine (XP boot loader) and again loaded itself.

I thought this was now working (when I started this post) but I now see a new problem.

When I boot to the USB drive (500GB) I get "GRUB loading. error: unknown filesystem
grub rescue>
>

I cannot access the USB Ubuntu, but that is not a problem with the internal version working. I will play with it and see what I can get it to do.

I will probably reinstall the system on it before spending a lot of time troubleshooting it. I will create a new thread if I do.

Thanks again to all who helped.
Buck

oldfred
December 8th, 2009, 08:51 PM
With USB drives the drive numbering sometimes seems to get mixed up. Usually the USB drive becomes the first drive but grub may or may not be installed to it.

You should reinstall grub to the USB drive but be careful which drive is which. If it installs to the hard drive you will only be able to boot the system with the USB plugged in.

n4pgw
January 3rd, 2010, 07:11 PM
Thank you for the links, Old Fred,

One of my tasks is to change the order of the boot listings in Grub.

All is well on two computers (one desktop and one laptop) for now.

Thanks

Buck