Unable to access Windows partition, instead boots directly into Ubuntu
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Unable to access Windows partition, instead boots directly into Ubuntu
Hello,
The Problem: Though I briefly (a couple days) had the windows boot manager provide the option to boot into either Ubuntu 12.04 or Windows 7, now my computer boots directly into Ubuntu 12.04, without the option to choose between the two.
to use the windows boot loader rather than GRUB, so I set up the windows bootloader and got it working, much like it is displayed in that link. Unfortunately, what seemed to happen was similar to what using the windows boot loader was trying to prevent: the computer boots directly to ubuntu without showing any boot menu.
I checked to see if I simply deleted my windows partition, but upon checking the Disk Utility I see the NTFS Filesystem alongside my Ext4 Filesystem. So, to my (very) limited knowledge, it seems like it's there.
This (http://www.howtogeek.com/howto/33433...ubuntu-update/) seemed like it would be a relevant course of action, but when I entered the command into the terminal to rebuildbcd, the "total number of identified windows installations" was 0, rather than 1. This made me wonder again what the state of windows was.
My Specs:
I'm using an HP Pavilion g7-1167dx Notebook PC,
Ubuntu 12.04 64-bit
Kernel Linux 3.2.0-25-generic
GNOME 3.4.1
3.6GB RAM
AMD Phenom II P960 Quad-Core Processor x4
***
I'd be happy to clarify more, and I'd really appreciate the help in figuring this out. Thanks!
Boot into Ubuntu, then, as root, run usr/sbin/update-grub. It will call a script named os-prober. Hopefully, that will pick up the windows installation, and rewrite the grub config to show windows in the boot menu. It will probably show windows by the partition (e.g. /dev/sda?) rather than by the name Windows.
There's nothing wrong with your Windows installation, as long as that partition is there. You said you didn't install Grub, but it acts like you did. I'd reccommend using Grub and setting it up from within Ubuntu, which is easy to do. Using the Windows bootloader is much harder, it is not designed to multiboot non-MS OSes. If you want to, it's easy to restore the Windows bootloader, just boot up the Windows install CD, choose "repair your computer", then choose the advanced options to get a command line. Run "bootrec /fixboot" and then "bootrec /fixmbr" (no quotes, of course), and Windows will be back, and you can set it up the way you did in the first place, if that's what you want to do.
Last edited by guyonearth; 07-08-2012 at 07:27 PM.
Sounds ominous - to avoid a lot of guessing, go here, do as it says and post the RESULTS.txt it generates.
Thanks for the help thus far .
Note: When running the script, on the terminal, it read: "gawk" could not be found, using "busybox awk" instead.
OK, here's what RESULTS.txt said:
Code:
Boot Info Script 0.61 [1 April 2012]
============================= 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 looks
for (,msdos5)/boot/grub on this drive.
sda1: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows Vista/7: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /bootmgr /Boot/BCD
sda2: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows Vista/7: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows 7
Boot files: /Windows/System32/winload.exe
sda3: __________________________________________________________________________
File system: Extended Partition
Boot sector type: Unknown
Boot sector info:
sda5: __________________________________________________________________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 12.04 LTS
Boot files: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img
sda6: __________________________________________________________________________
File system: swap
Boot sector type: -
Boot sector info:
sda4: __________________________________________________________________________
File system: vfat
Boot sector type: Windows 7: FAT32
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files:
============================ Drive/Partition Info: =============================
Drive: sda _____________________________________________________________________
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 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 409,599 407,552 7 NTFS / exFAT / HPFS
/dev/sda2 409,600 303,704,521 303,294,922 7 NTFS / exFAT / HPFS
/dev/sda3 303,706,110 976,560,127 672,854,018 5 Extended
/dev/sda5 303,706,112 968,706,047 664,999,936 83 Linux
/dev/sda6 968,708,096 976,560,127 7,852,032 82 Linux swap / Solaris
/dev/sda4 976,560,128 976,771,119 210,992 c W95 FAT32 (LBA)
"blkid" output: ________________________________________________________________
Device UUID TYPE LABEL
/dev/sda1 F458BF2458BEE490 ntfs SYSTEM
/dev/sda2 E4827ECA827EA0AA ntfs
/dev/sda4 0839-9F7F vfat HP_TOOLS
/dev/sda5 a16ddd6c-3c10-4cb1-94d8-b459af35a360 ext4
/dev/sda6 547cf5a0-d5cc-4aaa-a3ca-a6454ad5d2f9 swap
/dev/sr0 udf UDF Volume
================================ Mount points: =================================
Device Mount_Point Type Options
/dev/sda5 / ext4 (rw,errors=remount-ro)
/dev/sr0 /media/UDF Volume udf (ro,nosuid,nodev,uid=1000,gid=1000,iocharset=utf8,umask=0077,dmode=0500,uhelper=udisks)
=========================== sda5/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='(hd0,msdos5)'
search --no-floppy --fs-uuid --set=root a16ddd6c-3c10-4cb1-94d8-b459af35a360
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set=root a16ddd6c-3c10-4cb1-94d8-b459af35a360
set locale_dir=($root)/boot/grub/locale
set lang=en_US
insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ]; then
set timeout=-1
else
set timeout=0
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 ###
function gfxmode {
set gfxpayload="${1}"
if [ "${1}" = "keep" ]; then
set vt_handoff=vt.handoff=7
else
set vt_handoff=
fi
}
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 3.2.0-26-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set=root a16ddd6c-3c10-4cb1-94d8-b459af35a360
linux /boot/vmlinuz-3.2.0-26-generic root=UUID=a16ddd6c-3c10-4cb1-94d8-b459af35a360 ro quiet splash $vt_handoff
initrd /boot/initrd.img-3.2.0-26-generic
}
menuentry 'Ubuntu, with Linux 3.2.0-26-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set=root a16ddd6c-3c10-4cb1-94d8-b459af35a360
echo 'Loading Linux 3.2.0-26-generic ...'
linux /boot/vmlinuz-3.2.0-26-generic root=UUID=a16ddd6c-3c10-4cb1-94d8-b459af35a360 ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.2.0-26-generic
}
submenu "Previous Linux versions" {
menuentry 'Ubuntu, with Linux 3.2.0-25-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set=root a16ddd6c-3c10-4cb1-94d8-b459af35a360
linux /boot/vmlinuz-3.2.0-25-generic root=UUID=a16ddd6c-3c10-4cb1-94d8-b459af35a360 ro quiet splash $vt_handoff
initrd /boot/initrd.img-3.2.0-25-generic
}
menuentry 'Ubuntu, with Linux 3.2.0-25-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set=root a16ddd6c-3c10-4cb1-94d8-b459af35a360
echo 'Loading Linux 3.2.0-25-generic ...'
linux /boot/vmlinuz-3.2.0-25-generic root=UUID=a16ddd6c-3c10-4cb1-94d8-b459af35a360 ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.2.0-25-generic
}
menuentry 'Ubuntu, with Linux 3.2.0-23-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set=root a16ddd6c-3c10-4cb1-94d8-b459af35a360
linux /boot/vmlinuz-3.2.0-23-generic root=UUID=a16ddd6c-3c10-4cb1-94d8-b459af35a360 ro quiet splash $vt_handoff
initrd /boot/initrd.img-3.2.0-23-generic
}
menuentry 'Ubuntu, with Linux 3.2.0-23-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set=root a16ddd6c-3c10-4cb1-94d8-b459af35a360
echo 'Loading Linux 3.2.0-23-generic ...'
linux /boot/vmlinuz-3.2.0-23-generic root=UUID=a16ddd6c-3c10-4cb1-94d8-b459af35a360 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/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,msdos5)'
search --no-floppy --fs-uuid --set=root a16ddd6c-3c10-4cb1-94d8-b459af35a360
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set=root a16ddd6c-3c10-4cb1-94d8-b459af35a360
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='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root F458BF2458BEE490
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 ###
--------------------------------------------------------------------------------
=============================== sda5/etc/fstab: ================================
--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid' 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/sda5 during installation
UUID=a16ddd6c-3c10-4cb1-94d8-b459af35a360 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda6 during installation
UUID=547cf5a0-d5cc-4aaa-a3ca-a6454ad5d2f9 none swap sw 0 0
--------------------------------------------------------------------------------
=================== sda5: Location of files loaded by Grub: ====================
GiB - GB File Fragment(s)
= boot/grub/core.img 1
= boot/grub/grub.cfg 1
= boot/initrd.img-3.2.0-23-generic 2
= boot/initrd.img-3.2.0-25-generic 2
= boot/initrd.img-3.2.0-26-generic 2
= boot/vmlinuz-3.2.0-23-generic 1
= boot/vmlinuz-3.2.0-25-generic 1
= boot/vmlinuz-3.2.0-26-generic 2
= initrd.img 2
= initrd.img.old 2
= vmlinuz 2
= vmlinuz.old 1
======================== Unknown MBRs/Boot Sectors/etc: ========================
Unknown BootLoader on sda3
00000000 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
*
000001b0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00 fe |................|
000001c0 ff ff 83 fe ff ff 02 00 00 00 00 18 a3 27 00 fe |.............'..|
000001d0 ff ff 05 fe ff ff 02 18 a3 27 00 d8 77 00 00 00 |.........'..w...|
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
========= Devices which don't seem to have a corresponding hard drive: =========
sdb
=============================== StdErr Messages: ===============================
xz: (stdin): Compressed data is corrupt
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in
awk: cmd. line:36: Math support is not compiled in
You have the Ubuntu Grub in the master boot record pointing to sda5 and Ubuntus Grub files which are there. You also have an entry for windows onsda1 in the grub.cfg file and it looks correct as does the UUID number. Have you used the down arrows when you get to the boot menu to see if windows is there as it would be entry number 9 and likely not showing without scrolling down. Other than that, I can't see any problems although I don't know what boot files you would need on windows/sda1.
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,900
Rep:
From memory Ubuntu doesn't show GRUB on boot up, if you want to see GRUB so you can select Windows you need to press Shift before GRUB would theoretically appear.
If you want this to occur each time you boot the machine you will need to change some settings in /etc/default/grub. Find the line that has
Code:
GRUB_HIDDEN_TIMEOUT
and put a # (called a comment) in front of it so it looks like
From memory Ubuntu doesn't show GRUB on boot up, if you want to see GRUB so you can select Windows you need to press Shift before GRUB would theoretically appear.
If you want this to occur each time you boot the machine you will need to change some settings in /etc/default/grub. Find the line that has
Code:
GRUB_HIDDEN_TIMEOUT
and put a # (called a comment) in front of it so it looks like
Code:
#GRUB_HIDDEN_TIMEOUT
save the file and then in a terminal run
Code:
sudo update-grub
Now restart your machine to make sure it works.
It seems like I already commented GRUB_HIDDEN_TIMEOUT... but rather than leave things unclear, I'll show you the contents of the file...
Code:
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
Thanks for all the help. I thought I posted a response to this a while ago, but I guess I didn't. It turned out that, with the GRUB_TIMEOUT being 0, it was booting into grub, but it would immediately choose Ubuntu. Having changed it to a reasonable time (i.e., 15), I was able to view grub and have that option.
Rather simple, but I appreciate all your patience in helping me out!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.