PDA

View Full Version : [ubuntu] After installing Ubuntu, startup goes straight to Windows



anjuice
January 9th, 2012, 10:22 AM
Hello everybody, I've had no experience with Ubuntu at all until today. I watched this tutorial http://www.youtube.com/watch?v=73nc_mKkoCI and followed it step by step. I installed using a USB drive. Everything seemed fine, except after restarting once installation was done, it just goes straight to Windows 7. GRUB doesn't show up at all. Any help is appreciated!

C.S.Cameron
January 9th, 2012, 10:58 AM
Can you get grub if you try booting with the USB drive plugged in?

coffeecat
January 9th, 2012, 12:25 PM
Welcome to the forum!

It sounds as though something went wrong with the installation of grub. We need an overview of your system to see what needs to be done, so boot up your live Ubuntu USB, choose 'try Ubuntu' to get to the live desktop, ensure you are connected to the internet, and go to this site:

http://bootinfoscript.sourceforge.net/

Download and run the boot info script - the instructions are on that page - and post the contents of the RESULTS.txt file between
and tags for clarity. The simplest way of doing this is to highlight the output and then click on the http://ubuntuforums.org/images/editor/code.gif button in the message toolbar.

Mark Phelps
January 9th, 2012, 02:32 PM
Looks like that video is showing you how to install Ubuntu using VirtualBox -- at least, the partition name in the video shows "VBOX HardDisk".

Is that what you were doing as well?

Basher101
January 9th, 2012, 02:37 PM
here is a simple way to fix it http://www.upubuntu.com/2011/08/how-to-repairreinstall-grub-boot-loader.html

regards

anjuice
January 10th, 2012, 04:00 AM
Thanks to all your responses :]

C.S.Cameron - It doesn't get into GRUB booting with the USB drive.

Mark Phelps - I actually wasn't using VirtualBox.

Basher101 - Thanks, I'll try that out.

coffeecat, hopefully here's what I needed to get for you.



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 looks
in partition 6 for .
=> Windows is installed in the MBR of /dev/sdb.
=> Syslinux MBR (4.04 and higher) is installed in the MBR of /dev/sdc.
=> Windows is installed in the MBR of /dev/sdd.
=> Windows is installed in the MBR of /dev/sde.

sda1: __________________________________________________ ________________________

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

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: /bootmgr /Boot/BCD

sdb2: __________________________________________________ ________________________

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

sdb3: __________________________________________________ ________________________

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

sdb5: __________________________________________________ ________________________

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

sdb6: __________________________________________________ ________________________

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

sdb7: __________________________________________________ ________________________

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

sdc1: __________________________________________________ ________________________

File system: vfat
Boot sector type: SYSLINUX 4.05 2011-12-09
Boot sector info: Syslinux looks at sector 15336 of /dev/sdc1 for its
second stage. SYSLINUX is installed in the directory.
The integrity check of the ADV area failed. No errors
found in the Boot Parameter Block.
Operating System:
Boot files: /boot/grub/grub.cfg /syslinux/syslinux.cfg /ldlinux.sys

sdd1: __________________________________________________ ________________________

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

sde1: __________________________________________________ ________________________

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

============================ 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
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start Sector End Sector # of Sectors Id System

/dev/sda1 * 2,048 625,139,711 625,137,664 7 NTFS / exFAT / HPFS


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
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start Sector End Sector # of Sectors Id System

/dev/sdb1 * 2,048 206,847 204,800 7 NTFS / exFAT / HPFS
/dev/sdb2 206,848 839,830,762 839,623,915 7 NTFS / exFAT / HPFS
/dev/sdb3 839,831,550 976,771,071 136,939,522 5 Extended
/dev/sdb5 960,045,056 976,771,071 16,726,016 82 Linux swap / Solaris
/dev/sdb6 839,831,552 943,314,943 103,483,392 83 Linux
/dev/sdb7 943,316,992 960,045,055 16,728,064 82 Linux swap / Solaris


Drive: sdc __________________________________________________ ___________________

Disk /dev/sdc: 2013 MB, 2013265920 bytes
16 heads, 15 sectors/track, 16384 cylinders, total 3932160 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/sdc1 * 255 3,932,159 3,931,905 c W95 FAT32 (LBA)


Drive: sdd __________________________________________________ ___________________

Disk /dev/sdd: 1999.7 GB, 1999696297984 bytes
255 heads, 63 sectors/track, 243115 cylinders, total 3905656832 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/sdd1 2,048 3,905,656,831 3,905,654,784 7 NTFS / exFAT / HPFS


Drive: sde __________________________________________________ ___________________

Disk /dev/sde: 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/sde1 63 976,768,064 976,768,002 7 NTFS / exFAT / HPFS


"blkid" output: __________________________________________________ ______________

Device UUID TYPE LABEL

/dev/loop0 squashfs
/dev/sda1 7EB61D88B61D4257 ntfs Media
/dev/sdb1 B0C25C3DC25C09CC ntfs System Reserved
/dev/sdb2 107A5D827A5D658E ntfs
/dev/sdb5 83844e01-a8fc-431e-a3ee-2e8e2ba6388c swap
/dev/sdb6 7f16ba88-dffe-4551-8b7b-10bc558f54a6 ext4
/dev/sdb7 cea01599-bf10-4ba3-a1a4-45bea2075f8e swap
/dev/sdc1 190B-0E38 vfat PENDRIVE
/dev/sdd1 40284A46284A3AE4 ntfs TEH PWNERER
/dev/sde1 54140E3C140E219A ntfs FreeAgent Drive

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

Device Mount_Point Type Options

