Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I tried installing Ubuntu 12.04 using live CD on my laptop (Lenovo Z580) which came with Windows7 pre-installed.

While installing, I created partitions for root (15GB) as sda1 and swap (4GB) as sda2. After successful installation of Ubuntu and after a reboot, I re-installed the grub.

After much changes, following the suggestions of linux forums, re-installing and updating the grub, I am now at a stage where the grub shows the options for Ubuntu 12.04 and Windows7, with Ubuntu working fine.

This is the procedure that I used to get the grub entry: I used option 2 in here : http://ubuntuguide.net/how-to-restore-grub-2-after-reinstalling-windows-xpvistawin7

wiz,

Boot up ubuntu from the livecd,open terminal and run:

sudo -i mount /dev/sda7 /mnt mount /dev/sda6 /mnt/boot #skip this one if not have a separate /boot partition grub-install --root-directory=/mnt/ /dev/sda

If you miss “grub.cfg” file,use following to recreate:

mount --bind /proc /mnt/proc mount --bind /dev /mnt/dev mount --bind /sys /mnt/sys chroot /mnt update-grub umount /mnt/sys umount /mnt/dev umount /mnt/proc exit

Upon selecting Windows7, I get:

error: device not found ...<UUID>...  
error: file not found

Please help me solve the issue.

My boot-info summary result file can be found below:

>                 **Boot Info Script 0.61 [1 April 2012]**
------------------------------------

**
>
>
>============================= Boot Info Summary: ===============================
>
>=> Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of 
>    the same hard drive for core.img. core.img is at this location and looks 
>   for (,msdos1)/boot/grub on this drive.
>
>sda1: __________________________________________________________________________
>
>    File system:       ext4
>    Boot sector type:  -
>    Boot sector info: 
>    Operating System:  Ubuntu 12.04 LTS
>    Boot files:        /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img
>
>sda2: __________________________________________________________________________
>
>    File system:       swap
>    Boot sector type:  -
>    Boot sector info: 
>
>============================ Drive/Partition Info: =============================
>
>Drive: sda _____________________________________________________________________
>
>Disk /dev/sda: 750.2 GB, 750156374016 bytes
>255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors
>Units = sectors of 1 * 512 = 512 bytes
>Sector size (logical/physical): 512 bytes / 4096 bytes
>
>Partition  Boot  Start Sector    End Sector  # of Sectors  Id System
>
>/dev/sda1    *             63    39,062,562    39,062,500  83 Linux
>/dev/sda2          39,070,080    49,303,484    10,233,405  82 Linux swap / Solaris
>
>
>"blkid" output: ________________________________________________________________
>
>Device           UUID                                   TYPE       LABEL
>
>/dev/sda1        f7f81676-bd83-4fd9-96bc-a657785a491f   ext4       ubuntu_12.04
>/dev/sda2        df6ae95d-e88d-4f4a-a010-b01a8d642f0a   swap       
>/dev/sr0                                                iso9660    Ubuntu 12.04 LTS i386
>
>================================ Mount points: =================================
>
>Device           Mount_Point              Type       Options
>
>/dev/sda1        /                        ext4       (rw,errors=remount-ro)
>/dev/sr0         /media/Ubuntu 12.04 LTS i386 iso9660    >(ro,nosuid,nodev,uid=1000,gid=1000,iocharset=utf8,mode=0400,dmode=0500,uhelper=udisks)
>
>
>=========================== sda1/boot/grub/grub.cfg: ===========================
>
>--------------------------------------------------------------------------------

