PDA

View Full Version : [ubuntu] grub and windows 7



skythra
March 15th, 2010, 10:23 PM
Hi,

I've had windows 7 for some time.

I capped my downloads but i've always got resources to download iso's of linux for free uncapped. So I often to. i've got screenshots of WoW from over 2 years ago of progressing through SSC (specific our first down of vashj) while playing under wine in ubuntu 8.something

I was looking thorough, figured "why not".

I installed ubuntu. A few problems. No worries. Went to boot it after restart. It won't boot ubuntu at all. I change my hdd priorities in the bios menu and make the hdd which has ubuntu the main one now. Cool.

Ubuntu got going.

I upgraded ubuntu, new kernel. My keyboard now takes 5-10 mins to initialise after the computer starts. Ok thats frustrating. I thought when it first started it was broken i'd lost USB support. I wasn't right exactly. USB just takes about 10mins to kick in. It's retarded but whatever. I watch some TV and come back to it. (i already went with a full reinstall, no issues, no issues in pre-OS operations)

I went to load windows to do something regular, complete some uni problems.

No go. I figured, hell i just played with boot order of HDD's maybe it's broken.

So here's my story.

Once upon a time i had a HDD.
It had windows XP on it. In 2009 I installed Windows 7.
The upgrade went well.
I no longer have windows XP.

After windows 7 was installed I bought a new 1TB HDD, for media only.
After windows 7 was installed I found an old 320gb drive and figured this is what my linux can sit on, by itself.
Windows 7 was installed on a 500gb hard drive. By itself and a bunch of media which is mostly disposable.

My problem is this:


skythra@skythra-desktop:~$ sudo grub-mkconfig
Generating 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,1)
search --no-floppy --fs-uuid --set db08e875-953c-4a4b-a8e3-4f05766f9a84
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 ###
Found linux image: /boot/vmlinuz-2.6.31-20-generic
Found initrd image: /boot/initrd.img-2.6.31-20-generic
menuentry "Ubuntu, Linux 2.6.31-20-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set db08e875-953c-4a4b-a8e3-4f05766f9a84
linux /boot/vmlinuz-2.6.31-20-generic root=UUID=db08e875-953c-4a4b-a8e3-4f05766f9a84 ro quiet splash
initrd /boot/initrd.img-2.6.31-20-generic
}
menuentry "Ubuntu, Linux 2.6.31-20-generic (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set db08e875-953c-4a4b-a8e3-4f05766f9a84
linux /boot/vmlinuz-2.6.31-20-generic root=UUID=db08e875-953c-4a4b-a8e3-4f05766f9a84 ro single
initrd /boot/initrd.img-2.6.31-20-generic
}
Found linux image: /boot/vmlinuz-2.6.31-14-generic
Found initrd image: /boot/initrd.img-2.6.31-14-generic
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,1)
search --no-floppy --fs-uuid --set db08e875-953c-4a4b-a8e3-4f05766f9a84
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=db08e875-953c-4a4b-a8e3-4f05766f9a84 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,1)
search --no-floppy --fs-uuid --set db08e875-953c-4a4b-a8e3-4f05766f9a84
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=db08e875-953c-4a4b-a8e3-4f05766f9a84 ro single
initrd /boot/initrd.img-2.6.31-14-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
Found memtest86+ image: /boot/memtest86+.bin
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 ###
Found Microsoft Windows XP Professional on /dev/sdb1
menuentry "Microsoft Windows XP Professional (on /dev/sdb1)" {
insmod ntfs
set root=(hd1,1)
search --no-floppy --fs-uuid --set 3c0893230892db6a
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 ###
done
skythra@skythra-desktop:~$
That isn't windows 7. Thats XP. Windows 7 doesn't use that bootloader anymore. That location is wrong. Loading this gives pretty critical errors.

I have been searching for hours. These are the details given by a shell script:
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 /mnt/boot/grub.
=> Grub 0.97 is installed in the MBR of /dev/sdb and looks on boot drive #2
in partition #1 for /boot/grub/stage2 and /boot/grub/menu.lst.
=> Windows is installed in the MBR of /dev/sdc

sda1: __________________________________________________ _______________________

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

sda2: __________________________________________________ _______________________

File system: Extended Partition
Boot sector type: -
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 7
Boot files/dirs: /boot.ini /Boot/BCD /Windows/System32/winload.exe
/ntldr /NTDETECT.COM

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

Drive: sda ___________________ __________________________________________________ ___

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x0095fa47

Partition Boot Start End Size Id System

/dev/sda1 * 63 585,938,744 585,938,682 83 Linux
/dev/sda2 585,938,745 625,137,344 39,198,600 5 Extended
/dev/sda5 585,938,808 625,137,344 39,198,537 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
Disk identifier: 0x785d18f0

Partition Boot Start End Size Id System

/dev/sdb1 * 2,048 976,771,071 976,769,024 7 HPFS/NTFS


Drive: sdc ___________________ __________________________________________________ ___

Disk /dev/sdc: 1000.2 GB, 1000203804160 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953523055 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x0000bb22

Partition Boot Start End Size Id System



blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/sda1 db08e875-953c-4a4b-a8e3-4f05766f9a84 ext4
/dev/sda5 e8f02243-91dd-4aef-9156-617def3d193d swap
/dev/sdb1 3C0893230892DB6A ntfs DATA

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

Device Mount_Point Type Options

/dev/sda1 / ext4 (rw,errors=remount-ro)
/dev/sdb1 /media/DATA fuseblk (rw,nosuid,nodev,allow_other,default_permissions,b lksize=4096)
/dev/sda1 /mnt ext4 (rw)


=========================== sda1/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,1)
search --no-floppy --fs-uuid --set db08e875-953c-4a4b-a8e3-4f05766f9a84
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-20-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set db08e875-953c-4a4b-a8e3-4f05766f9a84
linux /boot/vmlinuz-2.6.31-20-generic root=UUID=db08e875-953c-4a4b-a8e3-4f05766f9a84 ro quiet splash
initrd /boot/initrd.img-2.6.31-20-generic
}
menuentry "Ubuntu, Linux 2.6.31-20-generic (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set db08e875-953c-4a4b-a8e3-4f05766f9a84
linux /boot/vmlinuz-2.6.31-20-generic root=UUID=db08e875-953c-4a4b-a8e3-4f05766f9a84 ro single
initrd /boot/initrd.img-2.6.31-20-generic
}
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,1)
search --no-floppy --fs-uuid --set db08e875-953c-4a4b-a8e3-4f05766f9a84
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=db08e875-953c-4a4b-a8e3-4f05766f9a84 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,1)
search --no-floppy --fs-uuid --set db08e875-953c-4a4b-a8e3-4f05766f9a84
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=db08e875-953c-4a4b-a8e3-4f05766f9a84 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/sdb1)" {
insmod ntfs
set root=(hd1,1)
search --no-floppy --fs-uuid --set 3c0893230892db6a
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 ###

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

# /etc/fstab: static file system information.
#
# -- This file has been automaticly generated by ntfs-config --
#
# <file system> <mount point> <type> <options> <dump> <pass>

proc /proc proc defaults 0 0
# Entry for /dev/sda1 :
UUID=db08e875-953c-4a4b-a8e3-4f05766f9a84 / ext4 errors=remount-ro 0 1
# Entry for /dev/sda5 :
UUID=e8f02243-91dd-4aef-9156-617def3d193d none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0

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


.1GB: boot/grub/core.img
.2GB: boot/grub/grub.cfg
.5GB: boot/initrd.img-2.6.31-14-generic
.7GB: boot/initrd.img-2.6.31-20-generic
.5GB: boot/vmlinuz-2.6.31-14-generic
.6GB: boot/vmlinuz-2.6.31-20-generic
.7GB: initrd.img
.5GB: initrd.img.old
.6GB: vmlinuz
.5GB: vmlinuz.old

================================ sdb1/boot.ini: ================================

[boot loader]

timeout=5

default=multi(0)disk(0)rdisk(1)partition(1)\WINDOW S

[operating systems]

multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect

I'm not sure what all that is, i've started reading it but it's pretty extensive.

I'm not sure of the details but I'm sure someone knows how to assist :)

Thanks in advance for taking the time to read this,

Skythra

edit:<quote> File system: ntfs
Boot sector type: Windows XP
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows 7
Boot files/dirs: /boot.ini /Boot/BCD /Windows/System32/winload.exe
/ntldr /NTDETECT.COM

</quote> Even just explaining this better would probably give me more ideas. Why is my boot sector type XP but my system windows 7? Is there something i should be changings?

skythra
March 15th, 2010, 10:49 PM
I killed grub with my last grub-mkconfig and a restart.

Neat. All i did was rename boot.ini to backup.boot.ini and then type sudo grub-mkconfig.

After a restart grub didn't load, went into a recovery prompt. Which isn't helpful because it gives you no suggestions on HOW to actually recover it.

I'm just going to install ubuntu again. One last time before i format this drive and recover windows 7.

skythra
March 16th, 2010, 08:05 AM
This forum is too busy, not even 12 hours and my thread is 3 pages back.. I've not managed to get any further, I'm looking for my windows 7 cd and will just recover.

Thanks