Saturday, April 27, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 1459  / 2 Years ago, tue, may 31, 2022, 7:22:13

I had the idea to dual boot Win 7 and Ubuntu and what I did was the following:



Made a clean install of win 7 using all of my hard drive, next I used the Ubuntu live cd and gparted to partition my drive to be the following:



/dev/sda1 ext4 20GB (Linux root)  
/dev/sda2 ntfs 100GB(Win7)
/dev/sda3 ext4 350GB(Home)
/dev/sda4 extended 4GB(swap)


The thing is, when installing ubuntu I deleted the partition win 7 creates for its boot sector and recovery and then resized the drive to look like what I mentioned, and Ubuntu installed GRUB to the MBR.

When GRUB boots I can see Ubuntu but not Windows, how can I chainload it?
Or should I fix the windows mbr with the windows 7 installation disk and try to set the dual boot from there?



I don't really care which one of the 2 bootloaders I end up using, I just want the dual boot to work out.



Thanks


More From » grub2

 Answers
4

Updating the grub installation with sudo update-grub should fix it. When it runs, it searches for bootable images on each partition. For example, here is the output when I run it:



andy@ubuntu:~$ sudo update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.5.0-20-generic
Found initrd image: /boot/initrd.img-3.5.0-20-generic
Found linux image: /boot/vmlinuz-3.5.0-19-generic
Found initrd image: /boot/initrd.img-3.5.0-19-generic
Found linux image: /boot/vmlinuz-3.2.0-33-generic
Found initrd image: /boot/initrd.img-3.2.0-33-generic
Found linux image: /boot/vmlinuz-3.0.0-17-generic
Found initrd image: /boot/initrd.img-3.0.0-17-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Windows Recovery Environment (loader) on /dev/sda1
Found Windows 7 (loader) on /dev/sda2
Found Windows 7 (loader) on /dev/sda4
done


If that doesn't work, make sure you have a Live CD or USB to hand and try the following:-




  1. Check that the partition is actually readable and hasn't been corrupted (happened to be me about 2 months ago). The easiest way to do this is to run GParted and check the list of partitions that appear. (Testdisk may recover any lost partitions)

  2. If everything's OK, boot to Windows Recovery and use Startup Repair

  3. After making sure Windows will boot, restart and boot into your Live CD.

  4. Use grub-install to reinstall grub.


[#33640] Thursday, June 2, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
theurn

Total Points: 30
Total Questions: 110
Total Answers: 111

Location: Bahrain
Member since Fri, Sep 16, 2022
2 Years ago
theurn questions
Tue, Apr 5, 22, 14:18, 2 Years ago
Mon, Feb 14, 22, 16:29, 2 Years ago
Sat, Apr 8, 23, 05:26, 1 Year ago
Tue, Jan 10, 23, 23:59, 1 Year ago
Fri, Apr 8, 22, 01:36, 2 Years ago
;