PDA

View Full Version : [ubuntu] Vista only booting into recovery mode after installing from a live USB



nzdreamer55
September 4th, 2010, 05:04 PM
Hello everyone,
So I decided to try Ubuntu from a live USB drive 10.04 LTS on my Toshiba laptop as the windows Vista SP2 was running really slow. I liked it and clicked on the install icon. From there I set it for duel boot and off it went. The install worked great. I then downloaded the startup manager and changed the start up to be default of windows loader. Now when it boots into windows it goes to the windows recovery thing and won't start windows. I've tried repair and no luck.

I know that you will need more info to help me through this so please let me know.

Thanks
Steve

nzdreamer55
September 5th, 2010, 03:53 PM
Hope I'm not being too pushy but maybe this post didn't get seen? I'll just bump it as I'm stuck.

Thanks
Steve

DemonBob
September 5th, 2010, 03:59 PM
post the output of:


sudo fdisk -l


and post the contents of the file: /boot/grub/grub.cfg


sudo gedit /boot/grub/grub.cfg

nzdreamer55
September 5th, 2010, 04:09 PM
Thanks for the help DemonBob Here it is


steve@steve-laptop:~$ sudo fdisk -l
[sudo] password for steve:

Disk /dev/sda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 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: 0x8ce78eb2

Device Boot Start End Blocks Id System
/dev/sda1 1 192 1536000 27 Unknown
Partition 1 does not end on cylinder boundary.
/dev/sda2 * 192 20046 159475324 7 HPFS/NTFS
/dev/sda3 23509 24321 6523904 17 Hidden HPFS/NTFS
/dev/sda4 20046 23509 27821057 5 Extended
/dev/sda5 20046 23361 26627072 83 Linux
/dev/sda6 23361 23509 1192960 82 Linux swap / Solaris

Partition table entries are not in disk order
steve@steve-laptop:~$


FYI I changed the default startup OS back to ubuntu since windows would not start so keep that in mind when reading this

