[SOLVED] windows grub trouble

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
utkusu

[SOLVED] windows grub trouble

Post by utkusu »

Hi,

I am somewhat a newbie, and I got myself into trouble. I made a fresh install of LMDE alongside with my windows 7. LMDE installer asked me where to install the grub bootloader at the end of install and I picked "/dev/sda" but installer got stuck(froze) "installing grub" forever, so I reboot and start installing again. This time I picked "dev/sda1" as the bootloader installation point. Installation went smooth this time, and I reboot to see that I am grub-rescue. Third time is the charm, I said, I re-installed fresh this time "dev/sda" was my choice, to my surprise installation smooth, Mint worked fine.

But when I try to boot into windows 7 on the grub screen, the screen goes dark for a while then I return to grub screen. So I try again, the same thing. Windows 7 is unreachable. Can you help me out?

here is my fdisk -l, mnt is installed on sda5, windows 7 on sda1 (I guess you can tell):

Code: Select all

sudo fdisk -l

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 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: 0x228d228d

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       29084   233616352+   7  HPFS/NTFS
/dev/sda2           29085       38914    78953473    5  Extended
/dev/sda5           29085       38510    75708416   83  Linux
/dev/sda6           38510       38914     3244032   82  Linux swap / Solaris
And the following is my grub.cfg

Code: Select all

#
# 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
  load_env
fi
set default="2"
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 load_video {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 5b9e7e36-565a-4e0f-97ff-72ece63b3553
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=1024x768
  load_video
  insmod gfxterm
  insmod part_msdos
  insmod ext2
  set root='(/dev/sda,msdos5)'
  search --no-floppy --fs-uuid --set=root 5b9e7e36-565a-4e0f-97ff-72ece63b3553
  set locale_dir=($root)/boot/grub/locale
  set lang=en_CA
  insmod gettext
fi
terminal_output gfxterm
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 5b9e7e36-565a-4e0f-97ff-72ece63b3553
insmod png
if background_image /boot/grub/linuxmint.png; then
  true
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/06_mint_theme ###
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 5b9e7e36-565a-4e0f-97ff-72ece63b3553
insmod png
if background_image /boot/grub/linuxmint.png ; then
  set color_normal=white/black
  set color_highlight=white/light-gray
else
  set menu_color_normal=white/black
  set menu_color_highlight=white/light-gray
fi
### END /etc/grub.d/06_mint_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'LinuxMint GNU/Linux, with Linux 2.6.39-2-amd64' --class linuxmint --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(/dev/sda,msdos5)'
	search --no-floppy --fs-uuid --set=root 5b9e7e36-565a-4e0f-97ff-72ece63b3553
	echo	'Loading Linux 2.6.39-2-amd64 ...'
	linux	/boot/vmlinuz-2.6.39-2-amd64 root=UUID=5b9e7e36-565a-4e0f-97ff-72ece63b3553 ro  vga=773 quiet
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.39-2-amd64
}
menuentry 'LinuxMint GNU/Linux, with Linux 2.6.39-2-amd64 (recovery mode)' --class linuxmint --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(/dev/sda,msdos5)'
	search --no-floppy --fs-uuid --set=root 5b9e7e36-565a-4e0f-97ff-72ece63b3553
	echo	'Loading Linux 2.6.39-2-amd64 ...'
	linux	/boot/vmlinuz-2.6.39-2-amd64 root=UUID=5b9e7e36-565a-4e0f-97ff-72ece63b3553 ro single  vga=773
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.39-2-amd64
}
### END /etc/grub.d/10_linux ###

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

### 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 D6B0B14BB0B1333B
	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 ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
Thank you all
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
utkusu

Re: windows grub trouble

Post by utkusu »

I also made boot-repair create a report: http://paste.ubuntu.com/738854/

anyone?
wayne128

Re: windows grub trouble

Post by wayne128 »

I am somewhat a newbie, and I got myself into trouble. I made a fresh install of LMDE alongside with my windows 7. LMDE installer asked me where to install the grub bootloader at the end of install and I picked "/dev/sda" but installer got stuck(froze) "installing grub" forever, so I reboot and start installing again. This time I picked "dev/sda1" as the bootloader installation point. Installation went smooth this time, and I reboot to see that I am grub-rescue. Third time is the charm, I said, I re-installed fresh this time "dev/sda" was my choice, to my surprise installation smooth, Mint worked fine.

But when I try to boot into windows 7 on the grub screen, the screen goes dark for a while then I return to grub screen. So I try again, the same thing. Windows 7 is unreachable. Can you help me out?

The highlighted in RED got your win7 boot loader messed by grub2.

To regain ability to boot win7, you need to use win7 CD to perform repair. After that, reinstall grub2 again to MBR.

If you do not have win7 CD, read this post, you can get a recovery CD from internet.
http://forums.linuxmint.com/viewtopic.p ... lo#p445076
utkusu

Re: windows grub trouble

Post by utkusu »

thanks for the help. it is solved now. I was suspecting something like that, but I could not make my windows 7 dvd to repair it automatically, then learned about bootrec /FixBoot thing via your link.
Now I need to figure out the samba business. :)

cheers
Locked

Return to “Installation & Boot”