Grub cant see windows after installing Mint

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
boyphp

Grub cant see windows after installing Mint

Post by boyphp »

Hi,
I'm a newbie to Mint after being a Ubuntu user for long. I had Windows 7 on my laptop. I installed Mint on a new partition that previously had ubuntu. After installation, I dont see the grub menu. It goes straight to Mint. Here is the output of fdisk:


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
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xec0e54cc

Device Boot Start End Blocks Id System
/dev/sda1 * 153604094 212203519 29299713 5 Extended
Partition 1 does not start on physical sector boundary.
/dev/sda2 206848 153602047 76697600 7 HPFS/NTFS/exFAT [This is C Drive on Win]
/dev/sda4 212203520 625137663 206467072 7 HPFS/NTFS/exFAT[This is D Drive on Win. Its the data partition]
/dev/sda5 153604096 157507583 1951744 82 Linux swap / Solaris [Swap partition]
/dev/sda6 157509632 212203519 27346944 83 Linux [Mint]

Partition table entries are not in disk order

What tweaks should I do to get the grub screen back giving options for the OS? Here is the relevant portion of /boot/grub/grub.cfg:


export linux_gfx_mode
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Linux Mint 13 MATE 32-bit, 3.2.0-23-generic (/dev/sda6)' --class linuxmint --class gnu-linux --class gnu --class os {
recordfail
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set=root 9724c384-827c-47b0-982c-df5812e6338a
linux /boot/vmlinuz-3.2.0-23-generic root=UUID=9724c384-827c-47b0-982c-df5812e6338a ro quiet splash $vt_handoff
initrd /boot/initrd.img-3.2.0-23-generic
}
menuentry 'Linux Mint 13 MATE 32-bit, 3.2.0-23-generic (/dev/sda6) -- recovery mode' --class linuxmint --class gnu-linux --class gnu --class os {
recordfail
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set=root 9724c384-827c-47b0-982c-df5812e6338a
echo 'Loading Linux 3.2.0-23-generic ...'
linux /boot/vmlinuz-3.2.0-23-generic root=UUID=9724c384-827c-47b0-982c-df5812e6338a ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.2.0-23-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/10_lupin ###
### END /etc/grub.d/10_lupin ###

### 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,msdos6)'
search --no-floppy --fs-uuid --set=root 9724c384-827c-47b0-982c-df5812e6338a
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set=root 9724c384-827c-47b0-982c-df5812e6338a
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 ###

Thank you in advance for your inputs :)
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
viking777

Re: Grub cant see windows after installing Mint

Post by viking777 »

If you have used ubuntu you must surely have heard of the command

Code: Select all

sudo update-grub
boyphp

Re: Grub cant see windows after installing Mint

Post by boyphp »

In ubuntu, I almost always have the grub menu after installation so I never needed to run that command.

Anyway, I now get the grub menu after making these changes in /etc/default/grub and running sudo update grub.
#GRUB_HIDDEN_TIMEOUT=0
GRUB_GFXMODE=640x480

Now my problem is whenever I choose Windows 7, I get the message "Error: no such partition".

Since fdisk shows the C partition as :
/dev/sda1 * 153604094 212203519 29299713 5 Extended
Partition 1 does not start on physical sector boundary.
/dev/sda2 206848 153602047 76697600 7 HPFS/NTFS/exFAT [This is C Drive on Win]

I changed the entry in grub.cfg from
set root='(hd0,msdos1)'. to
set root='(hd0,msdos2)'

On reboot, I get Windows Boot Manage
Windows failed to start. A recent hardware or software change might be the cause. To fix this problem:

1. Insert your Windows installation disc and restart your computer.
2. Choose your language settings, and then click "Next."
3. Click "Repair your computer."

If you do not have this disc, contact your system administrator or computer manufacturer for assistance.

File: \Boot\BCD
Status: 0xc0000001
Info: An error occurred while attempting to read the boot configuration data.

What gives? :roll:
Locked

Return to “Installation & Boot”