>### BEGIN /etc/grub.d/00_header ###
>insmod part_msdos
>if [ -s $prefix/grubenv ]; then
>  set have_grubenv=true
>  load_env
>fi
>set default="0"
>if [ "${prev_saved_entry}" ]; then
>  set saved_entry="${prev_saved_entry}"
>  save_env saved_entry
>  set prev_saved_entry=
>  save_env prev_saved_entry
>  set boot_once=true
>fi
>
>function savedefault {
>  if [ -z "${boot_once}" ]; then
>    saved_entry="${chosen}"
>    save_env saved_entry
>  fi
>}
>
>function recordfail {
>  set recordfail=1
>  if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; >fi; fi
>}
>
>function load_video {
>  insmod vbe
>  insmod vga
>  insmod video_bochs
>  insmod video_cirrus
>}
>
>insmod part_msdos
>insmod ext2
>set root='(hd0,msdos1)'
>search --no-floppy --fs-uuid --set=root f7f81676-bd83-4fd9-96bc-a657785a491f
>if loadfont /usr/share/grub/unicode.pf2 ; then
>  set gfxmode=auto
>  load_video
>  insmod gfxterm
>  insmod part_msdos
>  insmod ext2
>  set root='(hd0,msdos1)'
>  search --no-floppy --fs-uuid --set=root f7f81676-bd83-4fd9-96bc-a657785a491f
>  set locale_dir=($root)/boot/grub/locale
>  set lang=en_IN
>  insmod gettext
>fi
>terminal_output gfxterm
>if [ "${recordfail}" = 1 ]; then
>  set timeout=-1
>else
>  set timeout=10
>fi
>### END /etc/grub.d/00_header ###
>
>### BEGIN /etc/grub.d/05_debian_theme ###
>set menu_color_normal=white/black
>set menu_color_highlight=black/light-gray
>if background_color 44,0,30; then
>  clear
>fi
>### END /etc/grub.d/05_debian_theme ###
>
>### BEGIN /etc/grub.d/10_linux ###
>function gfxmode {
>   set gfxpayload="${1}"
>   if [ "${1}" = "keep" ]; then
>       set vt_handoff=vt.handoff=7
>   else
>       set vt_handoff=
>   fi
>}
>if [ "${recordfail}" != 1 ]; then
>  if [ -e ${prefix}/gfxblacklist.txt ]; then
>    if hwmatch ${prefix}/gfxblacklist.txt 3; then
>      if [ ${match} = 0 ]; then
>        set linux_gfx_mode=keep
>      else
>        set linux_gfx_mode=text
>      fi
>    else
>      set linux_gfx_mode=text
>    fi
>  else
>    set linux_gfx_mode=keep
>  fi
>else
>  set linux_gfx_mode=text
>fi
>export linux_gfx_mode
>if [ "${linux_gfx_mode}" != "text" ]; then load_video; fi
>menuentry 'Ubuntu, with Linux 3.2.0-37-generic-pae' --class ubuntu --class gnu-linux >--class gnu --class os {
>   recordfail
>   gfxmode $linux_gfx_mode
>   insmod gzio
>   insmod part_msdos
>   insmod ext2
>   set root='(hd0,msdos1)'
>   search --no-floppy --fs-uuid --set=root f7f81676-bd83-4fd9-96bc-a657785a491f
>   linux   /boot/vmlinuz-3.2.0-37-generic-pae root=UUID=f7f81676-bd83-4fd9-96bc-a657785a491f ro   quiet splash
>$vt_handoff
>   initrd  /boot/initrd.img-3.2.0-37-generic-pae
>}
>menuentry 'Ubuntu, with Linux 3.2.0-37-generic-pae (recovery mode)' --class ubuntu >--class gnu-linux --class gnu --class os {
>   recordfail
>   insmod gzio
>   insmod part_msdos
>   insmod ext2
>   set root='(hd0,msdos1)'
>   search --no-floppy --fs-uuid --set=root f7f81676-bd83-4fd9-96bc-a657785a491f
>   echo    'Loading Linux 3.2.0-37-generic-pae ...'
>   linux   /boot/vmlinuz-3.2.0-37-generic-pae root=UUID=f7f81676-bd83-4fd9-96bc-a657785a491f ro recovery nomodeset 
>   echo    'Loading initial ramdisk ...'
>   initrd  /boot/initrd.img-3.2.0-37-generic-pae
>}
>submenu "Previous Linux versions" {
>menuentry 'Ubuntu, with Linux 3.2.0-23-generic-pae' --class ubuntu --class gnu-linux >--class gnu --class os {
>   recordfail
>   gfxmode $linux_gfx_mode
>   insmod gzio
>   insmod part_msdos
>   insmod ext2
>   set root='(hd0,msdos1)'
>   search --no-floppy --fs-uuid --set=root f7f81676-bd83-4fd9-96bc-a657785a491f
>   linux   /boot/vmlinuz-3.2.0-23-generic-pae root=UUID=f7f81676-bd83-4fd9-96bc-a657785a491f ro   quiet splash $vt_handoff
>   initrd  /boot/initrd.img-3.2.0-23-generic-pae
>}
>menuentry 'Ubuntu, with Linux 3.2.0-23-generic-pae (recovery mode)' --class ubuntu >--class gnu-linux --class gnu --class os {
>   recordfail
>   insmod gzio
>   insmod part_msdos
>   insmod ext2
>   set root='(hd0,msdos1)'
>   search --no-floppy --fs-uuid --set=root f7f81676-bd83-4fd9-96bc-a657785a491f
>   echo    'Loading Linux 3.2.0-23-generic-pae ...'
>   linux   /boot/vmlinuz-3.2.0-23-generic-pae root=UUID=f7f81676-bd83-4fd9-96bc-a657785a491f ro recovery nomodeset 
>   echo    'Loading initial ramdisk ...'
>   initrd  /boot/initrd.img-3.2.0-23-generic-pae
>}
>}
>### 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='(hd0,msdos1)'
>   search --no-floppy --fs-uuid --set=root f7f81676-bd83-4fd9-96bc-a657785a491f
>   linux16 /boot/memtest86+.bin
>}
>menuentry "Memory test (memtest86+, serial console 115200)" {
>   insmod part_msdos
>   insmod ext2
>   set root='(hd0,msdos1)'
>   search --no-floppy --fs-uuid --set=root f7f81676-bd83-4fd9-96bc-a657785a491f
>   linux16 /boot/memtest86+.bin console=ttyS0,115200n8
>}
>### END /etc/grub.d/20_memtest86+ ###

