marking
January 7th, 2010, 02:32 AM
Hello,
I have have worked with Ubuntu 8.10 for a long while. With a dual boot to XP for some compatibility stuff.
A few weeks ago I wanted to upgrade to 9.10, to be sure I did a clean format of my hard drive.
Yesterday I needed to use windows 7 for some work, so I installed it on a different partition .
I installed it without problems, it took over my MBR, preventing GRUB to work. So I used 9.10 live CD to restore grub like written on the Ubuntu wiki.
However, I am unable to add Windows 7 to my list.
When I run update-grub2, I recieve the following message
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.31-16-generic
Found initrd image: /boot/initrd.img-2.6.31-16-generic
Found linux image: /boot/vmlinuz-2.6.31-14-generic
Found initrd image: /boot/initrd.img-2.6.31-14-generic
ls: cannot access /var/lib/os-prober/mount/boot
Boot: No such file or directory
done
So, I tried to add windows 7 manually in the /etc/grub.d/40_Custom file from a snippet I found on the net somewhere:
menuentry "Microsoft Windows 7" {
saved_entry=${chosen}
save_env saved_entry
insmod ntfs
set root=(hd0,4)
search --no-floppy --fs-uuid --set e0d4a286d4a25e92
chainloader +1
}
When I boot windows 7, I get an error indicating Bootmgr was not found. which I am sure was not the case before I restored Grub.
Googling for hours I was unable to find why my os-prober failed in the first place. This error doesn't show up anywhere, and as far as I know, I did nothing with this application. Reinstalling with apt-get didn't solve it either.
I hope someone might be able to help me!
Thanks!
Here is my Boot info script 44 result
============================= Boot Info Summary: ==============================
=> Grub 1.97 is installed in the MBR of /dev/sda and looks on the same drive
in partition #2 for /boot/grub.
sda1: __________________________________________________ _______________________
File system: swap
Boot sector type: -
Boot sector info:
sda2: __________________________________________________ _______________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 9.10
Boot files/dirs: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img
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 /grldr /boot/grub/core.img
sda4: __________________________________________________ _______________________
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/dirs: /Windows/System32/winload.exe
=========================== Drive/Partition Info: =============================
Drive: sda ___________________ __________________________________________________ ___
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x00026691
Partition Boot Start End Size Id System
/dev/sda1 63 9,992,429 9,992,367 82 Linux swap / Solaris
/dev/sda2 9,992,430 209,985,614 199,993,185 83 Linux
/dev/sda3 * 209,987,584 210,192,383 204,800 7 HPFS/NTFS
/dev/sda4 210,192,384 824,387,583 614,195,200 7 HPFS/NTFS
blkid -c /dev/null: __________________________________________________ __________
sda1: UUID="131ff342-2567-4916-a64b-13bca2a542c3" TYPE="swap"
sda2: UUID="f9f8bf18-b65a-4104-86d0-b9e7559784d2" TYPE="ext4"
sda3: UUID="76484BEE484BABA5" LABEL="Door systeem gereserveerd" TYPE="ntfs"
sda4: UUID="12EA518AEA516ACD" TYPE="ntfs"
=============================== "mount" output: ===============================
/dev/sda2 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/mark/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=mark)
=========================== sda2/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 /boot/grub/grubenv ]; then
have_grubenv=true
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
saved_entry=${prev_saved_entry}
save_env saved_entry
prev_saved_entry=
save_env prev_saved_entry
fi
insmod ext2
set root=(hd0,2)
search --no-floppy --fs-uuid --set f9f8bf18-b65a-4104-86d0-b9e7559784d2
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
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/white
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, Linux 2.6.31-16-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,2)
search --no-floppy --fs-uuid --set f9f8bf18-b65a-4104-86d0-b9e7559784d2
linux /boot/vmlinuz-2.6.31-16-generic root=UUID=f9f8bf18-b65a-4104-86d0-b9e7559784d2 ro quiet splash
initrd /boot/initrd.img-2.6.31-16-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,2)
search --no-floppy --fs-uuid --set f9f8bf18-b65a-4104-86d0-b9e7559784d2
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=f9f8bf18-b65a-4104-86d0-b9e7559784d2 ro quiet splash
initrd /boot/initrd.img-2.6.31-14-generic
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/30_os-prober ###
if [ ${timeout} != -1 ]; then
if sleep --interruptible 10 ; then
set timeout=0
fi
fi
### 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.
menuentry "Microsoft Windows 7 Ultimate " {
saved_entry=${chosen}
save_env saved_entry
insmod ntfs
set root=(hd0,4)
search --no-floppy --fs-uuid --set e0d4a286d4a25e92
chainloader +1
}
### END /etc/grub.d/40_custom ###
=============================== sda2/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 defaults 0 0
# / was on /dev/sda2 during installation
UUID=f9f8bf18-b65a-4104-86d0-b9e7559784d2 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda1 during installation
UUID=131ff342-2567-4916-a64b-13bca2a542c3 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
=================== sda2: Location of files loaded by Grub: ===================
5.1GB: boot/grub/core.img
5.1GB: boot/grub/grub.cfg
5.1GB: boot/initrd.img-2.6.31-14-generic
5.1GB: boot/initrd.img-2.6.31-16-generic
5.1GB: boot/vmlinuz-2.6.31-14-generic
5.1GB: boot/vmlinuz-2.6.31-16-generic
5.1GB: initrd.img
5.1GB: initrd.img.old
5.1GB: vmlinuz
5.1GB: vmlinuz.old
=================== sda3: Location of files loaded by Grub: ===================
107.5GB: boot/grub/core.img
I have have worked with Ubuntu 8.10 for a long while. With a dual boot to XP for some compatibility stuff.
A few weeks ago I wanted to upgrade to 9.10, to be sure I did a clean format of my hard drive.
Yesterday I needed to use windows 7 for some work, so I installed it on a different partition .
I installed it without problems, it took over my MBR, preventing GRUB to work. So I used 9.10 live CD to restore grub like written on the Ubuntu wiki.
However, I am unable to add Windows 7 to my list.
When I run update-grub2, I recieve the following message
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.31-16-generic
Found initrd image: /boot/initrd.img-2.6.31-16-generic
Found linux image: /boot/vmlinuz-2.6.31-14-generic
Found initrd image: /boot/initrd.img-2.6.31-14-generic
ls: cannot access /var/lib/os-prober/mount/boot
Boot: No such file or directory
done
So, I tried to add windows 7 manually in the /etc/grub.d/40_Custom file from a snippet I found on the net somewhere:
menuentry "Microsoft Windows 7" {
saved_entry=${chosen}
save_env saved_entry
insmod ntfs
set root=(hd0,4)
search --no-floppy --fs-uuid --set e0d4a286d4a25e92
chainloader +1
}
When I boot windows 7, I get an error indicating Bootmgr was not found. which I am sure was not the case before I restored Grub.
Googling for hours I was unable to find why my os-prober failed in the first place. This error doesn't show up anywhere, and as far as I know, I did nothing with this application. Reinstalling with apt-get didn't solve it either.
I hope someone might be able to help me!
Thanks!
Here is my Boot info script 44 result
============================= Boot Info Summary: ==============================
=> Grub 1.97 is installed in the MBR of /dev/sda and looks on the same drive
in partition #2 for /boot/grub.
sda1: __________________________________________________ _______________________
File system: swap
Boot sector type: -
Boot sector info:
sda2: __________________________________________________ _______________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 9.10
Boot files/dirs: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img
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 /grldr /boot/grub/core.img
sda4: __________________________________________________ _______________________
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/dirs: /Windows/System32/winload.exe
=========================== Drive/Partition Info: =============================
Drive: sda ___________________ __________________________________________________ ___
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x00026691
Partition Boot Start End Size Id System
/dev/sda1 63 9,992,429 9,992,367 82 Linux swap / Solaris
/dev/sda2 9,992,430 209,985,614 199,993,185 83 Linux
/dev/sda3 * 209,987,584 210,192,383 204,800 7 HPFS/NTFS
/dev/sda4 210,192,384 824,387,583 614,195,200 7 HPFS/NTFS
blkid -c /dev/null: __________________________________________________ __________
sda1: UUID="131ff342-2567-4916-a64b-13bca2a542c3" TYPE="swap"
sda2: UUID="f9f8bf18-b65a-4104-86d0-b9e7559784d2" TYPE="ext4"
sda3: UUID="76484BEE484BABA5" LABEL="Door systeem gereserveerd" TYPE="ntfs"
sda4: UUID="12EA518AEA516ACD" TYPE="ntfs"
=============================== "mount" output: ===============================
/dev/sda2 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/mark/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=mark)
=========================== sda2/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 /boot/grub/grubenv ]; then
have_grubenv=true
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
saved_entry=${prev_saved_entry}
save_env saved_entry
prev_saved_entry=
save_env prev_saved_entry
fi
insmod ext2
set root=(hd0,2)
search --no-floppy --fs-uuid --set f9f8bf18-b65a-4104-86d0-b9e7559784d2
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
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/white
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, Linux 2.6.31-16-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,2)
search --no-floppy --fs-uuid --set f9f8bf18-b65a-4104-86d0-b9e7559784d2
linux /boot/vmlinuz-2.6.31-16-generic root=UUID=f9f8bf18-b65a-4104-86d0-b9e7559784d2 ro quiet splash
initrd /boot/initrd.img-2.6.31-16-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,2)
search --no-floppy --fs-uuid --set f9f8bf18-b65a-4104-86d0-b9e7559784d2
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=f9f8bf18-b65a-4104-86d0-b9e7559784d2 ro quiet splash
initrd /boot/initrd.img-2.6.31-14-generic
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/30_os-prober ###
if [ ${timeout} != -1 ]; then
if sleep --interruptible 10 ; then
set timeout=0
fi
fi
### 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.
menuentry "Microsoft Windows 7 Ultimate " {
saved_entry=${chosen}
save_env saved_entry
insmod ntfs
set root=(hd0,4)
search --no-floppy --fs-uuid --set e0d4a286d4a25e92
chainloader +1
}
### END /etc/grub.d/40_custom ###
=============================== sda2/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 defaults 0 0
# / was on /dev/sda2 during installation
UUID=f9f8bf18-b65a-4104-86d0-b9e7559784d2 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda1 during installation
UUID=131ff342-2567-4916-a64b-13bca2a542c3 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
=================== sda2: Location of files loaded by Grub: ===================
5.1GB: boot/grub/core.img
5.1GB: boot/grub/grub.cfg
5.1GB: boot/initrd.img-2.6.31-14-generic
5.1GB: boot/initrd.img-2.6.31-16-generic
5.1GB: boot/vmlinuz-2.6.31-14-generic
5.1GB: boot/vmlinuz-2.6.31-16-generic
5.1GB: initrd.img
5.1GB: initrd.img.old
5.1GB: vmlinuz
5.1GB: vmlinuz.old
=================== sda3: Location of files loaded by Grub: ===================
107.5GB: boot/grub/core.img