PDA

View Full Version : [ubuntu] How to Recover Grub after Windows Installation & Deinstallation?



jls_
March 23rd, 2011, 11:24 PM
Hey guys,
first of all, as this is my first post, thanks for this great forum! It gave me a lot of help in the past and i hope it will aswell in the future.
I used to be able to fix all my problems by browsing this forum, but i am now at a point where i cannot proceed any further due to the fact that i'm running out of information.

Following situation:
I first installed Win7 x64 (80 gb hdd), after that Ubuntu 10.10 x64 (on a 2nd 500 gb hdd)... when I booted my PC up i was presented with the Grub Loader showing ubuntu and Win7. But then I wanted to try something out (different story) and shrunk my ubuntu partition (500 gb hdd -> 400 gb ubuntu -> 100 gb new partition). That new partition was formated to ntfs and i went on and installed windows xp x64. When i rebooted it automatically booted into XP without showing the grub loader. After I figured out that XP wouldnt solve the problem i had, i formated its partition (using the ubuntu live cd) and gave the space i used for xp (100 gb) back to the ubuntu partition. Then I rebooted and i was presented with this error (grub menu doesnt show up):



Windows could not start because the following file is missing or corrupt:
<Windows root>\system32\ntoskrnl.exe
Please re-install a copy of the above file.


I'm assuming that's from the XP partition. Of course it cannot find the file, because i formated that partition. I tried the solutions as described here https://help.ubuntu.com/community/Grub2#Reinstalling%20from%20LiveCD and here https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows
After the last command (installing grub) it took about 3-5 seconds and echo'd:


Installation finished. No error reported.

but after Rebooting it simply still gave me the same error and doesnt show the grub boot menu.

I'm in really serious need in fast help as soon as possible!

thanks in advance! :)

Hippytaff
March 23rd, 2011, 11:30 PM
Hi an welcome

Can you boot from a live CD or usb and post the Results.txt generated by running the script found here (http://sourceforge.net/projects/bootinfoscript/)

I'm certainly not an expert with this, but some people here are and that info will help them help out :-)

jls_
March 24th, 2011, 12:11 AM
Thanks for your fast reply!

Here is the output from the Results.txt



Boot Info Script 0.55 dated February 15th, 2010

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

=> Windows is installed in the MBR of /dev/sda
=> No boot loader is installed in the MBR of /dev/sdb
=> Grub 2 is installed in the MBR of /dev/sdc and looks on the same drive in
partition #1 for (,msdos1)/boot/grub.
=> No boot loader is installed in the MBR of /dev/sdd

sda1: __________________________________________________ _______________________

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

sdb1: __________________________________________________ _______________________

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

sdc1: __________________________________________________ _______________________

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

sdc2: __________________________________________________ _______________________

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

sdc5: __________________________________________________ _______________________

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

sdd1: __________________________________________________ _______________________

File system: vfat
Boot sector type: BSD4.4: Fat32
Boot sector info: According to the info in the boot sector, sdd1 starts
at sector 0. But according to the info from fdisk,
sdd1 starts at sector 40.
Operating System:
Boot files/dirs:

sdd2: __________________________________________________ _______________________

File system: vfat
Boot sector type: BSD4.4: Fat32
Boot sector info: According to the info in the boot sector, sdd2 starts
at sector 0. But according to the info from fdisk,
sdd2 starts at sector 411648.
Operating System:
Boot files/dirs:

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

Drive: sda ___________________ __________________________________________________ ___

Disk /dev/sda: 74.4 GB, 74355769344 bytes
255 heads, 63 sectors/track, 9039 cylinders, total 145226112 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 * 63 145,195,469 145,195,407 7 HPFS/NTFS


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 End Size Id System

/dev/sdb1 63 976,768,064 976,768,002 7 HPFS/NTFS


Drive: sdc ___________________ __________________________________________________ ___

Disk /dev/sdc: 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 End Size Id System

/dev/sdc1 2,048 937,164,799 937,162,752 83 Linux
/dev/sdc2 937,166,846 976,771,071 39,604,226 5 Extended
/dev/sdc5 937,166,848 976,771,071 39,604,224 82 Linux swap / Solaris


Drive: sdd ___________________ __________________________________________________ ___

Disk /dev/sdd: 500.1 GB, 500107860992 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773166 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start End Size Id System

/dev/sdd1 1 409,639 409,639 ee GPT
/dev/sdd2 411,648 976,773,119 976,361,472 b W95 FAT32


GUID Partition Table detected.

Partition Start End Size System
/dev/sdd1 40 409,639 409,600 System/Boot Partition
/dev/sdd2 411,648 976,773,119 976,361,472 Linux or Data

blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/loop0 squashfs
/dev/sda1 8816734B167338F0 ntfs
/dev/sda: PTTYPE="dos"
/dev/sdb1 241C7D251C7CF362 ntfs Data Drive
/dev/sdb: PTTYPE="dos"
/dev/sdc1 76b04ee2-9d8c-450b-aff1-e98d1ba18833 ext4
/dev/sdc2: PTTYPE="dos"
/dev/sdc5 ae0f7636-23ac-4ae8-a4ca-9793bf7653f1 swap
/dev/sdc: PTTYPE="dos"
/dev/sdd1 70D6-1701 vfat EFI
/dev/sdd2 632A-1C05 vfat 500_EXTERN
/dev/sdd: PTTYPE="gpt"

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

Device Mount_Point Type Options

aufs / aufs (rw)
/dev/sr0 /cdrom iso9660 (ro,noatime)
/dev/loop0 /rofs squashfs (ro,noatime)
/dev/sdc1 /media/76b04ee2-9d8c-450b-aff1-e98d1ba18833 ext4 (rw,nosuid,nodev,uhelper=udisks)
/dev/sdd2 /media/500_EXTERN vfat (rw,nosuid,nodev,uhelper=udisks,uid=999,gid=999,sh ortname=mixed,dmask=0077,utf8=1,showexec,flush)
/dev/sda1 /media/8816734B167338F0 fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_ permissions)