>### BEGIN /etc/grub.d/30_os-prober ###
>### END /etc/grub.d/30_os-prober ###

>### BEGIN /etc/grub.d/30_uefi-firmware ###
>### END /etc/grub.d/30_uefi-firmware ###

>### 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 "Windows 7" {
>insmod part_gpt
>insmod ntfs
>insmod search_fs_uuid
>insmod chain
>search --fs-uuid --no-floppy --set=root df6ae95d-e88d-4f4a-a010-b01a8d642f0a
>chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
>}
>### 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 ###
>--------------------------------------------------------------------------------

>=============================== sda1/etc/fstab: ================================

>--------------------------------------------------------------------------------
># /etc/fstab: static file system information.
>#
># Use 'blkid' to print the universally unique identifier for a
># device; this may be used with UUID= as a more robust way to name devices
># that works even if disks are added and removed. See fstab(5).
>#
># <file system> <mount point>   <type>  <options>       <dump>  <pass>
>proc            /proc           proc    nodev,noexec,nosuid 0       0
># / was on /dev/sda1 during installation
>UUID=f7f81676-bd83-4fd9-96bc-a657785a491f /               ext4    errors=remount-ro >0       1
># swap was on /dev/sda2 during installation
>UUID=df6ae95d-e88d-4f4a-a010-b01a8d642f0a none            swap    sw              >0       0
>--------------------------------------------------------------------------------

>=================== sda1: Location of files loaded by Grub: ====================

>           GiB - GB             File                                 Fragment(s)

>  2.222815990 = 2.386730496    boot/grub/core.img                             1
>   2.216872692 = 2.380348928    boot/grub/grub.cfg                             1
>   8.361613750 = 8.978214400    boot/grub/stage2                               1
>   1.656280041 = 1.778417152    boot/initrd.img-3.2.0-23-generic-pae           4
>   1.755408764 = 1.884855808    boot/initrd.img-3.2.0-37-generic-pae           2
>   8.359111309 = 8.975527424    boot/vmlinuz-3.2.0-23-generic-pae              1
>   1.461738110 = 1.569529344    boot/vmlinuz-3.2.0-37-generic-pae              1
>   1.656280041 = 1.778417152    initrd.img                                     4
>   1.656280041 = 1.778417152    initrd.img.old                                 4
>   8.359111309 = 8.975527424    vmlinuz                                        1
>
>========= Devices which don't seem to have a corresponding hard drive: =========

>sdb 

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

>xz: (stdin): Compressed data is corrupt

I also tried adding GRUB_PRELOAD_MODULES="part_msdos" in /etc/default/grub file and

menuentry "Windows 7" { insmod part_msdos insmod ntfs insmod search_fs_uuid insmod chain search --fs-uuid --no-floppy --set=root df6ae95d-e88d-4f4a-a010-b01a8d642f0a chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi }

in the /etc/grub.d/40_custom file , and updated the grub - as suggested by another forum trying to configure the menu options in grub.

1 more thing.. I am not able to see the Windows7 partition in Ubuntu, as you can see in bootinfosummary ! Does this mean that I have formatted the Windows partition ??

$ sudo fdisk -l

Disk /dev/sda: 750.2 GB, 750156374016 bytes 255 heads, 63
sectors/track, 91201 cylinders, total 1465149168 sectors Units =
sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512
bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x000ec888

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63    39062562    19531250   83  Linux
Partition 1 does not start on physical sector boundary. /dev/sda2     
39070080    49303484     5116702+  82  Linux swap / Solaris
share|improve this question
    
There is no Windows install - the grub entry you have for Windows appears to be for a UEFI boot, whereas the drive is not GPT. So... how did you get this entry? Edit your question (you can remove the Wubi tag as well) and add some more information on all the steps - and maybe a link to the ubuntuforums.org thread for reference. Thanks –  bcbc Feb 2 '13 at 17:49
    
@ bcbc : Thank you for replying.. I have updated the post as required, please check. –  Pooja Feb 3 '13 at 8:38
    
Whoever was helping you must not have seen what I am seeing. There is no Windows partition, there is no GPT disk (so the boot entry for Windows would not be appropriate even if Windows was present)... without maybe the link to the original to piece together what might have happened, but I'd start by looking for some Windows restore disks or maybe contact the company you bought the computer from for some disks. –  bcbc Feb 3 '13 at 23:04
    
I will try restoring Windows and let you know the result. Thank you. –  Pooja Feb 4 '13 at 8:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.