Announcement

Collapse
No announcement yet.

Dual Boot - Can't Boot Kubuntu

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Dual Boot - Can't Boot Kubuntu

    Hi,

    I'm brand new to Kubuntu and, yesterday, I installed Kubuntu 13.1 alongside Windows 7. As far as I can tell the installation was successful, but my system will only boot into Windows, without giving me an option to choose Kubuntu.

    It runs fine from USB and I can also see that the hard disk has been partitioned for Kubuntu,.

    I've done some research and it looks like it might have something to do with the bootloader having overwritten to the MBR rather than the correct partition, but would really appreciate a little guidance on how to fix this (assuming this is the problem).

    Thanks,

    Ben.

    Here's (what I think is) the boot file 'grub.cfg', which is on the main Kubuntu partition:

    Code:
    #
    # DO NOT EDIT THIS FILE
    #
    # It is automatically generated by grub-mkconfig using templates
    # from /etc/grub.d and settings from /etc/default/grub
    #
    
    ### BEGIN /etc/grub.d/00_header ###
    if [ -s $prefix/grubenv ]; then
      set have_grubenv=true
      load_env
    fi
    set default="0"
    
    if [ x"${feature_menuentry_id}" = xy ]; then
      menuentry_id_option="--id"
    else
      menuentry_id_option=""
    fi
    
    export menuentry_id_option
    
    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 {
      if [ x$feature_all_video_module = xy ]; then
        insmod all_video
      else
        insmod efi_gop
        insmod efi_uga
        insmod ieee1275_fb
        insmod vbe
        insmod vga
        insmod video_bochs
        insmod video_cirrus
      fi
    }
    
    if [ x$feature_default_font_path = xy ] ; then
       font=unicode
    else
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos6'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6  fd9264a6-85cd-403a-b55b-3a14a9fd9543
    else
      search --no-floppy --fs-uuid --set=root fd9264a6-85cd-403a-b55b-3a14a9fd9543
    fi
        font="/usr/share/grub/unicode.pf2"
    fi
    
    if loadfont $font ; then
      set gfxmode=auto
      load_video
      insmod gfxterm
      set locale_dir=$prefix/locale
      set lang=en_GB
      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
    #set_background_image "images/tile.png";
    
    set menu_color_normal=white/black
    set menu_color_highlight=black/light-gray
    if background_color 0,0,0; 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
    menuentry 'Kubuntu' --class kubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-fd9264a6-85cd-403a-b55b-3a14a9fd9543' {
    recordfail
    	load_video
    	gfxmode $linux_gfx_mode
    	insmod gzio
    	insmod part_msdos
    	insmod ext2
    	set root='hd0,msdos6'
    	if [ x$feature_platform_search_hint = xy ]; then
    	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6  fd9264a6-85cd-403a-b55b-3a14a9fd9543
    	else
    	  search --no-floppy --fs-uuid --set=root fd9264a6-85cd-403a-b55b-3a14a9fd9543
    	fi
    	linux	/boot/vmlinuz-3.11.0-14-generic.efi.signed root=UUID=fd9264a6-85cd-403a-b55b-3a14a9fd9543 ro   quiet splash $vt_handoff
    	initrd	/boot/initrd.img-3.11.0-14-generic
    }
    submenu 'Advanced options for Kubuntu' $menuentry_id_option 'gnulinux-advanced-fd9264a6-85cd-403a-b55b-3a14a9fd9543' {
    	menuentry 'Kubuntu, with Linux 3.11.0-14-generic' --class kubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.11.0-14-generic-advanced-fd9264a6-85cd-403a-b55b-3a14a9fd9543' {
    	recordfail
    		load_video
    		gfxmode $linux_gfx_mode
    		insmod gzio
    		insmod part_msdos
    		insmod ext2
    		set root='hd0,msdos6'
    		if [ x$feature_platform_search_hint = xy ]; then
    		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6  fd9264a6-85cd-403a-b55b-3a14a9fd9543
    		else
    		  search --no-floppy --fs-uuid --set=root fd9264a6-85cd-403a-b55b-3a14a9fd9543
    		fi
    		echo	'Loading Linux 3.11.0-14-generic ...'
    		linux	/boot/vmlinuz-3.11.0-14-generic.efi.signed root=UUID=fd9264a6-85cd-403a-b55b-3a14a9fd9543 ro   quiet splash $vt_handoff
    		echo	'Loading initial ramdisk ...'
    		initrd	/boot/initrd.img-3.11.0-14-generic
    	}
    	menuentry 'Kubuntu, with Linux 3.11.0-14-generic (recovery mode)' --class kubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.11.0-14-generic-recovery-fd9264a6-85cd-403a-b55b-3a14a9fd9543' {
    	recordfail
    		load_video
    		insmod gzio
    		insmod part_msdos
    		insmod ext2
    		set root='hd0,msdos6'
    		if [ x$feature_platform_search_hint = xy ]; then
    		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6  fd9264a6-85cd-403a-b55b-3a14a9fd9543
    		else
    		  search --no-floppy --fs-uuid --set=root fd9264a6-85cd-403a-b55b-3a14a9fd9543
    		fi
    		echo	'Loading Linux 3.11.0-14-generic ...'
    		linux	/boot/vmlinuz-3.11.0-14-generic.efi.signed root=UUID=fd9264a6-85cd-403a-b55b-3a14a9fd9543 ro recovery nomodeset 
    		echo	'Loading initial ramdisk ...'
    		initrd	/boot/initrd.img-3.11.0-14-generic
    	}
    	menuentry 'Kubuntu, with Linux 3.11.0-12-generic' --class kubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.11.0-12-generic-advanced-fd9264a6-85cd-403a-b55b-3a14a9fd9543' {
    	recordfail
    		load_video
    		gfxmode $linux_gfx_mode
    		insmod gzio
    		insmod part_msdos
    		insmod ext2
    		set root='hd0,msdos6'
    		if [ x$feature_platform_search_hint = xy ]; then
    		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6  fd9264a6-85cd-403a-b55b-3a14a9fd9543
    		else
    		  search --no-floppy --fs-uuid --set=root fd9264a6-85cd-403a-b55b-3a14a9fd9543
    		fi
    		echo	'Loading Linux 3.11.0-12-generic ...'
    		linux	/boot/vmlinuz-3.11.0-12-generic root=UUID=fd9264a6-85cd-403a-b55b-3a14a9fd9543 ro   quiet splash $vt_handoff
    		echo	'Loading initial ramdisk ...'
    		initrd	/boot/initrd.img-3.11.0-12-generic
    	}
    	menuentry 'Kubuntu, with Linux 3.11.0-12-generic (recovery mode)' --class kubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.11.0-12-generic-recovery-fd9264a6-85cd-403a-b55b-3a14a9fd9543' {
    	recordfail
    		load_video
    		insmod gzio
    		insmod part_msdos
    		insmod ext2
    		set root='hd0,msdos6'
    		if [ x$feature_platform_search_hint = xy ]; then
    		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6  fd9264a6-85cd-403a-b55b-3a14a9fd9543
    		else
    		  search --no-floppy --fs-uuid --set=root fd9264a6-85cd-403a-b55b-3a14a9fd9543
    		fi
    		echo	'Loading Linux 3.11.0-12-generic ...'
    		linux	/boot/vmlinuz-3.11.0-12-generic root=UUID=fd9264a6-85cd-403a-b55b-3a14a9fd9543 ro recovery nomodeset 
    		echo	'Loading initial ramdisk ...'
    		initrd	/boot/initrd.img-3.11.0-12-generic
    	}
    }
    
    ### 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+ ###
    ### END /etc/grub.d/20_memtest86+ ###
    
    ### BEGIN /etc/grub.d/30_os-prober ###
    if [ "x${timeout}" != "x-1" ]; then
      if keystatus; then
        if keystatus --shift; then
          set timeout=-1
        else
          set timeout=0
        fi
      else
        if sleep --interruptible 3 ; then
          set timeout=0
        fi
      fi
    fi
    ### 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.
    ### END /etc/grub.d/40_custom ###
    
    ### BEGIN /etc/grub.d/41_custom ###
    if [ -f  ${config_directory}/custom.cfg ]; then
      source ${config_directory}/custom.cfg
    elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
      source $prefix/custom.cfg;
    fi
    ### END /etc/grub.d/41_custom ###
    Last edited by bngllghr; Jan 17, 2014, 04:44 AM. Reason: code tags

    #2
    To me it seems that the section /etc/grub.d/10_linux should boot Kubuntu on partition hd0,msdos6 (UUID=fd9264a6-85cd-403a-b55b-3a14a9fd9543) - might be wise to check that /etc/fstab has the same root entry. Am a bit surprised about the high partition number 6. I only use primary partition, max 4 per disk - so it seems you might have extended partitions?

    Believe that your problem is that your Windows partition has the boot flag and the Windows boot menu does not know about Kubuntu. I use the Ranish partition manager: http://goo.gl/4zwd8u You can start to use Ranish to move the boot flag without installing it (its a DOS program!), to boot Kubuntu and run "sudo update-grub" to get your Windows included in the Grub2 boot menu. I would recommend installing the the advanced Ranish boot manager. You can read about Grub2 here: http://goo.gl/vzVJ7l

    Comment


      #3
      A couple of comments:

      If you installed your boot loader (grub) to the partition rather than the MBR, you can't boot Kubuntu. I believe there is a way to add Kubuntu to your Windows boot loader, but you'll have to do a web search for that info - I don't do Windows. The only way to use grub instead of the Windows boot loader is to install grub to the MBR. You can do this from the bootable USB - there are dozens of posts on how to do this both here and on the web.

      Linux doesn't give a fig about the partition boot flag and never has AFAIK. No need to mess with that.

      Finally, when posting a file from your system, please either enclose it with the CODE tags using the pound sign button in the formatting menu or if the file is very long - attach it using the attach option under the "Go Advanced" menu. This will make your post much easier to read and thus more likely to get response.

      Please Read Me

      Comment


        #4
        Thanks for your responses, both.

        I did try to use the terminal to move grub to the MBR last week within Kubuntu whilst booting from USB, but I was getting a message telling me it couldn't be moved. I forget exactly what I did, but I tried a few tutorials to no avail. Am working on an assignment tonight but will look into your suggestions tomorrow and post back. Oshunluvr, thanks for the heads up, code tags noted.

        Cheers,

        Ben.

        Comment


          #5
          It is much easier to handle multiboot with a grub boatloader rather than with a Win7 boot loader. On my desktop I have two disks with 4 active partitions each of which 5 are Linux distros. In the MBR of the each disk I have Ranish partition manager, and in each linux partition MBR I have the grub boot loader (and in the Windows partition its bootloader). You set a boot flag to the partition that Ranish hands over to. I gave links to my blog above and here is a YouTube link: http://youtu.be/p6jzyRKYvXc

          Comment


            #6
            Originally posted by bngllghr View Post
            I did try to use the terminal to move grub to the MBR last week within Kubuntu whilst booting from USB, but I was getting a message telling me it couldn't be moved. I forget exactly what I did, but I tried a few tutorials to no avail. Am working on an assignment tonight but will look into your suggestions tomorrow and post back.
            We can't help much without specific details about what you've tried and what the exact error messages were. I haven't tried this method because it's newish and wasn't available the last time I had to fix grub, but it's worth a try:

            http://howtoubuntu.org/how-to-repair...ubuntu-live-cd

            I can't comment on the Ranish boot manager because I've never heard of it. If you have a newer computer that uses efi and GPT you can avoid all boot managers as they're no longer required.
            Last edited by oshunluvr; Jan 14, 2014, 06:05 PM.

            Please Read Me

            Comment


              #7
              Right, my PC is 3 years old BIOS, so I have not had to learn UEFI and GPT. My 8 partitions on two drives are all primary. I used the word active erroneously all eight are primary. The active partition is the one of the 4 with the boot flag. Quite often the first partition has the boot flag and its used as bootloader menu is used to choose which partition to boot. When you install Linux and older Windows [before Vista) to other partitions than the first, you can also install its PBR (partition MBR) to the same partition, and if you make that partition active (move the boot flag to that partition) its bootloader menu will be shown. This was how things work with MBR, but it seems as GPT don't use the concept active partition.

              bngllghr, are you using MBR or GPT?

              Comment


                #8
                Probably GPT as grub.cfg states efisigned kernel. Maybe you should try grub-install again with --force:
                Code:
                grub-install --force /dev/sda

                Comment


                  #9
                  Let's start with more information about your set up. We need to know which partition you have installed Kubuntu to. According to the grub.cfg above, it's sda6. Boot to the live USB, run this command and post the results:

                  sudo blkid -o list -c /dev/null

                  You wouldn't "move" grub to the MBR. You would install grub to the MBR and point it at the location of the grub files. Here's the old way to do this - I will assume sda6 is the location of your install and /boot is not on a separate partition. Commands are in bold:

                  1. Boot to the live USB and open a terminal.
                  2. sudo mkdir /mnt/install
                  3. sudo mount /dev/sda6 /mnt/install
                  4. sudo grub-install --boot-directory=/mnt/install /dev/sda
                  5. Reboot. Grub should come up. Log in, open a terminal again.
                  6. sudo update-grub

                  Windows should be detected and you should now have both OSs in your grub menu when you boot up.

                  Please Read Me

                  Comment


                    #10
                    Originally posted by hallergard View Post
                    Probably GPT as grub.cfg states efisigned kernel. Maybe you should try grub-install again with --force:
                    Code:
                    grub-install --force /dev/sda
                    I don't think just because the kernel is efi ready doesn't indicate the BIOS configuration nor the hard drive format.

                    Please Read Me

                    Comment


                      #11
                      Hi Guys,

                      Apologies for the slow reply; just getting back into this now after a busy couple of days.

                      We can't help much without specific details about what you've tried and what the exact error messages were. I haven't tried this method because it's newish and wasn't available the last time I had to fix grub, but it's worth a try:

                      http://howtoubuntu.org/how-to-repair...ubuntu-live-cd
                      I believe this was one of the tutorials that I followed last week. I can't remember what the error was so I just tried it again - no error this time but my system is still booting into windows.

                      bngllghr, are you using MBR or GPT?
                      MBR, having just checked disk management in Windows.

                      sudo blkid -o list -c /dev/null
                      Gives me:

                      Code:
                      kubuntu@kubuntu:~$ sudo blkid -o list -c/dev/null
                      device     fs_type label    mount point    UUID
                      -------------------------------------------------------------------------------
                      /dev/loop0 squashfs         /rofs          
                      /dev/sda1  ntfs             (not mounted)  6296E81596E7E80D
                      /dev/sda2  ntfs             (not mounted)  6246E9C246E996D7
                      /dev/sda4  ntfs    LENOVO_PART (not mounted) C420EFB620EFAE1C
                      /dev/sda5  ntfs    LENOVO   (not mounted)  1E063D2C063D05F5
                      /dev/sda6  ext4             (not mounted)  fd9264a6-85cd-403a-b55b-3a14a9fd9543
                      /dev/sda7  swap             <swap>         e4d272c8-862b-4767-bf79-b584b2596f87
                      /dev/sdb1  vfat    UUI      /cdrom         08F7-3C5C
                      kubuntu@kubuntu:~$ ^C
                      kubuntu@kubuntu:~$
                      2. sudo mkdir /mnt/install
                      3. sudo mount /dev/sda6 /mnt/install
                      4. sudo grub-install --boot-directory=/mnt/install /dev/sda
                      Gives me:

                      Code:
                      kubuntu@kubuntu:~$ sudo mkdir /mnt/install
                      mkdir: cannot create directory ‘/mnt/install’: File exists
                      kubuntu@kubuntu:~$ sudo mount /dev/sda6/mnt/install
                      mount: can't find /dev/sda6/mnt/install in /etc/fstab or /etc/mtab
                      kubuntu@kubuntu:~$ sudo grub-install --boot-directory=/mnt/install /dev/sda
                      Path `/mnt/install/grub' is not readable by GRUB on boot. Installation is impossible. Aborting.
                      kubuntu@kubuntu:~$
                      I'm guessing this is not what we wanted, but I'll reboot now anyway and post back.

                      Comment


                        #12
                        Am not sure of the purpose of the /mnt/install - path to grub-install? I would try this:
                        [CODE]sudo mount /dev/sda6
                        sudo grub-install --root-directory=/dev/sda6 --force /dev/sda[/CODE}
                        You might need path to grub-install

                        Comment


                          #13
                          Code:
                          kubuntu@kubuntu:~$ sudo mkdir /mnt/install
                          mkdir: cannot create directory ‘/mnt/install’: File exists
                          if it exists you cant create it ,,,,, you have done this already right ?

                          Code:
                          kubuntu@kubuntu:~$ sudo mount /dev/sda6/mnt/install
                          mount: can't find /dev/sda6/mnt/install in /etc/fstab or /etc/mtab
                          you forgot the space between /dev/sda6 & /mnt/install so it was taken as a single argument instead of, mount this(/dev/sda6) hear(/mnt/install)

                          Code:
                          kubuntu@kubuntu:~$ sudo grub-install --boot-directory=/mnt/install /dev/sda
                          Path `/mnt/install/grub' is not readable by GRUB on boot. Installation is impossible. Aborting.
                          kubuntu@kubuntu:~$
                          if the last one would have worked this one would have as well ,,,,,,
                          i7 4core HT 8MB L3 2.9GHz
                          16GB RAM
                          Nvidia GTX 860M 4GB RAM 1152 cuda cores

                          Comment


                            #14
                            Originally posted by hallergard View Post
                            Am not sure of the purpose of the /mnt/install - path to grub-install? I would try this:
                            [CODE]sudo mount /dev/sda6
                            sudo grub-install --root-directory=/dev/sda6 --force /dev/sda[/CODE}
                            You might need path to grub-install
                            the purpose is to provide a place to mount /sda6 to ,,,,,,,,,,you can not just say "mount /dev/sda6" without telling it where to mount it to .

                            and yes it is so the "grub-install" comand can find the /grub directory we want to use .

                            VINNY
                            i7 4core HT 8MB L3 2.9GHz
                            16GB RAM
                            Nvidia GTX 860M 4GB RAM 1152 cuda cores

                            Comment


                              #15
                              Hi Guys, Just tried that again and got the following. Just about to reboot and see what happens, but thought I'd post the output from the Terminal before I do because of the warning at the bottom ...

                              kubuntu@kubuntu:~$ sudo fdisk -l

                              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 / 4096 bytes
                              I/O size (minimum/optimal): 4096 bytes / 4096 bytes
                              Disk identifier: 0x4ef89b4e

                              Device Boot Start End Blocks Id System
                              /dev/sda1 * 2048 411647 204800 7 HPFS/NTFS/exFAT
                              /dev/sda2 411648 641652822 320620587+ 7 HPFS/NTFS/exFAT
                              /dev/sda3 641654782 945829887 152087553 f W95 Ext'd (LBA)
                              Partition 3 does not start on physical sector boundary.
                              /dev/sda4 945829888 976773167 15471640 12 Compaq diagnostics
                              /dev/sda5 885022720 945829887 30403584 7 HPFS/NTFS/exFAT
                              /dev/sda6 641654784 876810239 117577728 83 Linux
                              /dev/sda7 876812288 885020671 4104192 82 Linux swap / Solaris

                              Partition table entries are not in disk order

                              Disk /dev/sdb: 2056 MB, 2056257536 bytes
                              255 heads, 63 sectors/track, 249 cylinders, total 4016128 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: 0x9a1a55a5

                              Device Boot Start End Blocks Id System
                              /dev/sdb1 * 32 4016127 2008048 c W95 FAT32 (LBA)
                              kubuntu@kubuntu:~$
                              kubuntu@kubuntu:~$ sudo mkdir /mnt/install
                              kubuntu@kubuntu:~$ sudo mount /dev/sda6 /mnt/install
                              kubuntu@kubuntu:~$ sudo grub-install --boot-directory=/mnt/install /dev/sda
                              /usr/sbin/grub-bios-setup: warning: Sector 32 is already in use by the program `FlexNet'; avoiding it. This software may cause boot or other problems in future. Please ask its authors not to store data in the boot track.
                              /usr/sbin/grub-bios-setup: warning: Sector 33 is already in use by the program `FlexNet'; avoiding it. This software may cause boot or other problems in future. Please ask its authors not to store data in the boot track.
                              Installation finished. No error reported.
                              kubuntu@kubuntu:~$

                              Comment

                              Working...
                              X