================================ sda1/boot.ini: ================================

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(1)partition(2)\WINDOW S
[operating systems]
multi(0)disk(0)rdisk(1)partition(2)\WINDOWS="Windows XP Professional x64 Edition" /noexecute=optin /fastdetect

=========================== sdc1/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 part_msdos
insmod ext2
set root='(hd2,msdos1)'
search --no-floppy --fs-uuid --set 76b04ee2-9d8c-450b-aff1-e98d1ba18833
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd2,msdos1)'
search --no-floppy --fs-uuid --set 76b04ee2-9d8c-450b-aff1-e98d1ba18833
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
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
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.35-27-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd2,msdos1)'
search --no-floppy --fs-uuid --set 76b04ee2-9d8c-450b-aff1-e98d1ba18833
linux /boot/vmlinuz-2.6.35-27-generic root=UUID=76b04ee2-9d8c-450b-aff1-e98d1ba18833 ro quiet splash
initrd /boot/initrd.img-2.6.35-27-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-27-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd2,msdos1)'
search --no-floppy --fs-uuid --set 76b04ee2-9d8c-450b-aff1-e98d1ba18833
echo 'Loading Linux 2.6.35-27-generic ...'
linux /boot/vmlinuz-2.6.35-27-generic root=UUID=76b04ee2-9d8c-450b-aff1-e98d1ba18833 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-27-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd2,msdos1)'
search --no-floppy --fs-uuid --set 76b04ee2-9d8c-450b-aff1-e98d1ba18833
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=76b04ee2-9d8c-450b-aff1-e98d1ba18833 ro quiet splash
initrd /boot/initrd.img-2.6.35-22-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd2,msdos1)'
search --no-floppy --fs-uuid --set 76b04ee2-9d8c-450b-aff1-e98d1ba18833
echo 'Loading Linux 2.6.35-22-generic ...'
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=76b04ee2-9d8c-450b-aff1-e98d1ba18833 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-22-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='(hd2,msdos1)'
search --no-floppy --fs-uuid --set 76b04ee2-9d8c-450b-aff1-e98d1ba18833
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd2,msdos1)'
search --no-floppy --fs-uuid --set 76b04ee2-9d8c-450b-aff1-e98d1ba18833
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)" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set 8816734b167338f0
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 ###

=============================== sdc1/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
/dev/sdb1 /media/Data_Drive ntfs errors=remount-ro 0 1
# swap was on /dev/sdb5 during installation
UUID=ae0f7636-23ac-4ae8-a4ca-9793bf7653f1 none swap sw 0 0
sudo nano /etc/fstab

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