/dev/loop0 /rofs squashfs (ro,noatime)
/dev/sdc1 /cdrom vfat (ro,noatime,fmask=0022,dmask=0022,codepage=cp437,i ocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/sdd1 /media/TEH PWNERER fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_ permissions)
/dev/sde1 /media/FreeAgent Drive fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_ permissions)
/dev/sr1 /media/WD SmartWare udf (ro,nosuid,nodev,uid=999,gid=999,iocharset=utf8,um ask=0077,dmode=0500,uhelper=udisks)


=========================== sdb6/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='(hd1,msdos6)'
search --no-floppy --fs-uuid --set=root 7f16ba88-dffe-4551-8b7b-10bc558f54a6
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
insmod part_msdos
insmod ext2
set root='(hd1,msdos6)'
search --no-floppy --fs-uuid --set=root 7f16ba88-dffe-4551-8b7b-10bc558f54a6
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=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 3.0.0-12-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd1,msdos6)'
search --no-floppy --fs-uuid --set=root 7f16ba88-dffe-4551-8b7b-10bc558f54a6
linux /boot/vmlinuz-3.0.0-12-generic root=UUID=7f16ba88-dffe-4551-8b7b-10bc558f54a6 ro quiet splash vt.handoff=7
initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry 'Ubuntu, with Linux 3.0.0-12-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd1,msdos6)'
search --no-floppy --fs-uuid --set=root 7f16ba88-dffe-4551-8b7b-10bc558f54a6
echo 'Loading Linux 3.0.0-12-generic ...'
linux /boot/vmlinuz-3.0.0-12-generic root=UUID=7f16ba88-dffe-4551-8b7b-10bc558f54a6 ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.0.0-12-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='(hd1,msdos6)'
search --no-floppy --fs-uuid --set=root 7f16ba88-dffe-4551-8b7b-10bc558f54a6
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd1,msdos6)'
search --no-floppy --fs-uuid --set=root 7f16ba88-dffe-4551-8b7b-10bc558f54a6
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/sdb1)" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set=root B0C25C3DC25C09CC
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 ###
--------------------------------------------------------------------------------

=============================== sdb6/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/sdb6 during installation
UUID=7f16ba88-dffe-4551-8b7b-10bc558f54a6 / ext4 errors=remount-ro 0 1
# swap was on /dev/sdb7 during installation
UUID=cea01599-bf10-4ba3-a1a4-45bea2075f8e none swap sw 0 0
--------------------------------------------------------------------------------

=================== sdb6: 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.0.0-12-generic 2
= boot/vmlinuz-3.0.0-12-generic 1
= initrd.img 2
= vmlinuz 1

=========================== sdc1/boot/grub/grub.cfg: ===========================

--------------------------------------------------------------------------------

if loadfont /boot/grub/font.pf2 ; then
set gfxmode=auto
insmod efi_gop
insmod efi_uga
insmod gfxterm
terminal_output gfxterm
fi

set menu_color_normal=white/black
set menu_color_highlight=black/light-gray

menuentry "Try Ubuntu without installing" {
set gfxpayload=keep
linux /casper/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash --
initrd /casper/initrd.lz
}
menuentry "Install Ubuntu" {
set gfxpayload=keep
linux /casper/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity quiet splash --
initrd /casper/initrd.lz
}
menuentry "Check disc for defects" {
set gfxpayload=keep
linux /casper/vmlinuz boot=casper integrity-check quiet splash --
initrd /casper/initrd.lz
}
--------------------------------------------------------------------------------

========================= sdc1/syslinux/syslinux.cfg: ==========================

--------------------------------------------------------------------------------
# D-I config version 2.0
include menu.cfg
default vesamenu.c32
prompt 0
timeout 50

# If you would like to use the new menu and be presented with the option to install or run from USB at startup, remove # from the following line. This line was commented out (by request of many) to allow the old menu to be presented and to enable booting straight into the Live Environment!
# ui gfxboot bootlogo
--------------------------------------------------------------------------------

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

GiB - GB File Fragment(s)

?? = ?? boot/grub/grub.cfg 1

================= sdc1: Location of files loaded by Syslinux: ==================

GiB - GB File Fragment(s)

?? = ?? ldlinux.sys 1
?? = ?? syslinux/chain.c32 1
?? = ?? syslinux/gfxboot.c32 1
?? = ?? syslinux/syslinux.cfg 1
?? = ?? syslinux/vesamenu.c32 1

============== sdc1: Version of COM32(R) files used by Syslinux: ===============

syslinux/chain.c32 : COM32R module (v4.xx)
syslinux/gfxboot.c32 : COM32R module (v4.xx)
syslinux/vesamenu.c32 : COM32R module (v4.xx)

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

unlzma: Decoder error
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
/home/ubuntu/Desktop/boot_info_script.sh: line 1579: [: 2.73495e+09: integer expression expected

raja.genupula
January 10th, 2012, 08:13 AM
are you getting grub menu if you hold shift key ?

EDIT : I mean hold shift key while your system is booting up to get the grub menu. did you get that ?

anjuice
January 10th, 2012, 09:41 AM
raja.genupula - I've tried holding shift key and also spamming the shift key. Sadly none of those actions bring up GRUB.

coffeecat
January 10th, 2012, 11:06 AM
Grub is installed to the mbr of sda, the 320GB drive, but your Windows and Ubuntu installations are on sdb, the first 500GB drive, and Windows boot code is installed to the mbr of sdb. My guess is that although your 320GB drive is attached to the first motherboard SATA connector, your BIOS is configured to boot from the 500GB drive. Try re-configuring your BIOS to boot from the 320GB sda drive.