LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-30-2011, 09:29 AM   #1
akuthia
Member
 
Registered: Oct 2007
Location: triad, nc, usa
Distribution: Ubuntu
Posts: 232

Rep: Reputation: 29
Grub 2 and Windows 7 recognized on wrong device


Ok. so I Had windows 7 installed on a 30 gig partition. Ya woulda thought that'd be enough, but thanks to that OS' desire to install things to C: even when I tell it NOT TO. it wasnt. So I installed Ubuntu, then ran GPARTED, and copied the entire partition to a new one, and deleted the old one. On restart, there IS a windows 7 boot option:

Code:
menuentry "Windows 7 (loader) (on /dev/sda1)" --class windows --class os {
	insmod part_msdos
	insmod ntfs
	set root='(/dev/sda,msdos1)'
	search --no-floppy --fs-uuid --set=root 2C5C118E5C115444
	chainloader +1
}
According to disk utility though, windows is on dev/sda6. What I can't figure out is where/what to edit to change that. I think that i need to change msdos1 to msdos 6, however when I try to change it through the editor in the bootloader, it doesnt work, and doesnt seem to "stick", i try to boot, it comes back to the bootloader, and I go to edit it again and the value is the same.
 
Old 07-30-2011, 09:44 AM   #2
Arcane
Member
 
Registered: May 2006
Location: Latvia, Europe
Distribution: random
Posts: 303

Rep: Reputation: 233Reputation: 233Reputation: 233
Tried reinstalling Grub2 from live mode?
 
Old 07-30-2011, 09:54 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,839

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
Dicking around with Windoze is usually a mugs game. Easier to just expand its partition by moving everything else around. Linux is much more accommodating that way.
Last I looked the Windoze boot code wouldn't boot from a logical partition, but I haven't tried with Win7.

Simplest would be to run update-grub from a terminal - if it finds the Win7 boot files it should rebuild that entry for you. Whether it will actually work (as in boot Win7) will be an interesting question all of its own.
 
Old 07-30-2011, 10:04 AM   #4
akuthia
Member
 
Registered: Oct 2007
Location: triad, nc, usa
Distribution: Ubuntu
Posts: 232

Original Poster
Rep: Reputation: 29
I had tried expanding the partition, for some reason though, even though there was plenty of unallocated space, and other partitions with space, it wouldnt budge.. the good news, it doesnt look like this is grubs fault: it looks like grub is pointing to the windows bootloader ok, but i confused THAT when i copied the partition. Basically, the windows loader is coming back saying "Windows? what wkindows? I aint got no stinking Windows!"

So now i think i need to see if i can edit the windows boot, without doing a MBR reapir from the windows disk, which will kill grub...
 
Old 07-30-2011, 10:09 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,839

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
Read this.
Try the update-grub first though ... might save you a lot of angst.
 
Old 07-30-2011, 10:13 AM   #6
akuthia
Member
 
Registered: Oct 2007
Location: triad, nc, usa
Distribution: Ubuntu
Posts: 232

Original Poster
Rep: Reputation: 29
The problem is that windows keeps its bootloader, and thats what grub-update sees. It looks like I need to do the update to the windows loader, then come back and do grub, again
 
Old 07-30-2011, 10:22 AM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,839

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
Hmmm - if it keeps finding sda1 that implies you didn't really delete it (sda1).
Go to sf.net and get the bootinfoscript - post the RESULTS.txt.

Past midnight here, so if now-one else helps in the meantime I'll check back in the morning.
 
Old 07-30-2011, 10:33 AM   #8
akuthia
Member
 
Registered: Oct 2007
Location: triad, nc, usa
Distribution: Ubuntu
Posts: 232

Original Poster
Rep: Reputation: 29
was I supposed to delete the windows bootloader too? I prefer keeping lots of partitions so i can keep my files and programs straight, so windows took 100 megs for its bootloader, and I had the actual install on another drive...
 
Old 07-30-2011, 01:08 PM   #9
akuthia
Member
 
Registered: Oct 2007
Location: triad, nc, usa
Distribution: Ubuntu
Posts: 232

Original Poster
Rep: Reputation: 29
Anyways here are the results from the script
Code:
                  Boot Info Script 0.60    from 17 May 2011


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

 => Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of 
    the same hard drive for core.img. core.img is at this location and uses an 
    embedded config file:
    
    ---------------------------------------------------------------------------
    search.fs_uuid ce9a1ece-1af2-496b-bca4-f12afdb12fb2 root 
    set 
    prefix=($root)/boot/grub---------------------------------------------------
    -----------------------------.
 => Windows is installed in the MBR of /dev/sdb.

sda1: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Grub2 (v1.99)
    Boot sector info:   Grub2 (v1.99) is installed in the boot sector of sda1 
                       and looks at sector 54192544 of the same hard drive 
                       for core.img. core.img is at this location and looks 
                       for (,msdos2)/boot/grub on this drive. No errors found 
                       in the Boot Parameter Block.
    Operating System:  
    Boot files:        /bootmgr /Boot/BCD

sda2: __________________________________________________________________________

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

sda3: __________________________________________________________________________

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

sda4: __________________________________________________________________________

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

sda5: __________________________________________________________________________

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

sda6: __________________________________________________________________________

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

sdb1: __________________________________________________________________________

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

sdb2: __________________________________________________________________________

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

sdb5: __________________________________________________________________________

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

sdb6: __________________________________________________________________________

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

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

Drive: sda _____________________________________________________________________

Disk /dev/sda: 400.1 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders, total 781422768 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sda1    *          2,048       206,847       204,800   7 NTFS / exFAT / HPFS
/dev/sda2          40,962,048    61,442,047    20,480,000  83 Linux
/dev/sda3          61,442,048   122,882,047    61,440,000  82 Linux swap / Solaris
/dev/sda4         122,895,358   532,435,679   409,540,322   f W95 Extended (LBA)
/dev/sda5         122,895,360   429,755,759   306,860,400   7 NTFS / exFAT / HPFS
/dev/sda6         429,755,823   532,435,679   102,679,857   7 NTFS / exFAT / HPFS


Drive: sdb _____________________________________________________________________

Disk /dev/sdb: 400.1 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders, total 781422768 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sdb1               2,048   307,202,047   307,200,000   7 NTFS / exFAT / HPFS
/dev/sdb2         307,204,094   781,422,591   474,218,498   5 Extended
/dev/sdb5         307,204,096   764,651,519   457,447,424  83 Linux
/dev/sdb6         764,653,568   781,422,591    16,769,024  82 Linux swap / Solaris


"blkid" output: ________________________________________________________________

Device           UUID                                   TYPE       LABEL

/dev/sda1        2C5C118E5C115444                       ntfs       System Reserved
/dev/sda2        8ea33eeb-10d2-45c3-a925-5ca27b62ac33   ext4       
/dev/sda3        c8fbfb11-a202-451a-8021-acec1ae99abc   swap       
/dev/sda5        E426CF0226CED4A8                       ntfs       New Volume
/dev/sda6        E2F041C2F0419DA3                       ntfs       Windows
/dev/sdb1        D4D475CBD475B07A                       ntfs       Programs
/dev/sdb5        ce9a1ece-1af2-496b-bca4-f12afdb12fb2   ext4       
/dev/sdb6        42e4b2a2-6401-43ce-8116-66253883bad0   swap       

================================ Mount points: =================================

Device           Mount_Point              Type       Options

/dev/sda2        /                        ext4       (rw,errors=remount-ro,commit=0)
/dev/sr0         /media/UDF Volume        udf        (ro,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000,iocharset=utf8,umask=0077,dmode=0500)


=========================== sda2/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 video_bochs
  insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos2)'
