Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Installing Windows 7 after Ubuntu 12.04-grub repair

  1. #1
    Join Date
    Mar 2012
    Beans
    782
    Distro
    Ubuntu Development Release

    Installing Windows 7 after Ubuntu 12.04-grub repair

    Hi!
    I know my question was answered a lot of times, but I am still not sure how to do because there are a lot of old threads.

    I have one hard disk drive on which is Ubuntu 12.04. Now I want to shrink partition (I know how to do it - with Gparted) and after that I want to install Windows 7 on it. The problem is I do not know how to repair Grub menu, after Windows installation. Can someone tell me how to repair Grub, so I can choose which operating system I would like to use.

    2. Is it possible to view files of other operating system. For example when I am on Ubuntu is it possible to view Windows files or not (ex. Music folder).


    Thanks in advance

    I DON'T EVEN KNOW WHAT A QUANTAL QUETZAL IS...BUT IT SOUNDS LIKE PRETZEL AND I LIKE PRETZEL

  2. #2
    Join Date
    Mar 2012
    Beans
    782
    Distro
    Ubuntu Development Release

    Re: Installing Windows 7 after Ubuntu 12.04-grub repair

    Hi,
    I shrink my Ubuntu partition with Gparted, but unfortunately I was not able to use Gparted with Ubuntu live. I was lucky to have Fedora 17 on my Usb key and I used Gparted from there. Does anybody know why Gparted wasn't working on Ubuntu, but was working on Fedora. After that I have installed Windows 7.

    Now I want to know how can I get grub menu back, so I can choose between operating systems. I found some old threads but I am not sure if I can follow them.

    Can somebody point me to the right place.

    I DON'T EVEN KNOW WHAT A QUANTAL QUETZAL IS...BUT IT SOUNDS LIKE PRETZEL AND I LIKE PRETZEL

  3. #3
    Join Date
    Sep 2008
    Location
    Louisiana, USA
    Beans
    233

    Re: Installing Windows 7 after Ubuntu 12.04-grub repair

    Not sure about GParted, I haven't had any issues with it from a Live CD, but good that you found a way to get it to work. As for getting GRUB back, these might help:

    https://help.ubuntu.com/community/Re...tallingWindows
    https://help.ubuntu.com/community/Boot-Repair
    Any advice given is the direct result of my experience solving my problems on my system. I have no idea what I'm talking about. ~bouge

  4. #4
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: Installing Windows 7 after Ubuntu 12.04-grub repair

    sudo grub-install /dev/sdx where x is the hard drive. sda if you only have one.
    That might fix it.

  5. #5
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Installing Windows 7 after Ubuntu 12.04-grub repair

    If the Grub files are intact what Cavsfan recommends should return control to Grub [edit: from a working Ubuntu installation]. If you don't see a Windows entry, after booting into Ubuntu run "sudo update-grub".

    It's hard to say why the Ubuntu Gparted didn't work, but often it is because something was mounted. If it is a real installation, you can't run Gparted from that same running system. If you were trying to do it from a LiveCd, the swap partition still has to be unmounted first. But in either case, we recommend shinking/expanding any Windows partition with Windows software whenever possible.
    Last edited by drs305; June 13th, 2012 at 08:45 PM.
    Back to Xorg...

    Retired.

  6. #6
    Join Date
    Sep 2009
    Beans
    8,874
    Distro
    Ubuntu Development Release

    Re: Installing Windows 7 after Ubuntu 12.04-grub repair

    Quote Originally Posted by Cavsfan View Post
    sudo grub-install /dev/sdx where x is the hard drive. sda if you only have one.
    That might fix it.
    This would have to be done from a chroot on a live cd or from the ubuntu install.

    OP use this tool the recommended repair. If you still have problems be sure to save the bootinfo summary HTTP to post, so we can help you.
    https://help.ubuntu.com/community/Boot-Repair





  7. #7
    Join Date
    Mar 2012
    Beans
    782
    Distro
    Ubuntu Development Release

    Re: Installing Windows 7 after Ubuntu 12.04-grub repair

    Thanks for replies.

    I typed:
    sudo fdisk -l
    Code:
    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
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00005b5c
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1            2048   722040831   361019392   83  Linux
    /dev/sda2   *   722040832   722245631      102400    7  HPFS/NTFS/exFAT
    /dev/sda3       722245632   970481663   124118016    7  HPFS/NTFS/exFAT
    /dev/sda4       970483710   976771071     3143681    5  Extended
    /dev/sda5       970483712   976771071     3143680   82  Linux swap / Solaris
    
    Disk /dev/sdb: 8032 MB, 8032092160 bytes
    131 heads, 50 sectors/track, 2395 cylinders, total 15687680 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x0002bb00
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1   *        8192    15687679     7839744    b  W95 FAT32
    and then:sudo grub-install /dev/sda1
    Code:
    /usr/sbin/grub-probe: error: cannot find a device for /boot/grub (is /dev mounted?).
    I Unmounted both partitions in Nautilus.
    How can I solve this?

    I DON'T EVEN KNOW WHAT A QUANTAL QUETZAL IS...BUT IT SOUNDS LIKE PRETZEL AND I LIKE PRETZEL

  8. #8
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: Installing Windows 7 after Ubuntu 12.04-grub repair

    Enter
    Code:
    sudo mount /dev/sda1 /mnt
    Then
    Code:
    sudo grub-install /dev/sda
    not sda1 just sda

  9. #9
    Join Date
    Mar 2012
    Beans
    782
    Distro
    Ubuntu Development Release

    Re: Installing Windows 7 after Ubuntu 12.04-grub repair

    ubuntu@ubuntu:~$ sudo mount /dev/sda1 /mnt ubuntu@ubuntu:~$ sudo grub-install /dev/sda /usr/sbin/grub-probe: error: cannot find a device for /boot/grub (is /dev mounted?). The same error.
    Last edited by GreatDanton; June 13th, 2012 at 09:15 PM. Reason: typing mistake

    I DON'T EVEN KNOW WHAT A QUANTAL QUETZAL IS...BUT IT SOUNDS LIKE PRETZEL AND I LIKE PRETZEL

  10. #10
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: Installing Windows 7 after Ubuntu 12.04-grub repair

    Quote Originally Posted by GreatDanton View Post
    ubuntu@ubuntu:~$ sudo mount /dev/sda1 /mnt ubuntu@ubuntu:~$ sudo grub-install /dev/sda /usr/sbin/grub-probe: error: cannot find a device for /boot/grub (is /dev mounted?). The same error.
    Drs305 will have the answer. He knows grub pretty well.
    Hopefully he will return shortly.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •