PDA

View Full Version : [SOLVED] Ubuntu 10.10 and Windows 7 Grub Problem



wishangel
June 25th, 2011, 01:23 PM
Hello everybody! I am happy that i can join the big ubuntu family! :D
However this is what I encounter:
- i have a laptop with win 7 installed first and the ubuntu 10.10;
- all were ok, the grub was set for dual boot and it worked;
- a few days ago from "Update-Manager" it was an grub update and I installed it. Since then my windows 7 wont boot. When i select the Win7 option it says me: "_" and then return to the grub choice list.

I forgot to add that i did:
- chmod -x 30_os-prober
- chmod -x 40_custom
- create a new file 11_Win7 and added this:

menuentry "Windows 7" {
set root='(hd0,msdos1)'
chainloader +1
}


Here is the Boot_Info_Script output:


Boot Info Script 0.60 from 17 May 2011


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

=> Grub2 (v1.97-1.98) 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 (,msdos6)/boot/grub.

sda1: __________________________________________________ ________________________

File system: ntfs
Boot sector type: Grub2 (v1.97-1.98)
Boot sector info: Grub2 (v1.97-1.98) is installed in the boot sector of
sda1 and looks at sector 456529840 of the same hard
drive for core.img. core.img is at this location and
looks in partition 6 for (,msdos6)/boot/grub. 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
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows 7
Boot files: /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:

sda4: __________________________________________________ ________________________

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

sda5: __________________________________________________ ________________________

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

sda6: __________________________________________________ ________________________

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

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

Drive: sda __________________________________________________ ___________________

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 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 206,847 204,800 7 NTFS / exFAT / HPFS
/dev/sda2 206,848 61,442,047 61,235,200 7 NTFS / exFAT / HPFS
/dev/sda3 61,442,048 389,122,047 327,680,000 7 NTFS / exFAT / HPFS
/dev/sda4 389,124,094 488,396,799 99,272,706 5 Extended
/dev/sda5 482,537,472 488,396,799 5,859,328 82 Linux swap / Solaris
/dev/sda6 389,124,096 482,535,423 93,411,328 83 Linux


"blkid" output: __________________________________________________ ______________

Device UUID TYPE LABEL

/dev/sda1 2060D92360D90108 ntfs System Reserved
/dev/sda2 A0FC0C59FC0C2C5A ntfs
/dev/sda3 A6B412E3B412B5B1 ntfs
/dev/sda5 b01146d7-593f-413c-aac2-e7c9e9c1872d swap
/dev/sda6 d98c1471-bd39-49ae-b74c-c4166dfc9d50 ext4

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

Device Mount_Point Type Options

/dev/sda6 / ext4 (rw,errors=remount-ro,commit=0)


=========================== sda6/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='(hd0,msdos6)'
search --no-floppy --fs-uuid --set d98c1471-bd39-49ae-b74c-c4166dfc9d50
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='(hd0,msdos6)'
search --no-floppy --fs-uuid --set d98c1471-bd39-49ae-b74c-c4166dfc9d50
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-28-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set d98c1471-bd39-49ae-b74c-c4166dfc9d50
linux /boot/vmlinuz-2.6.35-28-generic root=UUID=d98c1471-bd39-49ae-b74c-c4166dfc9d50 ro quiet splash
initrd /boot/initrd.img-2.6.35-28-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-28-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set d98c1471-bd39-49ae-b74c-c4166dfc9d50
echo 'Loading Linux 2.6.35-28-generic ...'
linux /boot/vmlinuz-2.6.35-28-generic root=UUID=d98c1471-bd39-49ae-b74c-c4166dfc9d50 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-28-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-25-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set d98c1471-bd39-49ae-b74c-c4166dfc9d50
linux /boot/vmlinuz-2.6.35-25-generic root=UUID=d98c1471-bd39-49ae-b74c-c4166dfc9d50 ro quiet splash
initrd /boot/initrd.img-2.6.35-25-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-25-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set d98c1471-bd39-49ae-b74c-c4166dfc9d50
echo 'Loading Linux 2.6.35-25-generic ...'
linux /boot/vmlinuz-2.6.35-25-generic root=UUID=d98c1471-bd39-49ae-b74c-c4166dfc9d50 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-25-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='(hd0,msdos6)'
search --no-floppy --fs-uuid --set d98c1471-bd39-49ae-b74c-c4166dfc9d50
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=d98c1471-bd39-49ae-b74c-c4166dfc9d50 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='(hd0,msdos6)'
search --no-floppy --fs-uuid --set d98c1471-bd39-49ae-b74c-c4166dfc9d50
echo 'Loading Linux 2.6.35-22-generic ...'
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=d98c1471-bd39-49ae-b74c-c4166dfc9d50 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/11_Win7 ###
Adding Windows 7 to GRUB 2 menu
menuentry "Windows 7" {
set root='(hd0,msdos2)'
chainloader +1
}
EOF
### END /etc/grub.d/11_Win7 ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set d98c1471-bd39-49ae-b74c-c4166dfc9d50
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set d98c1471-bd39-49ae-b74c-c4166dfc9d50
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
--------------------------------------------------------------------------------

=============================== sda6/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/sda6 during installation
UUID=d98c1471-bd39-49ae-b74c-c4166dfc9d50 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=b01146d7-593f-413c-aac2-e7c9e9c1872d none swap sw 0 0
--------------------------------------------------------------------------------

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

GiB - GB File Fragment(s)

217.690414429 = 233.743302656 boot/grub/core.img 1
210.346805573 = 225.858162688 boot/grub/grub.cfg 2
217.701545715 = 233.755254784 boot/initrd.img-2.6.35-22-generic 1
217.710693359 = 233.765076992 boot/initrd.img-2.6.35-25-generic 1
217.729148865 = 233.784893440 boot/initrd.img-2.6.35-28-generic 1
217.694541931 = 233.747734528 boot/vmlinuz-2.6.35-22-generic 1
217.802829742 = 233.864007680 boot/vmlinuz-2.6.35-25-generic 1
217.714694977 = 233.769373696 boot/vmlinuz-2.6.35-28-generic 1
217.729148865 = 233.784893440 initrd.img 1
217.710693359 = 233.765076992 initrd.img.old 1
217.714694977 = 233.769373696 vmlinuz 1
217.802829742 = 233.864007680 vmlinuz.old 1

======================== Unknown MBRs/Boot Sectors/etc: ========================

Unknown BootLoader on sda4