search --no-floppy --fs-uuid --set=root 8ea33eeb-10d2-45c3-a925-5ca27b62ac33
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos2)'
search --no-floppy --fs-uuid --set=root 8ea33eeb-10d2-45c3-a925-5ca27b62ac33
set locale_dir=($root)/boot/grub/locale
set lang=en_US
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
if background_color 44,0,30; then
  clear
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
if [ ${recordfail} != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Ubuntu, with Linux 2.6.38-8-generic' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	set gfxpayload=$linux_gfx_mode
	insmod part_msdos
	insmod ext2
	set root='(/dev/sda,msdos2)'
	search --no-floppy --fs-uuid --set=root 8ea33eeb-10d2-45c3-a925-5ca27b62ac33
	linux	/boot/vmlinuz-2.6.38-8-generic root=UUID=8ea33eeb-10d2-45c3-a925-5ca27b62ac33 ro   quiet splash vt.handoff=7
	initrd	/boot/initrd.img-2.6.38-8-generic
}
menuentry 'Ubuntu, with Linux 2.6.38-8-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	set gfxpayload=$linux_gfx_mode
	insmod part_msdos
	insmod ext2
	set root='(/dev/sda,msdos2)'
	search --no-floppy --fs-uuid --set=root 8ea33eeb-10d2-45c3-a925-5ca27b62ac33
	echo	'Loading Linux 2.6.38-8-generic ...'
	linux	/boot/vmlinuz-2.6.38-8-generic root=UUID=8ea33eeb-10d2-45c3-a925-5ca27b62ac33 ro single 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.38-8-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='(/dev/sda,msdos2)'
	search --no-floppy --fs-uuid --set=root 8ea33eeb-10d2-45c3-a925-5ca27b62ac33
	linux16	/boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	insmod part_msdos
	insmod ext2
	set root='(/dev/sda,msdos2)'
	search --no-floppy --fs-uuid --set=root 8ea33eeb-10d2-45c3-a925-5ca27b62ac33
	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sda1)" --class windows --class os {
	insmod part_msdos
	insmod ntfs
	set root='(/dev/sda,msdos1)'
	search --no-floppy --fs-uuid --set=root 2C5C118E5C115444
	chainloader +1
}
menuentry "Ubuntu, with Linux 2.6.38-8-generic (on /dev/sdb5)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(/dev/sdb,msdos5)'
	search --no-floppy --fs-uuid --set=root ce9a1ece-1af2-496b-bca4-f12afdb12fb2
	linux /boot/vmlinuz-2.6.38-8-generic root=UUID=ce9a1ece-1af2-496b-bca4-f12afdb12fb2 ro quiet splash vt.handoff=7
	initrd /boot/initrd.img-2.6.38-8-generic
}
menuentry "Ubuntu, with Linux 2.6.38-8-generic (recovery mode) (on /dev/sdb5)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(/dev/sdb,msdos5)'
	search --no-floppy --fs-uuid --set=root ce9a1ece-1af2-496b-bca4-f12afdb12fb2
	linux /boot/vmlinuz-2.6.38-8-generic root=UUID=ce9a1ece-1af2-496b-bca4-f12afdb12fb2 ro single
	initrd /boot/initrd.img-2.6.38-8-generic
}
### 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 ###
--------------------------------------------------------------------------------

=============================== sda2/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
# / was on /dev/sda2 during installation
UUID=8ea33eeb-10d2-45c3-a925-5ca27b62ac33 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda3 during installation
UUID=c8fbfb11-a202-451a-8021-acec1ae99abc none            swap    sw              0       0
# swap was on /dev/sdb6 during installation
UUID=42e4b2a2-6401-43ce-8116-66253883bad0 none            swap    sw              0       0
--------------------------------------------------------------------------------

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

           GiB - GB             File                                 Fragment(s)

  25.841045380 = 27.746611200   boot/grub/core.img                             1
  25.819492340 = 27.723468800   boot/grub/grub.cfg                             1
  20.414039612 = 21.919408128   boot/initrd.img-2.6.38-8-generic               2
  25.837833405 = 27.743162368   boot/vmlinuz-2.6.38-8-generic                  1
  20.414039612 = 21.919408128   initrd.img                                     2
  25.837833405 = 27.743162368   vmlinuz                                        1

=========================== sdb5/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 video_bochs
  insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(/dev/sdb,msdos5)'