14.1GB: boot/grub/core.img
14.2GB: boot/grub/grub.cfg
77.9GB: boot/initrd.img-2.6.35-22-generic
.9GB: boot/initrd.img-2.6.35-27-generic
.5GB: boot/vmlinuz-2.6.35-22-generic
5.9GB: boot/vmlinuz-2.6.35-27-generic
.9GB: initrd.img
77.9GB: initrd.img.old
5.9GB: vmlinuz
.5GB: vmlinuz.old
=========================== Unknown MBRs/Boot Sectors/etc =======================

Unknown BootLoader on sdc2

00000000 da e7 9d 89 c2 d6 f6 8a 56 b2 4a d7 6f 69 26 f4 |........V.J.oi&.|
00000010 ee b7 4d 74 f3 30 ee 64 2a ce ad b5 55 18 80 a0 |..Mt.0.d*...U...|
00000020 e1 57 1c 7c b9 c0 e4 f2 70 06 4f 6a 62 6a 86 3f |.W.|....p.Ojbj.?|
00000030 99 9d 95 22 50 00 27 e5 20 70 0e d0 41 6c 7b f3 |..."P.'. p..Al{.|
00000040 d2 be 66 54 f9 92 69 24 a2 e2 a5 d1 5f bb b7 e0 |..fT..i$...._...|
00000050 c9 a5 3a 94 e7 15 26 d5 94 97 7b c9 6b 74 df 4e |..:...&...{.kt.N|
00000060 56 ac ee b6 6b 71 53 5f 54 78 9c 5c 67 73 10 ac |V...kqS_Tx.\gs..|
00000070 71 b4 0c 1f 99 b8 18 5c fa 9e a4 76 cd 5b b5 f1 |q......\...v.[..|
00000080 12 ec 44 f3 1a 27 dc ca d1 fc a4 8e 78 90 80 49 |..D..'......x..I|
00000090 da f8 ca 9e 7f bb e8 28 9d 1f 7e 3a 2b 74 bf 4b |.......(..~:+t.K|
000000a0 3d 6d fa 33 a7 db b6 e2 ef 74 b4 ba 5d 17 e6 fc |=m.3.....t..]...|
000000b0 fd 49 d7 5a 8c ab b3 7c d8 c2 ed 61 96 24 9e 58 |.I.Z...|...a.$.X|
000000c0 8c e0 e7 9c f2 00 38 e3 9e 56 6b b5 65 f9 40 2a |......8..Vk.e.@*|
000000d0 15 99 02 05 20 28 23 71 ea 06 46 46 7a 7b 02 69 |.... (#q..FFz{.i|
000000e0 d4 8b b2 69 5b 47 b7 7b 5f cb d6 e3 8c fd a4 ae |...i[G.{_.......|
000000f0 df c3 ae be 7d 3e 4f ee 0b 79 13 73 9c 82 3e 65 |....}>O..y.s..>e|
00000100 39 50 76 b0 3f dd 27 af d7 a8 e7 04 62 96 eb 51 |9Pv.?.'.....b..Q|
00000110 8f 25 10 93 e5 8d ee db 78 c8 f9 76 76 25 81 20 |.%......x..vv%. |
00000120 13 8c 76 dd c1 ac d2 97 3e ad dd 24 f7 be 97 66 |..v.....>..$...f|
00000130 b8 2a d1 8a 6f de 4d 4d b5 a6 b7 49 79 f4 dc cf |.*..o.MM...Iy...|
00000140 be 9b e6 0f 96 28 ea b2 88 c7 45 04 63 a1 6d b9 |.....(....E.c.m.|
00000150 e0 93 cf 73 8c f7 cf ba be 84 ef c2 b3 19 5d 88 |...s..........].|
00000160 09 8c a6 3a b4 7d 70 3a 60 70 48 27 07 19 34 e1 |...:.}p:`pH'..4.|
00000170 16 a4 f6 d9 5d df a3 7b ed d1 97 5a b7 bf 7d 5a |....]..{...Z..}Z|
00000180 69 d9 db 6b 25 7b fa eb 62 05 75 2a 0c 8c 14 75 |i..k%{..b.u*...u|
00000190 20 86 cb 67 b3 9c 8e 47 1b 79 38 fd 2a 58 a7 d8 | ..g...G.y8.*X..|
000001a0 30 8c 58 9f 9b 0e 7a 91 d1 4e ee 32 73 8f 97 d2 |0.X...z..N.2s...|
000001b0 b4 a9 1b 4b 55 d2 fa af cb fa dc e3 ab 2e 00 fe |...KU...........|
000001c0 ff ff 82 fe ff ff 02 00 00 00 00 50 5c 02 00 00 |...........P\...|
000001d0 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



Boot-Sector Type Win XP definately seems to be the problem... I hope for someone to know how to fix it. :) Thanks again!

sdb is by the way a third harddrive which only contains files, no OS. I didnt mention this yet.

Hippytaff
March 24th, 2011, 12:29 AM
putting the output in tags for readability...I'll have a look, but like I said others are better at this stuff than me...

Boot Info Script 0.55 dated February 15th, 2010

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

=> Windows is installed in the MBR of /dev/sda
=> No boot loader is installed in the MBR of /dev/sdb
=> Grub 2 is installed in the MBR of /dev/sdc and looks on the same drive in
partition #1 for (,msdos1)/boot/grub.
=> No boot loader is installed in the MBR of /dev/sdd

sda1: __________________________________________________ _______________________

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

sdb1: __________________________________________________ _______________________

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

sdc1: __________________________________________________ _______________________

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

sdc2: __________________________________________________ _______________________

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

sdc5: __________________________________________________ _______________________

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

sdd1: __________________________________________________ _______________________

File system: vfat
Boot sector type: BSD4.4: Fat32
Boot sector info: According to the info in the boot sector, sdd1 starts
at sector 0. But according to the info from fdisk,
sdd1 starts at sector 40.
Operating System:
Boot files/dirs:

sdd2: __________________________________________________ _______________________

File system: vfat
Boot sector type: BSD4.4: Fat32
Boot sector info: According to the info in the boot sector, sdd2 starts
at sector 0. But according to the info from fdisk,
sdd2 starts at sector 411648.
Operating System:
Boot files/dirs:

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

Drive: sda ___________________ __________________________________________________ ___

Disk /dev/sda: 74.4 GB, 74355769344 bytes
255 heads, 63 sectors/track, 9039 cylinders, total 145226112 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 * 63 145,195,469 145,195,407 7 HPFS/NTFS


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 End Size Id System

/dev/sdb1 63 976,768,064 976,768,002 7 HPFS/NTFS


Drive: sdc ___________________ __________________________________________________ ___

Disk /dev/sdc: 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 End Size Id System

/dev/sdc1 2,048 937,164,799 937,162,752 83 Linux
/dev/sdc2 937,166,846 976,771,071 39,604,226 5 Extended
/dev/sdc5 937,166,848 976,771,071 39,604,224 82 Linux swap / Solaris


Drive: sdd ___________________ __________________________________________________ ___

Disk /dev/sdd: 500.1 GB, 500107860992 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773166 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start End Size Id System

/dev/sdd1 1 409,639 409,639 ee GPT
/dev/sdd2 411,648 976,773,119 976,361,472 b W95 FAT32


GUID Partition Table detected.

Partition Start End Size System
/dev/sdd1 40 409,639 409,600 System/Boot Partition
/dev/sdd2 411,648 976,773,119 976,361,472 Linux or Data

blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/loop0 squashfs
/dev/sda1 8816734B167338F0 ntfs
/dev/sda: PTTYPE="dos"
/dev/sdb1 241C7D251C7CF362 ntfs Data Drive
/dev/sdb: PTTYPE="dos"
/dev/sdc1 76b04ee2-9d8c-450b-aff1-e98d1ba18833 ext4
/dev/sdc2: PTTYPE="dos"
/dev/sdc5 ae0f7636-23ac-4ae8-a4ca-9793bf7653f1 swap
/dev/sdc: PTTYPE="dos"
/dev/sdd1 70D6-1701 vfat EFI
/dev/sdd2 632A-1C05 vfat 500_EXTERN
/dev/sdd: PTTYPE="gpt"

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

Device Mount_Point Type Options

aufs / aufs (rw)
/dev/sr0 /cdrom iso9660 (ro,noatime)
/dev/loop0 /rofs squashfs (ro,noatime)
/dev/sdc1 /media/76b04ee2-9d8c-450b-aff1-e98d1ba18833 ext4 (rw,nosuid,nodev,uhelper=udisks)
/dev/sdd2 /media/500_EXTERN vfat (rw,nosuid,nodev,uhelper=udisks,uid=999,gid=999,sh ortname=mixed,dmask=0077,utf8=1,showexec,flush)
/dev/sda1 /media/8816734B167338F0 fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_ permissions)


================================ sda1/boot.ini: ================================

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(1)partition(2)\WINDOW S
[operating systems]
multi(0)disk(0)rdisk(1)partition(2)\WINDOWS="Windo ws XP Professional x64 Edition" /noexecute=optin /fastdetect

=========================== sdc1/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 part_msdos
insmod ext2
set root='(hd2,msdos1)'
search --no-floppy --fs-uuid --set 76b04ee2-9d8c-450b-aff1-e98d1ba18833
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd2,msdos1)'
search --no-floppy --fs-uuid --set 76b04ee2-9d8c-450b-aff1-e98d1ba18833
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
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
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.35-27-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd2,msdos1)'
search --no-floppy --fs-uuid --set 76b04ee2-9d8c-450b-aff1-e98d1ba18833
linux /boot/vmlinuz-2.6.35-27-generic root=UUID=76b04ee2-9d8c-450b-aff1-e98d1ba18833 ro quiet splash
initrd /boot/initrd.img-2.6.35-27-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-27-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd2,msdos1)'
search --no-floppy --fs-uuid --set 76b04ee2-9d8c-450b-aff1-e98d1ba18833
echo 'Loading Linux 2.6.35-27-generic ...'
linux /boot/vmlinuz-2.6.35-27-generic root=UUID=76b04ee2-9d8c-450b-aff1-e98d1ba18833 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-27-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd2,msdos1)'
search --no-floppy --fs-uuid --set 76b04ee2-9d8c-450b-aff1-e98d1ba18833
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=76b04ee2-9d8c-450b-aff1-e98d1ba18833 ro quiet splash
initrd /boot/initrd.img-2.6.35-22-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd2,msdos1)'
search --no-floppy --fs-uuid --set 76b04ee2-9d8c-450b-aff1-e98d1ba18833
echo 'Loading Linux 2.6.35-22-generic ...'
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=76b04ee2-9d8c-450b-aff1-e98d1ba18833 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-22-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='(hd2,msdos1)'
search --no-floppy --fs-uuid --set 76b04ee2-9d8c-450b-aff1-e98d1ba18833
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd2,msdos1)'
search --no-floppy --fs-uuid --set 76b04ee2-9d8c-450b-aff1-e98d1ba18833
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)" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set 8816734b167338f0
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 ###

=============================== sdc1/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
/dev/sdb1 /media/Data_Drive ntfs errors=remount-ro 0 1
# swap was on /dev/sdb5 during installation
UUID=ae0f7636-23ac-4ae8-a4ca-9793bf7653f1 none swap sw 0 0
sudo nano /etc/fstab

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


14.1GB: boot/grub/core.img
14.2GB: boot/grub/grub.cfg
77.9GB: boot/initrd.img-2.6.35-22-generic
.9GB: boot/initrd.img-2.6.35-27-generic
.5GB: boot/vmlinuz-2.6.35-22-generic
5.9GB: boot/vmlinuz-2.6.35-27-generic
.9GB: initrd.img
77.9GB: initrd.img.old
5.9GB: vmlinuz
.5GB: vmlinuz.old
=========================== Unknown MBRs/Boot Sectors/etc =======================

Unknown BootLoader on sdc2

00000000 da e7 9d 89 c2 d6 f6 8a 56 b2 4a d7 6f 69 26 f4 |........V.J.oi&.|
00000010 ee b7 4d 74 f3 30 ee 64 2a ce ad b5 55 18 80 a0 |..Mt.0.d*...U...|
00000020 e1 57 1c 7c b9 c0 e4 f2 70 06 4f 6a 62 6a 86 3f |.W.|....p.Ojbj.?|
00000030 99 9d 95 22 50 00 27 e5 20 70 0e d0 41 6c 7b f3 |..."P.'. p..Al{.|
00000040 d2 be 66 54 f9 92 69 24 a2 e2 a5 d1 5f bb b7 e0 |..fT..i$...._...|
00000050 c9 a5 3a 94 e7 15 26 d5 94 97 7b c9 6b 74 df 4e |..:...&...{.kt.N|
00000060 56 ac ee b6 6b 71 53 5f 54 78 9c 5c 67 73 10 ac |V...kqS_Tx.\gs..|
00000070 71 b4 0c 1f 99 b8 18 5c fa 9e a4 76 cd 5b b5 f1 |q......\...v.[..|
00000080 12 ec 44 f3 1a 27 dc ca d1 fc a4 8e 78 90 80 49 |..D..'......x..I|
00000090 da f8 ca 9e 7f bb e8 28 9d 1f 7e 3a 2b 74 bf 4b |.......(..~:+t.K|
000000a0 3d 6d fa 33 a7 db b6 e2 ef 74 b4 ba 5d 17 e6 fc |=m.3.....t..]...|
000000b0 fd 49 d7 5a 8c ab b3 7c d8 c2 ed 61 96 24 9e 58 |.I.Z...|...a.$.X|
000000c0 8c e0 e7 9c f2 00 38 e3 9e 56 6b b5 65 f9 40 2a |......8..Vk.e.@*|
000000d0 15 99 02 05 20 28 23 71 ea 06 46 46 7a 7b 02 69 |.... (#q..FFz{.i|
000000e0 d4 8b b2 69 5b 47 b7 7b 5f cb d6 e3 8c fd a4 ae |...i[G.{_.......|
000000f0 df c3 ae be 7d 3e 4f ee 0b 79 13 73 9c 82 3e 65 |....}>O..y.s..>e|
00000100 39 50 76 b0 3f dd 27 af d7 a8 e7 04 62 96 eb 51 |9Pv.?.'.....b..Q|
00000110 8f 25 10 93 e5 8d ee db 78 c8 f9 76 76 25 81 20 |.%......x..vv%. |
00000120 13 8c 76 dd c1 ac d2 97 3e ad dd 24 f7 be 97 66 |..v.....>..$...f|
00000130 b8 2a d1 8a 6f de 4d 4d b5 a6 b7 49 79 f4 dc cf |.*..o.MM...Iy...|
00000140 be 9b e6 0f 96 28 ea b2 88 c7 45 04 63 a1 6d b9 |.....(....E.c.m.|
00000150 e0 93 cf 73 8c f7 cf ba be 84 ef c2 b3 19 5d 88 |...s..........].|
00000160 09 8c a6 3a b4 7d 70 3a 60 70 48 27 07 19 34 e1 |...:.}p:`pH'..4.|
00000170 16 a4 f6 d9 5d df a3 7b ed d1 97 5a b7 bf 7d 5a |....]..{...Z..}Z|
00000180 69 d9 db 6b 25 7b fa eb 62 05 75 2a 0c 8c 14 75 |i..k%{..b.u*...u|
00000190 20 86 cb 67 b3 9c 8e 47 1b 79 38 fd 2a 58 a7 d8 | ..g...G.y8.*X..|
000001a0 30 8c 58 9f 9b 0e 7a 91 d1 4e ee 32 73 8f 97 d2 |0.X...z..N.2s...|
000001b0 b4 a9 1b 4b 55 d2 fa af cb fa dc e3 ab 2e 00 fe |...KU...........|
000001c0 ff ff 82 fe ff ff 02 00 00 00 00 50 5c 02 00 00 |...........P\...|
000001d0 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

drs305
March 24th, 2011, 12:44 AM
I can see two problems which will prevent you from booting Ubuntu.

1. Change the BIOS boot order to boot the sdc drive first. Your Grub boot files appear to be intact.

2. Edit fstab, as it is currently incorrect.
You can do this from the LiveCD. Boot it and mount your Ubuntu partition, and then open fstab for editing:


sudo mount /dev/sdc1 /mnt
gksu gedit /mnt/etc/fstab

Add a line for your / partition and make the file look like this:


# /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
UUID=76b04ee2-9d8c-450b-aff1-e98d1ba18833 / ext4 errors=remount-ro 0 1
/dev/sdb1 /media/Data_Drive ntfs auto,users,uid=1000,gid=1000,utf8,umask=027 0 0
# swap was on /dev/sdb5 during installation
UUID=ae0f7636-23ac-4ae8-a4ca-9793bf7653f1 none swap sw 0 0

Save the file, then reboot and see what happens.

jls_
March 24th, 2011, 01:10 AM
hey thanks a lot for your help!
I copied the text exactly like you wrote it and made it my fstab. I hope I understood you right, that I have to enter the partition name after the slash in this line.


UUID=76b04ee2-9d8c-450b-aff1-e98d1ba18833 / ext4 errors=remount-ro 0 1


(it still gave me that error when i copied it like you wrote)
if so, how can i find out what exactly i do have to put in there? sdc1 (my ubuntu partition)? or the label? (according to disc utility it has none) is there any way i can find it out?

i'm fairly new to ubuntu so excuse my lack of knowledge :)

by the way, I already tried booting from another harddrive using F8 to choose the drive i want to boot from at startup. No matter which one i choose i always got the same error.

drs305
March 24th, 2011, 01:23 AM
hey thanks a lot for your help!
I copied the text exactly like you wrote it and made it my fstab. I hope I understood you right, that I have to enter the partition name after the slash in this line.

The fstab line should look exactly as it's posted. You don't add any device name (i.e. it would be "/" , not "/sdc1", if that is what you mean.



i'm fairly new to ubuntu so excuse my lack of knowledge :)

We were all new to Ubuntu once, and most of us not that long ago. :-)



by the way, I already tried booting from another harddrive using F8 to choose the drive i want to boot from at startup. No matter which one i choose i always got the same error.

Please restate the error messages you get when you try to boot from your Ubuntu drive (originally sdc).

Also, are you getting the Grub menu? If not, try holding down the SHIFT key. If the menu appears, press "c" to get to the grub prompt (or if you already have the prompt), type:



ls # to list the partitions Grub sees
ls (hd0,1)/boot # Does is show the linux kernels (vmlinuz-2.6....)
If the second command doesn't display anything, try (hd1,1) or (hd2,1)

Also, if you try to make sda (your Windows drive) boot first, what kind of Windows error message do you get?

jls_
March 24th, 2011, 01:41 AM
hah, my bad... i didnt try to start from sdc1 after i edited the fstab :)
when i do so it finally works again, the grub boot menu is back hoorrraaaaayyy!! I cant thank you enough for this man... i'm so happy :) booting in ubuntu works fine just like before.

Unfortunately there's still one downside to this. If i choose to boot into Win7 all I get is a blinking "_" which already lasts for about 5 minutes so far. I know windows isn't always all that fast but this seems a little odd hehe :)

Maybe some one knows how to solve this? I don't have too much hope because there's no error messages displaying whatsoever, just the underscore blinking happily without an end. But maybe someone knows possible fixes.

thanks once again!

//edit: if i'm trying to boot from the 80 gb hdd where I installed win7 on to try to boot into win7, it still spits out the original error I stated in the first post.
this is by the way also the same hard drive i used to boot from before the whole mess started and it just got me into grub before i installed xp. maybe theres a way to clean the whole boot menu? i dont really know much about this stuff :)