contents of the file: /boot/grub/grub.cfg

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/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="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
}
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 29182734-2480-47c6-8a48-422252549308
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 29182734-2480-47c6-8a48-422252549308
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=5
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
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-24-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 29182734-2480-47c6-8a48-422252549308
linux /boot/vmlinuz-2.6.32-24-generic root=UUID=29182734-2480-47c6-8a48-422252549308 ro quiet splash
initrd /boot/initrd.img-2.6.32-24-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-24-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 29182734-2480-47c6-8a48-422252549308
echo 'Loading Linux 2.6.32-24-generic ...'
linux /boot/vmlinuz-2.6.32-24-generic root=UUID=29182734-2480-47c6-8a48-422252549308 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-24-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 29182734-2480-47c6-8a48-422252549308
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 29182734-2480-47c6-8a48-422252549308
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows Recovery Environment (loader) (on /dev/sda2)" {
insmod ntfs
set root='(hd0,2)'
search --no-floppy --fs-uuid --set eeb2f736b2f7023f
drivemap -s (hd0) ${root}
chainloader +1
}
menuentry "Windows Vista (loader) (on /dev/sda3)" {
insmod ntfs
set root='(hd0,3)'
search --no-floppy --fs-uuid --set f85efdc45efd7c26
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 ###

Thanks for the help in advance

Steve

garvinrick4
September 5th, 2010, 05:09 PM
First open a terminal and run:

sudo update-grubThen do not choose Windows Vista loader from startupmanager that is your recovery partition. It is there and startupmanager does not give you the same sda #'s as the partition in windows to boot from. Usually sda1 is grub boot into OS. and I have no idea why. But I do no that linux reads the recovery partition as Vista. even in Windows 7.

Mine is Windows boot in sda1 and OS in sda2 sda3 is Extended for Linux installs and sda4 is recovery. Yours shows boot flag in sda2.
Downloading this to your DESKTOP and running this code below: This site to DESKTOP http://bootinfoscript.sourceforge.net/

sudo bash ~/Desktop/boot_info_script*.shwill put a text file on desktop that will tell your whole boot.
copy and paste it here then highlight whole thing and click #sign up top
and will put in nice scrolling so not to take up whole page. Lets see what
it says will only take a minute and can fix you up.

nzdreamer55
September 5th, 2010, 05:42 PM
Thanks so much for all the help. I've got to go do family stuff so I'll post back with those things later today.
Again thanks for the help.
Steve

nzdreamer55
September 5th, 2010, 06:04 PM
Here is the output. Hoe I did it right
Steve


Boot Info Script 0.55 dated February 15th, 2010

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

=> Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in
partition #5 for /boot/grub.

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/dirs:

sda2: __________________________________________________ _______________________

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

sda3: __________________________________________________ _______________________

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

sda4: __________________________________________________ _______________________

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

sda5: __________________________________________________ _______________________

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

sda6: __________________________________________________ _______________________

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

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

Drive: sda ___________________ __________________________________________________ ___

Disk /dev/sda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders, total 390721968 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start End Size Id System

/dev/sda1 2,048 3,074,047 3,072,000 27 Hidden HPFS/NTFS
/dev/sda2 * 3,074,048 322,024,695 318,950,648 7 HPFS/NTFS
/dev/sda3 377,667,584 390,715,391 13,047,808 17 Hidden HPFS/NTFS
/dev/sda4 322,025,470 377,667,583 55,642,114 5 Extended
/dev/sda5 322,025,472 375,279,615 53,254,144 83 Linux
/dev/sda6 375,281,664 377,667,583 2,385,920 82 Linux swap / Solaris


blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/sda1 DAEEEFA2EEEF7563 ntfs TOSHIBA SYSTEM VOLUME
/dev/sda2 EEB2F736B2F7023F ntfs Silver
/dev/sda3 F85EFDC45EFD7C26 ntfs HDDRECOVERY
/dev/sda4: PTTYPE="dos"
/dev/sda5 29182734-2480-47c6-8a48-422252549308 ext4
/dev/sda6 85f7e478-4a0b-47e1-9003-7ae6d4f55878 swap
/dev/sda: PTTYPE="dos"

============================ "mount | grep ^/dev output: ===========================

Device Mount_Point Type Options

/dev/sda5 / ext4 (rw,errors=remount-ro)


=========================== sda5/boot/grub/grub.cfg: ===========================

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/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="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
}
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 29182734-2480-47c6-8a48-422252549308
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 29182734-2480-47c6-8a48-422252549308
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=5
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
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-24-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 29182734-2480-47c6-8a48-422252549308
linux /boot/vmlinuz-2.6.32-24-generic root=UUID=29182734-2480-47c6-8a48-422252549308 ro quiet splash
initrd /boot/initrd.img-2.6.32-24-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-24-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 29182734-2480-47c6-8a48-422252549308
echo 'Loading Linux 2.6.32-24-generic ...'
linux /boot/vmlinuz-2.6.32-24-generic root=UUID=29182734-2480-47c6-8a48-422252549308 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-24-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 29182734-2480-47c6-8a48-422252549308
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 29182734-2480-47c6-8a48-422252549308
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows Recovery Environment (loader) (on /dev/sda2)" {
insmod ntfs
set root='(hd0,2)'
search --no-floppy --fs-uuid --set eeb2f736b2f7023f
drivemap -s (hd0) ${root}
chainloader +1
}
menuentry "Windows Vista (loader) (on /dev/sda3)" {
insmod ntfs
set root='(hd0,3)'
search --no-floppy --fs-uuid --set f85efdc45efd7c26
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 ###

=============================== sda5/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/sda5 during installation
UUID=29182734-2480-47c6-8a48-422252549308 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda6 during installation
UUID=85f7e478-4a0b-47e1-9003-7ae6d4f55878 none swap sw 0 0

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


186.5GB: boot/grub/core.img
180.2GB: boot/grub/grub.cfg
186.5GB: boot/initrd.img-2.6.32-24-generic
186.5GB: boot/vmlinuz-2.6.32-24-generic
186.5GB: initrd.img
186.5GB: vmlinuz
=========================== Unknown MBRs/Boot Sectors/etc =======================

Unknown BootLoader on sda4

00000000 0b cf b7 9e 5d 29 55 c5 c5 46 50 c3 eb aa 26 92 |....])U..FP...&.|
00000010 3e 89 a4 88 98 49 b8 08 84 e4 cf 0e 03 90 61 ef |>....I........a.|
00000020 62 64 22 bc 5e ba 85 51 85 12 34 1a 95 1f 14 76 |bd".^..Q..4....v|
00000030 92 58 42 bc 01 a0 0e 7c 03 1c 02 8b 80 7e 48 0c |.XB....|.....~H.|
00000040 4a 45 c6 dc c6 c8 3a 4f 3e e2 18 13 80 4c 80 14 |JE....:O>....L..|
00000050 c5 e8 cd 30 48 1a a3 7e 4c 26 f1 ba bc 87 bf 6c |...0H..~L&.....l|
00000060 d0 00 9c 0d db 00 72 41 ad 00 14 7b d7 48 17 b8 |......rA...{.H..|
00000070 6a 28 03 01 54 84 a6 8e 86 c8 ca 9c 26 8a 0c a0 |j(..T.......&...|
00000080 6e 0e 1b d5 19 74 7d 1b f2 af 08 fb 13 d5 66 51 |n....t}.......fQ|
00000090 4a b5 f7 2a ce 90 2c 06 ad 90 90 03 dc f8 88 ab |J..*..,.........|
000000a0 da 48 21 00 30 75 1b 39 30 21 60 b8 00 30 5b 33 |.H!.0u.90!`..0[3|
000000b0 4c 9f c3 24 36 f4 40 76 58 0d d2 df 11 ae 44 62 |L..$6.@vX.....Db|
000000c0 52 f1 94 77 40 17 c2 c3 e7 15 57 b8 19 f9 9d f9 |R..w@.....W.....|
000000d0 ca 6a ee b5 2c 3e c1 c0 2c 49 5e 00 73 70 e4 2c |.j..,>..,I^.sp.,|
000000e0 cc 48 14 c0 83 fe 00 3b 01 31 5d 81 27 fe 86 31 |.H.....;.1].'..1|
000000f0 1e 04 00 5c 28 10 80 18 30 03 12 81 34 00 bf 04 |...\(...0...4...|
00000100 cf fe d0 08 79 ec 46 fd a0 40 05 02 b0 20 ff 50 |....y.F..@... .P|
00000110 0c 00 1e a8 12 bf f7 be 23 f8 10 00 c8 84 08 5f |........#......_|
00000120 df b9 68 04 b0 02 3e 04 0f d3 02 a0 84 02 c3 09 |..h...>.........|
00000130 80 99 ff 7f 7c 07 28 a1 11 b9 30 03 44 82 10 0a |....|.(...0.D...|
00000140 80 19 02 68 01 01 b7 8d 80 16 17 c1 04 06 40 2c |...h..........@,|
00000150 40 26 7f f3 d1 f0 08 12 08 40 1a 00 7c 09 a0 06 |@&.......@..|...|
00000160 06 e0 1d 82 1f fb 62 18 26 ff eb d1 bf 17 bb 34 |......b.&......4|
00000170 a7 37 ac ea ab e6 5d 07 da 9d 47 3d df c3 cd d7 |.7....]...G=....|
00000180 e0 76 88 1f 46 3d 70 3a 30 76 88 f4 68 7c 23 1f |.v..F=p:0v..h|#.|
00000190 55 3e 8e 78 4e 7a 27 37 d4 71 ad e2 5a be 96 1f |U>.xNz'7.q..Z...|
000001a0 57 36 8d 5c 63 c2 3d 07 cf 53 cc b8 e4 88 bc 6d |W6.\c.=..S.....m|
000001b0 9f 41 8f f1 7f 57 c0 6a 9f 2f c7 e6 4e 03 00 fe |.A...W.j./..N...|
000001c0 ff ff 83 fe ff ff 02 00 00 00 00 98 2c 03 00 fe |............,...|
000001d0 ff ff 05 fe ff ff 02 98 2c 03 00 70 24 00 00 00 |........,..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

garvinrick4
September 5th, 2010, 07:33 PM
Here is the output. Hoe I did it right
Steve


Boot Info Script 0.55 dated February 15th, 2010

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

=> Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in
partition #5 for /boot/grub.

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/dirs:

sda2: __________________________________________________ _______________________

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

sda3: __________________________________________________ _______________________

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

sda4: __________________________________________________ _______________________

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

sda5: __________________________________________________ _______________________

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

sda6: __________________________________________________ _______________________

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

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

Drive: sda ___________________ __________________________________________________ ___

Disk /dev/sda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders, total 390721968 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start End Size Id System

/dev/sda1 2,048 3,074,047 3,072,000 27 Hidden HPFS/NTFS
/dev/sda2 * 3,074,048 322,024,695 318,950,648 7 HPFS/NTFS
/dev/sda3 377,667,584 390,715,391 13,047,808 17 Hidden HPFS/NTFS
/dev/sda4 322,025,470 377,667,583 55,642,114 5 Extended
/dev/sda5 322,025,472 375,279,615 53,254,144 83 Linux
/dev/sda6 375,281,664 377,667,583 2,385,920 82 Linux swap / Solaris


blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/sda1 DAEEEFA2EEEF7563 ntfs TOSHIBA SYSTEM VOLUME
/dev/sda2 EEB2F736B2F7023F ntfs Silver
/dev/sda3 F85EFDC45EFD7C26 ntfs HDDRECOVERY
/dev/sda4: PTTYPE="dos"
/dev/sda5 29182734-2480-47c6-8a48-422252549308 ext4
/dev/sda6 85f7e478-4a0b-47e1-9003-7ae6d4f55878 swap
/dev/sda: PTTYPE="dos"

============================ "mount | grep ^/dev output: ===========================

Device Mount_Point Type Options

/dev/sda5 / ext4 (rw,errors=remount-ro)


=========================== sda5/boot/grub/grub.cfg: ===========================

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/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="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
}
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 29182734-2480-47c6-8a48-422252549308
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 29182734-2480-47c6-8a48-422252549308
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=5
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
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-24-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 29182734-2480-47c6-8a48-422252549308
linux /boot/vmlinuz-2.6.32-24-generic root=UUID=29182734-2480-47c6-8a48-422252549308 ro quiet splash
initrd /boot/initrd.img-2.6.32-24-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-24-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 29182734-2480-47c6-8a48-422252549308
echo 'Loading Linux 2.6.32-24-generic ...'
linux /boot/vmlinuz-2.6.32-24-generic root=UUID=29182734-2480-47c6-8a48-422252549308 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-24-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 29182734-2480-47c6-8a48-422252549308
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 29182734-2480-47c6-8a48-422252549308
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows Recovery Environment (loader) (on /dev/sda2)" {
insmod ntfs
set root='(hd0,2)'
search --no-floppy --fs-uuid --set eeb2f736b2f7023f
drivemap -s (hd0) ${root}
chainloader +1
}
menuentry "Windows Vista (loader) (on /dev/sda3)" {
insmod ntfs
set root='(hd0,3)'
search --no-floppy --fs-uuid --set f85efdc45efd7c26
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 ###

=============================== sda5/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/sda5 during installation
UUID=29182734-2480-47c6-8a48-422252549308 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda6 during installation
UUID=85f7e478-4a0b-47e1-9003-7ae6d4f55878 none swap sw 0 0

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


186.5GB: boot/grub/core.img
180.2GB: boot/grub/grub.cfg
186.5GB: boot/initrd.img-2.6.32-24-generic
186.5GB: boot/vmlinuz-2.6.32-24-generic
186.5GB: initrd.img
186.5GB: vmlinuz
=========================== Unknown MBRs/Boot Sectors/etc =======================

Unknown BootLoader on sda4

00000000 0b cf b7 9e 5d 29 55 c5 c5 46 50 c3 eb aa 26 92 |....])U..FP...&.|
00000010 3e 89 a4 88 98 49 b8 08 84 e4 cf 0e 03 90 61 ef |>....I........a.|
00000020 62 64 22 bc 5e ba 85 51 85 12 34 1a 95 1f 14 76 |bd".^..Q..4....v|
00000030 92 58 42 bc 01 a0 0e 7c 03 1c 02 8b 80 7e 48 0c |.XB....|.....~H.|
00000040 4a 45 c6 dc c6 c8 3a 4f 3e e2 18 13 80 4c 80 14 |JE....:O>....L..|
00000050 c5 e8 cd 30 48 1a a3 7e 4c 26 f1 ba bc 87 bf 6c |...0H..~L&.....l|
00000060 d0 00 9c 0d db 00 72 41 ad 00 14 7b d7 48 17 b8 |......rA...{.H..|
00000070 6a 28 03 01 54 84 a6 8e 86 c8 ca 9c 26 8a 0c a0 |j(..T.......&...|
00000080 6e 0e 1b d5 19 74 7d 1b f2 af 08 fb 13 d5 66 51 |n....t}.......fQ|
00000090 4a b5 f7 2a ce 90 2c 06 ad 90 90 03 dc f8 88 ab |J..*..,.........|
000000a0 da 48 21 00 30 75 1b 39 30 21 60 b8 00 30 5b 33 |.H!.0u.90!`..0[3|
000000b0 4c 9f c3 24 36 f4 40 76 58 0d d2 df 11 ae 44 62 |L..$6.@vX.....Db|
000000c0 52 f1 94 77 40 17 c2 c3 e7 15 57 b8 19 f9 9d f9 |R..w@.....W.....|
000000d0 ca 6a ee b5 2c 3e c1 c0 2c 49 5e 00 73 70 e4 2c |.j..,>..,I^.sp.,|
000000e0 cc 48 14 c0 83 fe 00 3b 01 31 5d 81 27 fe 86 31 |.H.....;.1].'..1|
000000f0 1e 04 00 5c 28 10 80 18 30 03 12 81 34 00 bf 04 |...\(...0...4...|
00000100 cf fe d0 08 79 ec 46 fd a0 40 05 02 b0 20 ff 50 |....y.F..@... .P|
00000110 0c 00 1e a8 12 bf f7 be 23 f8 10 00 c8 84 08 5f |........#......_|
00000120 df b9 68 04 b0 02 3e 04 0f d3 02 a0 84 02 c3 09 |..h...>.........|
00000130 80 99 ff 7f 7c 07 28 a1 11 b9 30 03 44 82 10 0a |....|.(...0.D...|
00000140 80 19 02 68 01 01 b7 8d 80 16 17 c1 04 06 40 2c |...h..........@,|
00000150 40 26 7f f3 d1 f0 08 12 08 40 1a 00 7c 09 a0 06 |@&.......@..|...|
00000160 06 e0 1d 82 1f fb 62 18 26 ff eb d1 bf 17 bb 34 |......b.&......4|
00000170 a7 37 ac ea ab e6 5d 07 da 9d 47 3d df c3 cd d7 |.7....]...G=....|
00000180 e0 76 88 1f 46 3d 70 3a 30 76 88 f4 68 7c 23 1f |.v..F=p:0v..h|#.|
00000190 55 3e 8e 78 4e 7a 27 37 d4 71 ad e2 5a be 96 1f |U>.xNz'7.q..Z...|
000001a0 57 36 8d 5c 63 c2 3d 07 cf 53 cc b8 e4 88 bc 6d |W6.\c.=..S.....m|
000001b0 9f 41 8f f1 7f 57 c0 6a 9f 2f c7 e6 4e 03 00 fe |.A...W.j./..N...|
000001c0 ff ff 83 fe ff ff 02 00 00 00 00 98 2c 03 00 fe |............,...|
000001d0 ff ff 05 fe ff ff 02 98 2c 03 00 70 24 00 00 00 |........,..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

sda2 is your OS and sda3 is your recovery drive. sda1 is something from manufacter like there own little recovery system. Ubuntu looks good in sda5 and looking from boot there from sda is right. But your extended partition sda4 has gotten a boot loader in there when it should not have.
sda4: __________________________________________________ _______________________

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

The unknown should not be there. Now you can boot into Ubuntu and what does it say in
startupmanager where you set it to try to boot in Windows, you have it set to the recovery partition I do believe. sda3 it says it config file but sda2 in fdisk -l.
Let me see about getting boot out of Extended partition it is just there to house Linux partitions and nothing more. Let me no about Windows booting.
Good job with using code tags to get this right.

garvinrick4
September 5th, 2010, 07:52 PM
Let me know what is going on I gave this thread to a user by the name of
oldfred to see about getting the unknown boot out of your Extended partition.
He has a lot of grub knowledge. Let me know if you can boot both Operating Systems.

oldfred
September 5th, 2010, 07:53 PM
The data that is showing as a boot loader in sda4 is just old data. When partitions get moved around some data may not be erased and the script looks for certain data to know what type of boot partition it is or if no data then is says so. But old data may look like an unknown boot loader when it is just old data. I would just leave it.

The osprober often seems to be mis identifying the recovery and the install partitions for windows. If you are booting the wrong one try switching the default. You should be able to do that with startup manager.

The choice of fixing the descriptions is either modifing the grub code which drs305 has ways to do in his links. Or you can just copy the entires into 40_custom and edit them at wil. Then turn off osprober so you do not have double entries.

Total Custom menu:
http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Boot_Problems:Custom_Menu
http://ubuntuforums.org/showthread.php?t=1483827

How to: Create a Customized GRUB2 Screen that is Maintenance Free.
http://ubuntuforums.org/showthread.php?t=1542338

Partial Custom:
I used drs305's command to limit ubuntu entries to two, turned off os_prober so it does not look for other systems and totally customized my 40_custom.
includes line to limit display to two, also hiding of windows recovery partition
Grub 2 Title Tweaks Thread -drs305
http://ubuntuforums.org/showthread.php?t=1287602
In /etc/default/grub I added this:
gksudo gedit /etc/default/grub
GRUB_DISABLE_OS_PROBER=true
or
sudo chmod a-x /etc/grub.d/30_os-prober

garvinrick4
September 5th, 2010, 09:46 PM
Hello everyone,
So I decided to try Ubuntu from a live USB drive 10.04 LTS on my Toshiba laptop as the windows Vista SP2 was running really slow. I liked it and clicked on the install icon. From there I set it for duel boot and off it went. The install worked great. I then downloaded the startup manager and changed the start up to be default of windows loader. Now when it boots into windows it goes to the windows recovery thing and won't start windows. I've tried repair and no luck.

I know that you will need more info to help me through this so please let me know.

Thanks
Steve Ok Steve it seems to change the choice in startupmanager you seem to have choosen the recovery instead of the Operating System. I seems the problem with the Extended partition is no big deal.

nzdreamer55
September 6th, 2010, 04:10 AM
Thanks oldfred



The choice of fixing the descriptions is either modifing the grub code which drs305 has ways to do in his links. Or you can just copy the entires into 40_custom and edit them at wil. Then turn off osprober so you do not have double entries.


So at this stage, I'm kind of lost with the choices that you described and a little unsure of how to go about the coding. Is there any way that someone could walk me through this a little more step by step? I would like to make my computer start up with the grub menu but have windows be the default choice. I would like to have about 5 seconds to choose. How do I turn off osprober? How do I edit the entires of 40_custom?

Steve

oldfred
September 6th, 2010, 04:42 AM
How to: Create a Customized GRUB2 Screen that is Maintenance Free.
http://ubuntuforums.org/showthread.php?t=1542338

Partial Custom:
I used drs305's command to limit ubuntu entries to two, turned off os_prober so it does not look for other systems and totally customized my 40_custom.
includes line to limit display to two, also hiding of windows recovery partition
Grub 2 Title Tweaks Thread -drs305
http://ubuntuforums.org/showthread.php?t=1287602
In /etc/default/grub I added this:
gksudo gedit /etc/default/grub
GRUB_DISABLE_OS_PROBER=true
or
sudo chmod a-x /etc/grub.d/30_os-prober

One way to fix the descriptions is to move the windows entries to 40_custom and edit at will.

I used drs305's command to limit ubuntu entries to two, turned off os_prober so it does not look for other systems and totally customized my 40_custom.
Copy the windows entries from this:
gedit /boot/grub/grub.cfg
Copy them to and edit :
gksudo gedit /etc/grub.d/40_custom

You should still be able to use startup manager but if you want to manually edit grub to have the correct startup.

But Grub 2 also lets you use the title. Suppose your Windows title is "Windows Vista (on /dev/sda1)". Then you can use in /etc/grub/default, and you won't have to edit Grub after kernel updates.

find your windows entry in this and copy to grub default like this Vista entry - If you edit your windows command use the edited copy as this must match the tile exactly:
gedit /boot/grub/grub.cfg
and copy into grub_default line here:
gksudo gedit /etc/default/grub
GRUB_DEFAULT=0
change to comment # or delete old and add new line:
#GRUB_DEFAULT=0
GRUB_DEFAULT="Windows Vista (on /dev/sda1)"
Then do:
sudo update-grub

nzdreamer55
September 6th, 2010, 04:03 PM
Thanks oldfred for the help. I'm trying to follow the steps that you outlined and I wanted someone to look at what I have done before I go further. Here is what I have created so far. I have followed the tutorial on how to create a custom GRUB2 screen but I have not made it executable yet (FYI I'm pretty new to ubuntu so sometimes I use words that I don't understand fully but take from context such as executable).

Here is what I did


#!/bin/sh
exec tail -n +3 $0
# 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.

echo "Adding Ubuntu 10.04" >&2
cat << EOF
menuentry "Ubuntu 10.04" {
set root=(hd0,5)
linux /vmlinuz root=/dev/sda5 ro quiet splash
initrd /initrd.img
}
EOF

echo "Windows Vista (loader)" >&2
cat << EOF
menuentry "Windows Vista (loader) (on /dev/sda2)" {
insmod ntfs
set root='(hd0,2)'
search --no-floppy --fs-uuid --set EEB2F736B2F7023F
chainloader +1
}
EOF

Does this look like it should work based on my previous info?

Thank you again

Steve

oldfred
September 6th, 2010, 04:37 PM
Since you are adding to 40_custom you want to run sudo update-grub and add those line. You then can test before deleting any of the standard lines.

Your entries look ok. I am not sure you need the search line in windows either. Grub uses the set root = to set what partition to boot from but then uses the search to reset it. You really only need one or the other. The reason for search is with many devices the drive number changes so the set root is not always correct. But if you cannot boot use can use e on the grub menu to edit and fix it.

nzdreamer55
September 6th, 2010, 05:31 PM
Since you are adding to 40_custom you want to run sudo update-grub and add those line. You then can test before deleting any of the standard lines.

So I did this and it worked! I can now launch both windows vista or Ubuntu from the grub loader screen! There is a bunch of other stuff still there, but since I got it working I'm not changing a thing.


Your entries look ok. I am not sure you need the search line in windows either.

Can you tell me what line this is?


Grub uses the set root = to set what partition to boot from but then uses the search to reset it.

So I'm kind of confused here.


You really only need one or the other. The reason for search is with many devices the drive number changes so the set root is not always correct.

So are you saying that if there was another drive present one time (say a removable one, or a network one) that Grub should use the search to reset what grub will use the next time it runs?

Thanks again for the help.

Steve

oldfred
September 6th, 2010, 11:21 PM
search --no-floppy --fs-uuid --set EEB2F736B2F7023F

Above is your search line.

I installed to a USB flash drive from a flash drive and have 3 SATA drives. The flash mounted as sdf & sdg. I am not sure where sdd was, but it was missing. I removed the install from sdf, but then sdg would not boot. I think the search failed since it saw several empty drives and stopped looking and the set root failed since on reboot it made the original sdg as sdf and grub had the wrong numbers. I was able to use the e and edit the set root and it booted just fine. I knew it would work as even with the wrong set root I could boot the flash in my portable which sees it as sdb and the set root is wrong but the search works.

Long story it uses either to try to boot but as long as one is correct it will work.