00000000 97 ec 50 1c fa 80 6b 72 d7 48 d3 d5 59 96 dd 17 |..P...kr.H..Y...|
00000010 bf 1e b4 d7 a8 9b 5a 9c 80 87 6d b3 13 c1 ae 0b |......Z...m.....|
00000020 50 20 48 de d5 eb 7a 9c 11 43 19 08 78 af 24 d4 |P H...z..C..x.$.|
00000030 86 66 61 c5 27 d0 22 51 8b 6f de 39 ad 48 59 40 |.fa.'."Q.o.9.HY@|
00000040 19 ac a8 55 59 b0 ed 8c 56 c2 c5 64 17 9b 8f c2 |...UY...V..d....|
00000050 96 e5 26 91 69 66 40 38 a8 da 7c 92 47 6a a1 29 |..&.if@8..|.Gj.)|
00000060 81 1b f7 12 31 a5 42 08 c7 ad 4b 8a 5a 95 7b 97 |....1.B...K.Z.{.|
00000070 16 42 4e 05 4c ac 41 35 50 00 a0 62 a4 8d 86 4e |.BN.L.A5P..b...N|
00000080 7b 54 d9 21 c7 53 42 23 92 33 53 c8 0f 6a ab 09 |{T.!.SB#.3S..j..|
00000090 a9 5d ca e3 38 a8 9f 33 e8 5a 6e c4 d1 dd b4 2d |.]..8..3.Zn....-|
000000a0 c9 ad eb 3d 5e 32 40 6c 73 5c 5c 92 6e 24 fa d5 |...=^2@ls\\.n$..|
000000b0 61 33 23 82 09 e2 b5 a5 15 14 65 55 df a1 eb f0 |a3#.......eU....|
000000c0 5c c7 28 1b 5b af 5c d5 b0 79 07 22 bc be cf 56 |\.(.[.\..y."...V|
000000d0 91 0e 18 f4 ae c2 c3 57 8a 48 d4 31 07 35 71 e8 |.......W.H.1.5q.|
000000e0 88 4b 43 a3 27 3d 14 64 d2 8f bb 93 9e 6a 38 64 |.KC.'=.d.....j8d|
000000f0 42 37 2b f5 a9 58 9d a4 83 54 bd 09 e5 f3 1e 15 |B7+..X...T......|
00000100 4a 75 a5 e1 46 00 cd 46 b9 00 7b d4 f9 e7 18 1c |Ju..F..F..{.....|
00000110 d2 63 5d ec 42 46 e1 f4 a7 04 da 32 69 48 ec 7b |.c].BF.....2iH.{|
00000120 53 4f 3c 73 f3 53 b6 88 6d d9 5e c0 1b b1 a5 05 |SO<s.S..m.^.....|
00000130 49 c6 d3 c5 28 55 ed 4f e4 63 18 e6 94 63 71 11 |I...(U.O.c...cq.|
00000140 4b 82 8f 91 5e 51 e2 15 5f 30 b2 f7 af 51 bb b8 |K...^Q.._0...Q..|
00000150 5b 78 cb 37 18 af 1e d6 ef c5 cc ec a8 06 06 69 |[x.7...........i|
00000160 32 97 a1 82 4f 63 51 8c 53 88 e9 40 19 a4 31 9c |2...OcQ.S..@..1.|
00000170 fa d3 90 12 71 8e b4 a1 7d 2a 74 e0 f6 a6 03 c4 |....q...}*t.....|
00000180 6a 89 f3 55 23 cb 1c 55 d9 a4 f9 02 ad 54 40 7a |j..U#..U.....T@z|
00000190 d2 01 31 c6 4d 2a fb 1a 79 00 8e 94 a3 d0 0a 03 |..1.M*..y.......|
000001a0 a0 e5 cb 71 c7 15 34 71 8c e6 91 54 8c 63 bd 4e |...q..4q...T.c.N|
000001b0 99 53 9c 51 71 c5 13 c4 a1 78 23 ad 59 c2 00 fe |.S.Qq....x#.Y...|
000001c0 ff ff 82 fe ff ff 02 60 91 05 00 68 59 00 00 fe |.......`...hY...|
000001d0 ff ff 05 fe ff ff 01 00 00 00 01 58 91 05 00 00 |...........X....|
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
Please help me manage this problem! Thank you in advance :)

YesWeCan
June 25th, 2011, 02:14 PM
A few people have reported similar symptoms after an update to Grub.

What has happened is that Grub has been installed to sda1 which is your Windows boot partition. This has trashed it (just the boot-loader, not your Windows OS). I think you will have to use a Windows CD to repair it.

Out of interest, when the update occurred were you notified or asked any questions about where the new Grub would be put?

wishangel
June 25th, 2011, 02:23 PM
well...honestly i wasn`t paying so much attention but as far i can remember it doesn`t let me choose some path or something. I just saw that it gives some errors messages while updating... and today when i wanted to enter on windows 7... failed!...

YesWeCan
June 25th, 2011, 02:31 PM
That's not good. I am wondering if there is a mistake in the updater. Unless it was told to do so there is no justification for it installing to sda1.

It is just the first sector of sda1 that is over-written. But this was code for booting the Windows boot-loader. Have you got a Windows CD you can repair with?

Once you have done the repair you won't be able to boot Ubuntu because Windows will restore the standard boot code to the MBR. So you will have to boot a Ubuntu 10.10 live CD/USB and restore the Grub MBR code.
sudo mount /dev/sda6 /mnt
sudo grub-install --root-directory=/mnt /dev/sda

wishangel
June 25th, 2011, 02:41 PM
I`ve got the windows 7 cd but i have to learn how to fix the grub and i only have an ubuntu 9.04 cd. Probably i will download ubuntu 10.10 and make my usb stick bootable...

YesWeCan
June 25th, 2011, 03:09 PM
There is a way to avoid having to make a new USB. Boot into Ubuntu and make a copy of the existing Grub MBR boot code:

sudo dd if=/dev/sda bs=446 count=1 > /tmp/grubmbr.bin

Then fix Windows.

After fixing Windows, boot off your 9.04 CD and do
sudo mount /dev/sda6 /mnt
sudo dd if=/mnt/tmp/grubmbr.bin of=/dev/sda

Then you should be able to boot Grub again.

YesWeCan
June 25th, 2011, 03:15 PM
http://support.microsoft.com/kb/927392
You only need to repair the boot sector. I am not familiar with this but there is a possibility that if you do only this that Grub MBR will not be repaired. So see what happens when you next boot.

oldfred
June 25th, 2011, 04:27 PM
The installer for 10.04 said to install grub everywhere and many then installed it to the windows partition boot sector. This fix worked for most as windows keeps a backup boot sector.

Fix for most, a few have other issues, better than windows fix in many cases as it also fixes other parameters:
This has instructions on using testdisk to repair the install of grub to the boot sector for windows from Ubuntu or Linux LiveCD.
http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Boot_Problems:Boot_Sector

If the backup is damamaged then you do have to use the windows tools, but if you do not use the automated repair it will not overwrite the MBR.
I am posting the full set of instructions, that I often post but you only need fixBoot:

How to use the Bootrec.exe tool in the Windows Recovery Environment to troubleshoot and repair startup issues in Windows
http://support.microsoft.com/kb/927392
Use bootsect.exe to repair XP & older or Vista/7 bootsectors
http://www.sevenforums.com/tutorials/20864-mbr-restore-windows-7-master-boot-record.html
http://windows7ultimate.windowsreinstall.com/repairwin7startup/indexthumbs.ht

Above links summarized, see links if more detail desired
You will need to boot with your Vista/Windows 7 installation disk or repair disk. Hit Enter at the language selection prompt then hit "R" to get to the repair section. You can then select the automatic boot repair tool, but it often will not do any good. Then select the command prompt (console) and type in the following commands:
BootRec.exe /fixMBR #updates MBR master boot record do not run if you still want grub
chkdsk C: /r /f (may have to run /r or /f as separate entries) rerun until no errors
BootRec.exe /FixBoot #updates PBR partition boot sector
BootRec.exe /ScanOs
BootRec.exe /RebuildBcd

j0eb0b
June 25th, 2011, 04:30 PM
You could also use Super Grub to fix the Windows MBR.

http://www.supergrubdisk.org/

This is a very handy tool.

wishangel
June 25th, 2011, 07:08 PM
well here i am again... i used the win cd to FixBoot all went ok.
Now it`s starting windows normaly when i start the computer.
However I booted from a live cd of ubuntu 10.10 and i runned the boot-info_script:


Boot Info Script 0.60 from 17 May 2011


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

=> Windows is installed in the MBR of /dev/sda.
=> Syslinux MBR (3.61-4.03) is installed in the MBR of /dev/sdb.

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

sda2: __________________________________________________ ________________________

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

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:

sda4: __________________________________________________ ________________________

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

sda5: __________________________________________________ ________________________

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

sda6: __________________________________________________ ________________________

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

sdb1: __________________________________________________ ________________________

File system: vfat
Boot sector type: SYSLINUX 4.01 debian-20100714 ...........>...r>........."....0...~.k...~...f...M.f.f....f..8~....>2}
Boot sector info: Syslinux looks at sector 1464368 of /dev/sdb1 for its
second stage. SYSLINUX is installed in the directory.
According to the info in the boot sector, sdb1 starts
at sector 0. But according to the info from fdisk,
sdb1 starts at sector 2048.
Operating System:
Boot files: /syslinux.cfg /ldlinux.sys

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

Drive: sda __________________________________________________ ___________________

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 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 206,847 204,800 7 NTFS / exFAT / HPFS
/dev/sda2 206,848 61,442,047 61,235,200 7 NTFS / exFAT / HPFS
/dev/sda3 61,442,048 389,122,047 327,680,000 7 NTFS / exFAT / HPFS
/dev/sda4 389,124,094 488,396,799 99,272,706 5 Extended
/dev/sda5 482,537,472 488,396,799 5,859,328 82 Linux swap / Solaris
/dev/sda6 389,124,096 482,535,423 93,411,328 83 Linux


Drive: sdb __________________________________________________ ___________________

Disk /dev/sdb: 16.1 GB, 16131293184 bytes
25 heads, 25 sectors/track, 50410 cylinders, total 31506432 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 31,506,431 31,504,384 7 NTFS / exFAT / HPFS


"blkid" output: __________________________________________________ ______________

Device UUID TYPE LABEL

/dev/loop0 squashfs
/dev/sda1 2060D92360D90108 ntfs System Reserved
/dev/sda2 A0FC0C59FC0C2C5A ntfs
/dev/sda3 A6B412E3B412B5B1 ntfs
/dev/sda5 b01146d7-593f-413c-aac2-e7c9e9c1872d swap
/dev/sda6 d98c1471-bd39-49ae-b74c-c4166dfc9d50 ext4
/dev/sdb1 F2B7-78BD vfat

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

Device Mount_Point Type Options

/dev/loop0 /rofs squashfs (ro,noatime)
/dev/sdb1 /cdrom vfat (ro,noatime,fmask=0022,dmask=0022,codepage=cp437,i ocharset=iso8859-1,shortname=mixed,errors=remount-ro)


=========================== sda6/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='(hd0,msdos6)'
search --no-floppy --fs-uuid --set d98c1471-bd39-49ae-b74c-c4166dfc9d50
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='(hd0,msdos6)'
search --no-floppy --fs-uuid --set d98c1471-bd39-49ae-b74c-c4166dfc9d50
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-28-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set d98c1471-bd39-49ae-b74c-c4166dfc9d50
linux /boot/vmlinuz-2.6.35-28-generic root=UUID=d98c1471-bd39-49ae-b74c-c4166dfc9d50 ro quiet splash
initrd /boot/initrd.img-2.6.35-28-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-28-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set d98c1471-bd39-49ae-b74c-c4166dfc9d50
echo 'Loading Linux 2.6.35-28-generic ...'
linux /boot/vmlinuz-2.6.35-28-generic root=UUID=d98c1471-bd39-49ae-b74c-c4166dfc9d50 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-28-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-25-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set d98c1471-bd39-49ae-b74c-c4166dfc9d50
linux /boot/vmlinuz-2.6.35-25-generic root=UUID=d98c1471-bd39-49ae-b74c-c4166dfc9d50 ro quiet splash
initrd /boot/initrd.img-2.6.35-25-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-25-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set d98c1471-bd39-49ae-b74c-c4166dfc9d50
echo 'Loading Linux 2.6.35-25-generic ...'
linux /boot/vmlinuz-2.6.35-25-generic root=UUID=d98c1471-bd39-49ae-b74c-c4166dfc9d50 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-25-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='(hd0,msdos6)'
search --no-floppy --fs-uuid --set d98c1471-bd39-49ae-b74c-c4166dfc9d50
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=d98c1471-bd39-49ae-b74c-c4166dfc9d50 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='(hd0,msdos6)'
search --no-floppy --fs-uuid --set d98c1471-bd39-49ae-b74c-c4166dfc9d50
echo 'Loading Linux 2.6.35-22-generic ...'
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=d98c1471-bd39-49ae-b74c-c4166dfc9d50 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/11_Win7 ###
Adding Windows 7 to GRUB 2 menu
menuentry "Windows 7" {
set root='(hd0,msdos2)'
chainloader +1
}
EOF
### END /etc/grub.d/11_Win7 ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set d98c1471-bd39-49ae-b74c-c4166dfc9d50
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set d98c1471-bd39-49ae-b74c-c4166dfc9d50
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
--------------------------------------------------------------------------------

=============================== sda6/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/sda6 during installation
UUID=d98c1471-bd39-49ae-b74c-c4166dfc9d50 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=b01146d7-593f-413c-aac2-e7c9e9c1872d none swap sw 0 0
--------------------------------------------------------------------------------

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

GiB - GB File Fragment(s)

217.689510345 = 233.742331904 boot/grub/core.img 1
210.346805573 = 225.858162688 boot/grub/grub.cfg 2
217.701545715 = 233.755254784 boot/initrd.img-2.6.35-22-generic 1
217.710693359 = 233.765076992 boot/initrd.img-2.6.35-25-generic 1
217.729148865 = 233.784893440 boot/initrd.img-2.6.35-28-generic 1
217.694541931 = 233.747734528 boot/vmlinuz-2.6.35-22-generic 1
217.802829742 = 233.864007680 boot/vmlinuz-2.6.35-25-generic 1
217.714694977 = 233.769373696 boot/vmlinuz-2.6.35-28-generic 1
217.729148865 = 233.784893440 initrd.img 1
217.710693359 = 233.765076992 initrd.img.old 1
217.714694977 = 233.769373696 vmlinuz 1
217.802829742 = 233.864007680 vmlinuz.old 1

============================== sdb1/syslinux.cfg: ==============================

--------------------------------------------------------------------------------
default menu.c32
prompt 0
menu title UNetbootin
timeout 100

label unetbootindefault
menu label Default
kernel /ubnkern
append initrd=/ubninit file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash --

label ubnentry0
menu label ^Help
kernel /ubnkern
append initrd=/ubninit

label ubnentry1
menu label ^Try Ubuntu without installing
kernel /casper/vmlinuz
append initrd=/casper/initrd.lz file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash --

label ubnentry2
menu label ^Install Ubuntu
kernel /casper/vmlinuz
append initrd=/casper/initrd.lz file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity quiet splash --

label ubnentry3
menu label ^Check disc for defects
kernel /casper/vmlinuz
append initrd=/casper/initrd.lz boot=casper integrity-check quiet splash --

label ubnentry4
menu label Test ^memory
kernel /install/mt86plus
append initrd=/ubninit

label ubnentry5
menu label ^Boot from first hard disk
kernel /ubnkern
append initrd=/ubninit

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

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

GiB - GB File Fragment(s)

?? = ?? ldlinux.sys 1
?? = ?? menu.c32 1
?? = ?? syslinux.cfg 1

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

menu.c32 : COM32R module (v4.xx)

======================== Unknown MBRs/Boot Sectors/etc: ========================

Unknown BootLoader on sda4

00000000 97 ec 50 1c fa 80 6b 72 d7 48 d3 d5 59 96 dd 17 |..P...kr.H..Y...|
00000010 bf 1e b4 d7 a8 9b 5a 9c 80 87 6d b3 13 c1 ae 0b |......Z...m.....|
00000020 50 20 48 de d5 eb 7a 9c 11 43 19 08 78 af 24 d4 |P H...z..C..x.$.|
00000030 86 66 61 c5 27 d0 22 51 8b 6f de 39 ad 48 59 40 |.fa.'."Q.o.9.HY@|
00000040 19 ac a8 55 59 b0 ed 8c 56 c2 c5 64 17 9b 8f c2 |...UY...V..d....|
00000050 96 e5 26 91 69 66 40 38 a8 da 7c 92 47 6a a1 29 |..&.if@8..|.Gj.)|
00000060 81 1b f7 12 31 a5 42 08 c7 ad 4b 8a 5a 95 7b 97 |....1.B...K.Z.{.|
00000070 16 42 4e 05 4c ac 41 35 50 00 a0 62 a4 8d 86 4e |.BN.L.A5P..b...N|
00000080 7b 54 d9 21 c7 53 42 23 92 33 53 c8 0f 6a ab 09 |{T.!.SB#.3S..j..|
00000090 a9 5d ca e3 38 a8 9f 33 e8 5a 6e c4 d1 dd b4 2d |.]..8..3.Zn....-|
000000a0 c9 ad eb 3d 5e 32 40 6c 73 5c 5c 92 6e 24 fa d5 |...=^2@ls\\.n$..|
000000b0 61 33 23 82 09 e2 b5 a5 15 14 65 55 df a1 eb f0 |a3#.......eU....|
000000c0 5c c7 28 1b 5b af 5c d5 b0 79 07 22 bc be cf 56 |\.(.[.\..y."...V|
000000d0 91 0e 18 f4 ae c2 c3 57 8a 48 d4 31 07 35 71 e8 |.......W.H.1.5q.|
000000e0 88 4b 43 a3 27 3d 14 64 d2 8f bb 93 9e 6a 38 64 |.KC.'=.d.....j8d|
000000f0 42 37 2b f5 a9 58 9d a4 83 54 bd 09 e5 f3 1e 15 |B7+..X...T......|
00000100 4a 75 a5 e1 46 00 cd 46 b9 00 7b d4 f9 e7 18 1c |Ju..F..F..{.....|
00000110 d2 63 5d ec 42 46 e1 f4 a7 04 da 32 69 48 ec 7b |.c].BF.....2iH.{|
00000120 53 4f 3c 73 f3 53 b6 88 6d d9 5e c0 1b b1 a5 05 |SO<s.S..m.^.....|
00000130 49 c6 d3 c5 28 55 ed 4f e4 63 18 e6 94 63 71 11 |I...(U.O.c...cq.|
00000140 4b 82 8f 91 5e 51 e2 15 5f 30 b2 f7 af 51 bb b8 |K...^Q.._0...Q..|
00000150 5b 78 cb 37 18 af 1e d6 ef c5 cc ec a8 06 06 69 |[x.7...........i|
00000160 32 97 a1 82 4f 63 51 8c 53 88 e9 40 19 a4 31 9c |2...OcQ.S..@..1.|
00000170 fa d3 90 12 71 8e b4 a1 7d 2a 74 e0 f6 a6 03 c4 |....q...}*t.....|
00000180 6a 89 f3 55 23 cb 1c 55 d9 a4 f9 02 ad 54 40 7a |j..U#..U.....T@z|
00000190 d2 01 31 c6 4d 2a fb 1a 79 00 8e 94 a3 d0 0a 03 |..1.M*..y.......|
000001a0 a0 e5 cb 71 c7 15 34 71 8c e6 91 54 8c 63 bd 4e |...q..4q...T.c.N|
000001b0 99 53 9c 51 71 c5 13 c4 a1 78 23 ad 59 c2 00 fe |.S.Qq....x#.Y...|
000001c0 ff ff 82 fe ff ff 02 60 91 05 00 68 59 00 00 fe |.......`...hY...|
000001d0 ff ff 05 fe ff ff 01 00 00 00 01 58 91 05 00 00 |...........X....|
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


What to do now to appear my grub choices again and to succesfull boot linux or windows?

oldfred
June 25th, 2011, 07:12 PM
#Comments are anything after the #, enter commands in terminal session
#Install MBR from LiveCD, Ubuntu install on sda6 and want grub2's bootloader in drive sda's MBR:
#Find linux partition, change sda6 if not correct:
sudo fdisk -l
#confirm that linux is sda6
sudo mount /dev/sda6 /mnt
sudo grub-install --root-directory=/mnt/ /dev/sda
#If grub 1.99 with Natty uses boot not root
sudo grub-install --boot-directory=/mnt/ /dev/sda
#If that returns any errors run:
sudo grub-install --recheck --root-directory=/mnt/ /dev/sda
# If no errors on previous commands reboot into working system and run this:
sudo update-grub

#More info here
#How to restore the Ubuntu/XP/Vista/7 bootloader (Updated for Ubuntu 9.10)
http://ubuntuforums.org/showthread.php?t=1014708
#Reinstall grub2 - Short version
https://help.ubuntu.com/community/Grub2#Reinstalling%20GRUB%202

YesWeCan
June 25th, 2011, 07:15 PM
Well done. See post 4 or oldfred to restore grub.

ahears
June 25th, 2011, 07:20 PM
I don't mean to but in but I happen to be here. You will want to boot from the ubuntu cd and when it loads you should get a screen that asks how you want to boot. Select "rescure a broken system" Then you will be asked a series of questions as thou you are re installing and to pacify the loader answer them all accurately but don't worry you wont actually be installing. When you finally get to the menus that asks if you want to re-install the grub loader, choose to reinstall the grub loader (on /dev/sda or wherever your first partition of the first hard drive is) and make sure that when it is detecting the operating systems that Windows 7 appears in the output (so you know its there). Then choose to reboot. Post what happens and get back to me. I am triple booting windows 7 and linux so I am familiar with the whole grub setup. This should be cake. :)

wishangel
June 25th, 2011, 07:22 PM
root@ubuntu:/mnt/boot/grub# sudo grub-install --root-directory=/mnt/ /dev/sda
Installation finished. No error reported.
root@ubuntu:/mnt/boot/grub# sudo update-grub
/usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?).
root@ubuntu:/mnt/boot/grub#

why i can`t run grub-update? :/

and with the "sudo grub-install --root-directory=/mnt/ /dev/sda" command didn`t I overwrite the sda mbr? and the system doesn`t know what to boot?

YesWeCan
June 25th, 2011, 08:04 PM
You have to boot Ubuntu on your HD BEFORE you run sudo update-grub.

The grub-install overwrites the MBR boot code and launches straight into the Grub boot-loader. You may not see a menu the first time and even if you do select ubuntu and then do the update-grub. Next boot you can select Windows.

update-grub regenerates the files in /boot/grub as well as scanning your drives for OS's. It has to be run on the HD Ubuntu otherwise it is trying to update grub files on the read-only CD, and the CD doesn't use Grub to boot anyhow. :)

oldfred
June 25th, 2011, 08:05 PM
You cannot run the update-grub until you have rebooted.

Did grub not install to the MBR? It should be just these lines:

sudo mount /dev/sda6 /mnt
sudo grub-install --root-directory=/mnt/ /dev/sda

If for some reason the above does not work then you will have to chroot into your install or ahears's suggestion which I never have tried.

wishangel
June 25th, 2011, 08:44 PM
the sad part is that after i rebooted only a dark screen showed to me and not booting anything and no list to select operating system... and it stayed that way until i touched the power buton of the laptop and then pc stopped... on the dark screen i could see "_" sign clipping and that`s it... :(

ahears
June 25th, 2011, 08:51 PM
If you already tried my suggestion, and all of oldfred's suggestions then you may have a disk error probably due to some kind of damage to the physical drive itself. You should be able to do this from the live cd but do not do it while the drive is mounted because it will destroy data on a mounted drive. I am not a guru on data recovery. There is an article at 'http://manpages.ubuntu.com/manpages/hardy/man8/fsck.8.html' that might help you. Do you have the ubuntu live cd?

wishangel
June 25th, 2011, 09:02 PM
well it`s not a live cd...it`s a bootable usb stick and "rescure a broken system" command prompt does not appear to me... :( ufff

ahears
June 25th, 2011, 09:13 PM
You will need to mount the ubuntu partition from your usb, then 'chroot /media/whereverubunutismounted' into your ubuntu partition. then run 'update-grub' once you have used chroot successfully. Also get a copy of ubuntu and burn a live cd, it sounds like you have a persistant usb copy and it may not be the same. You should see windows 7 listed in the output, and should be able to boot now.

wishangel
June 25th, 2011, 09:33 PM
ok I managed to work. Here is what i did (detailed explanation):

1) Boot from windows 7 cd and choose repair. Click next after setup finds the windows 7 installation on you`re hard. From the list of tasks choose - Command Line. Enter:

bootrec/FixMbrand then:

bootrec/FixBootMeesages returned should be succesfully...

2) Boot from Linux live CD or from a bootable USB Stick. Go to Terminal and type (one at a time):
sdaLINUX=partition where you have ubuntu installed;
sdaMBR=partition where windows 7 MBR is installed;



sudo su
sudo mount /dev/sdaLINUX /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo chroot /mnt
grub-install /dev/sdaMBR
grub-update
I think this woks also after a fresh Windows install on a hardisk where Ubuntu is the first installed operating system.
Hope this helps.
Guys...thank you for guidance. This is the fastest response forum i have ever registered! :D

ahears
June 25th, 2011, 09:48 PM
Technically, I don't see the point of mounting the /dev /proc /sys directories elsewhere, however the effect is the same when 'chroot' is invoked... you have installed grub using the grub-install command which is the same command given through the 'Recover a broken system' menu option previously mentioned, and then update the loader as previously stated as well using the update grub command. Good job. If you are running a 16 bit boot loader with a 32 bit loader let me know........Viva: Codename Nemisis.! I'm glad to help :):popcorn: