Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 1442  / 3 Years ago, sat, october 2, 2021, 4:14:16

I'm trying to set up Ubuntu 12.04 alongside my Windows 7 install.
I put the iso onto a flash drive, managed to install everything, but when I restart the computer after completing the installation, I have no boot options and Windows loads automatically.


This makes me think that maybe I installed the bootloader in the wrong place and maybe BIOS can't find it.


This is a screenshot of my disk partitions from Windows:
Image


Basically, Ubuntu should go to the 360GB slot on Disk 1, but I actually tried installing the bootloader in that partition, as well as in the root of that disk. Neither were recognized during start-up.


I'm hesitant to try to install it over my main boot (disk 0 :core) as this is a NTFS file system versus the ext4 file system that I'm trying to install Ubuntu with.


I've now tried installing the bootloader on /dev/sda (Disk 0) -- where my Windows boot is located. I've checked to make sure BIOS is booting from this disk first, and I still have no boot options to select Windows 7 or Ubuntu. How can I diagnose this problem further?


I'm just looking for the easiest way to get things running without affecting my Windows too much.
Any tips/advice?


More From » 12.04

 Answers
7

You need to install it on the disk selected as primary boot disk in Bios: in your situation, on disk 0. This has no problem (people with only 1 disk has no other option).



If you prefer not modifying your current disk 0, you can install the bootloader on disk 1 and select disk 1 to boot from BIOS. You can after that (if the installer didn't do it already) update grub to find your windows installation and boot it from there too using the grub menu.



EDIT: How to reinstall grub2 from Live CD (or USB)
obs: I think better re-installing grub as you already installed it many times I suppose and this way we are sure it is installed in the right place.




  • boot with the live USB

  • check the name of your main ubuntu system partition with sudo fdisk -l (will be /dev/sdb1 or 2 probably in your case)

  • mount it: sudo mount /dev/sdXY /mnt (obs: sdXY is what you found on previous step)

  • Reinstall grub2 with: sudo grub-install --root-directory=/mnt /dev/sdX (obs: do not include partition number in /dev/sdX, not sdXY, it is better not to install on a partition) - This should be /dev/sdb for disk1 and /dev/sda for disk 0 and it has to be the disk used by BIOS as primary boot.

  • unmount the partition: sudo umount /mnt

  • reboot (select in BIOS the disk you used to install grub as primary boot disk)



If you don't see grub menu at boot, try pressing and holding SHIFT key during boot and the menu should be displayed.



If you don't have windows option in menu, after booting in Ubuntu use sudo update-grub and reboot.



More complete documentation on grub and Ubuntu can be found at: Ubuntu Documentation - Grub2 install


[#32269] Sunday, October 3, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
variark

Total Points: 82
Total Questions: 114
Total Answers: 122

Location: Sweden
Member since Mon, May 8, 2023
1 Year ago
variark questions
Wed, Nov 3, 21, 13:30, 3 Years ago
Sun, Jan 8, 23, 16:05, 1 Year ago
Thu, Dec 15, 22, 02:10, 1 Year ago
Sun, Jun 26, 22, 12:20, 2 Years ago
Tue, Dec 14, 21, 15:40, 2 Years ago
;