search --no-floppy --fs-uuid --set=root ce9a1ece-1af2-496b-bca4-f12afdb12fb2
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(/dev/sdb,msdos5)'
search --no-floppy --fs-uuid --set=root ce9a1ece-1af2-496b-bca4-f12afdb12fb2
set locale_dir=($root)/boot/grub/locale
set lang=en_US
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
if background_color 44,0,30; then
  clear
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
if [ ${recordfail} != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Ubuntu, with Linux 2.6.38-8-generic' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	set gfxpayload=$linux_gfx_mode
	insmod part_msdos
	insmod ext2
	set root='(/dev/sdb,msdos5)'
	search --no-floppy --fs-uuid --set=root ce9a1ece-1af2-496b-bca4-f12afdb12fb2
	linux	/boot/vmlinuz-2.6.38-8-generic root=UUID=ce9a1ece-1af2-496b-bca4-f12afdb12fb2 ro   quiet splash vt.handoff=7
	initrd	/boot/initrd.img-2.6.38-8-generic
}
menuentry 'Ubuntu, with Linux 2.6.38-8-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	set gfxpayload=$linux_gfx_mode
	insmod part_msdos
	insmod ext2
	set root='(/dev/sdb,msdos5)'
	search --no-floppy --fs-uuid --set=root ce9a1ece-1af2-496b-bca4-f12afdb12fb2
	echo	'Loading Linux 2.6.38-8-generic ...'
	linux	/boot/vmlinuz-2.6.38-8-generic root=UUID=ce9a1ece-1af2-496b-bca4-f12afdb12fb2 ro single 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.38-8-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='(/dev/sdb,msdos5)'
	search --no-floppy --fs-uuid --set=root ce9a1ece-1af2-496b-bca4-f12afdb12fb2
	linux16	/boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	insmod part_msdos
	insmod ext2
	set root='(/dev/sdb,msdos5)'
	search --no-floppy --fs-uuid --set=root ce9a1ece-1af2-496b-bca4-f12afdb12fb2
	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sda1)" --class windows --class os {
	insmod part_msdos
	insmod ntfs
	set root='(/dev/sda,msdos1)'
	search --no-floppy --fs-uuid --set=root 2C5C118E5C115444
	chainloader +1
}
menuentry "Ubuntu, with Linux 2.6.38-8-generic (on /dev/sda2)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(/dev/sda,msdos2)'
	search --no-floppy --fs-uuid --set=root 8ea33eeb-10d2-45c3-a925-5ca27b62ac33
	linux /boot/vmlinuz-2.6.38-8-generic root=UUID=8ea33eeb-10d2-45c3-a925-5ca27b62ac33 ro quiet splash vt.handoff=7
	initrd /boot/initrd.img-2.6.38-8-generic
}
menuentry "Ubuntu, with Linux 2.6.38-8-generic (recovery mode) (on /dev/sda2)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(/dev/sda,msdos2)'
	search --no-floppy --fs-uuid --set=root 8ea33eeb-10d2-45c3-a925-5ca27b62ac33
	linux /boot/vmlinuz-2.6.38-8-generic root=UUID=8ea33eeb-10d2-45c3-a925-5ca27b62ac33 ro single
	initrd /boot/initrd.img-2.6.38-8-generic
}
### 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 ###
--------------------------------------------------------------------------------

=============================== sdb5/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
# / was on /dev/sdb5 during installation
UUID=ce9a1ece-1af2-496b-bca4-f12afdb12fb2 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sdb6 during installation
UUID=42e4b2a2-6401-43ce-8116-66253883bad0 none            swap    sw              0       0
--------------------------------------------------------------------------------

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

           GiB - GB             File                                 Fragment(s)

 350.662673950 = 376.521179136  boot/grub/core.img                             1
 158.718921661 = 170.423144448  boot/grub/grub.cfg                             1
 147.041015625 = 157.884088320  boot/initrd.img-2.6.38-8-generic               2
 350.660942078 = 376.519319552  boot/vmlinuz-2.6.38-8-generic                  1
 147.041015625 = 157.884088320  initrd.img                                     2
 350.660942078 = 376.519319552  vmlinuz                                        1

======================== Unknown MBRs/Boot Sectors/etc: ========================

Unknown BootLoader on sda4

