Thursday, June 6, 2019

14.04 - Ubuntu 16.04 and Windows 7 dual boot problems




I followed the instructions here (http://thpc.info/dual/7/db_ubuntu1204_grub_lnx_on_win7.html) to set up a dual boot system with windows 7 and ubuntu mate 1.04.



Here is the specific section I followed:



SUMMARY of Procedure (Advanced Users)




  1. Backup.

  2. Create sufficient Unallocated space for Ubuntu 12.04 at end of first hard disk or on a second disk.

  3. Start installing from Ubuntu Live CD



    • In "Allocate drive space", select Something else.

    • Create an EXT4 partition for Ubuntu in Free space (it must be a Primary partition) - use / for Mount Point.

    • Create the Swap partition - use swap area for Mount Point.

    • Optionally, create another EXT4 partition for your data - use /home for Mount Point.

    • In "Device for boot loader installation", select the Ubuntu EXT4 / partition, like /dev/sda3 or /dev/sdb1.
      Install Ubuntu.

    • Reboot. Only Windows boots for now.



  4. Bootup from the Ubuntu Live CD and select Try Ubuntu.


    • Run Ubuntu's GParted utility to mark the EXT4 partition as Active.
      Exit and restart computer.




That's it! Linux's GRUB2 boot loader menu will boot either Linux Ubuntu 12.04 or Windows 7 and the original MBR is unchanged. If you ever wish to return to a Windows-controlled startup, just use Disk Management to mark the originally active partition Active again - then, if you wish, you can use the free EasyBCD utility to add Linux to the Windows boot loader menu.




I currently have my hard disk setup as follows:



Device     Boot     Start       End   Sectors   Size Id Type
/dev/sdb1 2048 206847 204800 100M 7 HPFS/NTFS/exFAT
/dev/sdb2 206848 81919999 81713152 39G 7 HPFS/NTFS/exFAT
/dev/sdb3 * 81920000 83091455 1171456 572M 83 Linux
/dev/sdb4 83093502 312580095 229486594 109.4G 5 Extended
/dev/sdb5 83093504 99106815 16013312 7.7G 82 Linux swap / Solaris
/dev/sdb6 99108864 130551807 31442944 15G 83 Linux
/dev/sdb7 130553856 209065983 78512128 37.4G 83 Linux

/dev/sdb8 209068032 312580095 103512064 49.4G 7 HPFS/NTFS/exFAT


After firs installing windows and then installing ubuntu, the only thing I did was to boot into ubuntu with the live cd and set /dev/sdb3 as active by changing the flag option from /dev/sdb1 (100mg windows boot partition created by windows install process). This then setup the grub boot loader to manage the boot process.



/dev/sdb2 = Windows 7
/dev/sdb3 = /boot (primary partition)
/dev/sdb6 = / (root partition)
/dev/sdb7 = /home
/dev/sdb8 = NTFS partition to share between windows and ubuntu



I started out with a fresh disk and did my partitioning with Gparted. When I initially setup my partitions, gparted did not give me the option to setup /dev/sdb8 as ntfs so I used fat32. I then formatted it to NTFS after I booted into windows.



Indeed Grub is managing my boot. I am able to select Windows 7 from the Grub menu and boot into windows 7 without any trouble. However, when I select Ubuntu, the screen hangs at the ubunt splash logo screen.



I've tried logging in with a ubuntu live cd and run boot-repair to fix any problems. However, no luck. Here are the outputs of running boot-repair:



http://paste.ubuntu.com/25714271/ (summary info before running recommended repair)
http://paste.ubuntu.com/25714275/ (summary info after running recommended repair)




What am I missing?



I've resolved my issue. Thank you for the pointers oldfred. I'm not totally sure what solved my problem, but here is what I did:




  1. I changed my bios to have my hard drive as the first boot device instead of my previous setup where I had all my other devices ahead of my hard drive. I noticed that doing this seems to have fixed the partition name assignments to actually show sda for my hard drive partitions and sdb for my thumb drive. I think this might have been one of the fixes since grub works best with this sequence.


  2. I then also used my linux live drive to start gparted and I changed my bootflag back to the 100mg windows loader drive.


  3. I then reinstalled ubuntu with my original hard drive partitions. I formatted all my ubuntu partitions again while doing the reinstall:




    /dev/sda3 = /boot (primary partition)
    /dev/sda6 = / (root partition)
    /dev/sda7 = /home




    • In looking through several posts several users suggested that not using the /dev/sda partition for the grub 2 installation can cause problems like the one I had to begin with, but I still insisted on installing to the /dev/sda3 linux boot partition I created. I wanted to really set it up this way because I want to keep the ubuntu grub to partition totally separate from the windows boot loader partitions.




Once the install finished, I did not have to do anything else. Grub seems to have picked up my windows install successfully and added it to the Grub boot menu. Both systems are now booting fine and everything is perfect.



My hope is that in the future if I need to reinstall or upgrade either windows or ubuntu there will be no interference with either boot loader.




I would be interested to hear from someone more expert about grub if my assumption that it automatically picked up the windws drive and setup it up in the boot screen is accurate. I did not have to run boot repair or do anything else after installing ubuntu. It just worked.


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...