drs305
March 24th, 2011, 02:01 AM
Maybe some one knows how to solve this? I don't have too much hope because there's no error messages displaying whatsoever, just the underscore blinking happily without an end. But maybe someone knows possible fixes.

Glad Ubuntu is back working.

The blinking cursor when trying to boot Windows isn't a Grub problem, as it will always display some sort of message or prompt if it's Grub-related. However, just to make sure, have you run "sudo update-grub" since you changed the boot order? It shouldn't matter since Grub 2 uses a combination of UUIDs and device names, but it won't hurt either...

It's likely you will have to repair Windows using an installation or repair disc. I'll have to leave fixing Windows to others, as I only know a few of the very basics of Windows repair.

If you have to repair the Windows bootloader you may temporarily lose grub and have to reinstall it. If so, boot the LiveCD, mount your Ubuntu partition and then run the following. You will have to adjust the X and Y values in the commands to reflect the proper Ubuntu drive and partition, but don't include the partition number in the second command. Again, only accomplish these commands if you try to restore Windows and in the process lose Grub2 again.

sudo mount /dev/sdXY /mnt
sudo grub-install --root-directory=/mnt /dev/sdX


Happy Ubuntu-ing ! Hope you get Windows back as well.

jls_
March 24th, 2011, 02:03 AM
alright, i will try your suggestions out tomorrow, it's getting late... :)
i will edit this post when i tried everything. i hope it'll work.

once again thanks so much for your help, you saved my day :)

jls_
March 24th, 2011, 08:02 PM
ok i finally ended up re-installing windows, i can still boot into ubuntu just fine if i hit f8 at startup and choose which disk to boot from. thanks again so much for your great help! :) I really appreciated it!