00000000  c2 33 ff dd 9e e8 8e 87  f7 e4 ef c9 3d f9 fe 8f  |.3..........=...|
00000010  bd 27 e3 f8 50 9c e7 8a  f3 ce 1d c1 f9 6f 52 5c  |.'..P........oR\|
00000020  ff 25 fd f9 3f 29 ce bf  19 7d ff 1f dd 13 9c ff  |.%..?)...}......|
00000030  a8 7d c1 e1 1f dc 17 9c  ff 13 fd fb d7 bf af 76  |.}.............v|
00000040  fa be e0 5c e8 df 7f ca  7d f9 fe ef bd ff 7e 38  |...\....}.....~8|
00000050  df 38 26 c4 77 f3 df 8a  f4 fe 27 bf c6 af bf fa  |.8&.w.....'.....|
00000060  f5 fe 80 5f f7 e5 af c3  3e ec 9f a4 63 fa 03 ee  |..._....>...c...|
00000070  a8 4e d0 9f 7f d1 1d d1  31 ff 90 fe fc 8f ee 88  |.N......1.......|
00000080  ce ff 35 be a5 3e c9 b7  44 c7 fc 9e df 12 9d f3  |..5..>..D.......|
00000090  07 d0 cf df ec 53 19 f3  e2 53 c1 fd 97 ea df bf  |.....S...S......|
000000a0  e2 53 19 53 f2 40 fe fe  27 1f 08 2d 7e ff 03 19  |.S.S.@..'..-~...|
000000b0  f3 9f 76 20 7f ff 19 0f  85 16 7f d5 43 91 fd 7f  |..v ........C...|
000000c0  5d ff fe df 1e 8a 0c ff  7a 8f 44 e6 7f db 47 a2  |].......z.D...G.|
000000d0  03 7e 77 fd fb cd 23 f9  fe 0f 7a 24 ed ff da 47  |.~w...#...z$...G|
000000e0  02 ef 5f 7e f4 7e 36 22  96 f3 f8 a7 0c 9f 7e 4b  |.._~.~6"......~K|
000000f0  e6 fc 2f fa 96 cc f5 3f  f4 2d a5 cb b7 d4 3f f8  |../....?.-....?.|
00000100  84 c6 7f 28 fd 9d 1e ca  f8 7f d1 a1 8c fb 0f 3c  |...(...........<|
00000110  14 7c fe d4 43 19 ef 5f  7c 28 78 fe db da fe d6  |.|..C.._|(x.....|
00000120  f8 fd 0e bf 1e e5 44 7e  23 e4 44 56 c8 51 00 bf  |......D~#.DV.Q..|
00000130  ff 49 f1 4b 3f 51 9b f1  89 e0 f7 07 7c a2 36 e3  |.I.K?Q......|.6.|
00000140  13 b5 19 f4 f3 7f d2 fe  be f5 58 f0 fb c9 c7 82  |..........X.....|
00000150  df ec b1 e0 f7 ee b1 e0  f7 47 3c 16 fc fe 9e c7  |.........G<.....|
00000160  8a 5f 37 76 66 9f fd 37  82 af cd 34 fa f6 2f d3  |._7vf..7...4../.|
00000170  35 1e ea e3 0f fa 4c de  f9 73 3e 53 fe f5 e3 ef  |5.....L..s>S....|
00000180  3f a4 13 53 74 73 9a e6  67 34 de f7 73 7b bf be  |?..Sts..g4..s{..|
00000190  fc 8e b5 f6 79 37 36 e8  ac f7 6f ea af 9b 1f 1d  |....y76...o.....|
000001a0  58 1b 4d cf 7e d3 5f e3  2e fd ff 0f fb 0f bd 58  |X.M.~._........X|
000001b0  dd fb cc c0 f3 73 2b 2b  a2 c9 6f ff 1b 4b 00 ef  |.....s++..o..K..|
000001c0  ff ff 07 ef ff ff 02 00  00 00 70 51 4a 12 00 ef  |..........pQJ...|
000001d0  ff ff 05 ef ff ff 72 51  4a 12 70 c5 1e 06 00 00  |......rQJ.p.....|
000001e0  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


=============================== StdErr Messages: ===============================

unlzma: Decoder error
unlzma: Decoder error
As i said earlier, sda6 is where windows is actually installed. sda1 is where the windows bootloader started, and where i put grub2 when i installed linux.
 
Old 07-31-2011, 02:55 AM   #10
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,839

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
I didn't even know you could do that - not that I would ever think of installing any Linux software on NTFS.

Interesting setup.
I don't think your problem is with sda1 (which is where the Win7 boot files are), but the fact that those files don't know where you put the other partition - which is the major part of Win7 itself. Like I said, Linux is much more accommodating, it doesn't keep location dependent data in a registry.
I don't know how to help in this situation - M$oft is so fsck'd up with the way they do things, and they don't document it.
 
Old 07-31-2011, 05:13 AM   #11
Arcane
Member
 
Registered: May 2006
Location: Latvia, Europe
Distribution: random
Posts: 303

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by akuthia View Post
{...}As i said earlier, sda6 is where windows is actually installed. sda1 is where the windows bootloader started, and where i put grub2 when i installed linux.
This might be problem. You need put Grub on hard drive itself not partition.
Quote:
The MBR is not located in a partition; it is located at a first sector of the device (physical offset 0), preceding the first partition.
http://en.wikipedia.org/wiki/Master_boot_record
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Not recognized USB device iiiren Linux - Hardware 1 11-08-2009 05:28 AM
Grub booting to wrong Windows partition kryptondog Linux - Software 3 01-20-2006 11:38 AM
USB device not recognized Greek Acrobat Slackware 5 07-25-2005 12:30 PM
CD-R: Device recognized, blank CD in it is not! svar Linux - General 9 09-10-2004 03:11 AM
SuSE sound card recognized, but wrong hindenbergbaby Linux - Newbie 8 02-29-2004 10:24 PM


All times are GMT -5. The time now is 08:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration