Announcement

Collapse
No announcement yet.

Windows 8 inaccessible after installing Kubuntu 12.10

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

    #91
    Steve that was awesome. I think longnosemonkey should reinstall and start from scratch now, In orde to clean up the existing UEFI NVRAM so the next time he/she can do the install without assistance. Do we have a sticky thread on EFI installs? I think we are going to see a lot more of this.

    Comment


      #92
      Thank you SteveRiley. You were awesome.

      The admins should put up a sticky that captures the lessons learnt from this.

      Comment


        #93
        Originally posted by pauly View Post
        Steve that was awesome.
        Originally posted by longnosemonkey View Post
        Thank you SteveRiley. You were awesome.
        Thanks, guys.

        Originally posted by pauly View Post
        I think longnosemonkey should reinstall and start from scratch now, In orde to clean up the existing UEFI NVRAM so the next time he/she can do the install without assistance.
        At this point, the NVRAM variables contain exactly what they should, and nothing more. Longnosemonkey's variable structure matches the from-scratch dual-boot build I was experimenting with last night. I wouldn't recommend to reinstall now, unless Longnosemonkey wants more hands-on experience.

        Originally posted by pauly View Post
        Do we have a sticky thread on EFI installs? I think we are going to see a lot more of this.
        Originally posted by longnosemonkey View Post
        The admins should put up a sticky that captures the lessons learnt from this.
        We have a subforum dedicated to UEFI assistance. We also have a knowledge base subforum. Indeed, this particular thread contains a number of useful nuggets (along with a fair amount of my own idle musings, sigh). I'll figure out which portions make sense for post in the KB.

        Comment


          #94
          Great work there Steve. I think we're going to be seeing a lot of these type of threads in the future so it's all valuable information for people coming along later.

          .

          Comment


            #95
            Longnosemonkey: let's get your Windows Boot Manager fixed up. I have a couple ideas. I think it's an artifact from your attempt at using Wubi.

            Please boot into Windows. Start an elevated command prompt (that is, run as administrator). Enter bcdedit. Reply here with the output of that command. I suspect you'll have only two sections: "Windows Boot Manager" and a single "Windows Boot Loader," but I want to be sure first.
            Last edited by SteveRiley; Dec 30, 2012, 06:52 PM.

            Comment


              #96
              At this point, the NVRAM variables contain exactly what they should, and nothing more. Longnosemonkey's variable structure matches the from-scratch dual-boot build I was experimenting with last night. I wouldn't recommend to reinstall now, unless Longnosemonkey wants more hands-on experience.
              *groan*
              I think I'm about to get some hands-on experience.

              I refreshed Windows 8 (instead of restoring to factory defaults) to get rid of all the crap I installed to diagnose problems. But apparently it did something to the boot record.

              I'm getting a screen similar to the one you posted in post #78. I have the option of booting Windows 8 or Ubuntu. Choosing Ubuntu fails and takes me to the Windows Boot Manager page where I got errors. I've explained it above. But choosing Windows 8 works.

              However, GRUB never pops up and the Ubuntu partition no longer shows within Windows. So my Kubuntu partition is now inaccessible.

              SteveRiley... help please?

              Comment


                #97
                I ran bcdedit after the refresh.

                There was a Windows Boot Manager and Windows Boot Loader section. There are also 4 Firmware Application sections: ubuntu, EFI USB, DVD/CD and Network entries.

                Very similar to the entries I'm offered now on boot (picture in #78.)

                Comment


                  #98
                  Originally posted by longnosemonkey View Post
                  I refreshed Windows 8 (instead of restoring to factory defaults) to get rid of all the crap I installed to diagnose problems. But apparently it did something to the boot record.
                  Damn Windows and its assumption that there is no rest-of-world >

                  Let me try this refresh thing to see what kind of damage it does. BRB.

                  Comment


                    #99
                    OK. After I ran through the refresh, my GRUB also disappeared. I never saw the kind of menu that I showed in post #78, however. When I chose refresh, the following happened:

                    * I was prompted to insert installation media (in my case, a bootable USB with Windows 8)
                    * After I did that, a "Refresh" button appeared, which I clicked
                    * The PC rebooted, and the GRUB menu appeared
                    * I choose "Windows 8," and the refresh process started

                    The refresh process has just finished. Indeed, GRUB appears to be missing: the computer boots directly to Windows 8.

                    However, during reboot, I can press F12 to bring up the UEFI boot manager. This is for ThinkPads; I have no idea what the key would be for your computer. The list shows both Windows Boot Manager and ubuntu, which means the UEFI NVRAM variable for Kubuntu is still intact.

                    When I choose that, voila! GRUB appears, and looks like it did before: It contains Ubuntu and Windows 8 entries. Selecting Ubuntu brings me to the Kubuntu desktop.

                    Consulting the output of sudo efibootmgr -v, I can see what's changed: the ubuntu and Windows Boot Manager entries have swapped location, and the line that begins with BootOrder indicates that the Windows NVRAM boot variable is first. If we change the value of BootOrder, we should be able to restore previous behavior.

                    The following is a generic example for how to do this. Assume the output of sudo efibootmgr is:
                    Code:
                    BootCurrent: 00
                    Timeout: 0 seconds
                    BootOrder: 0006,0005,0002,0003,0004
                    Boot0000  Setup
                    Boot0001  Boot Menu
                    Boot0002* Network
                    Boot0003* CD-ROM
                    Boot0004* USB
                    Boot0005* ubuntu
                    Boot0006* Windows Boot Manager
                    I want to flip the boot order of 0006 and 0005, while preserving the others. The command for that is
                    Code:
                    sudo efibootmgr -o 5,6,2,3,4
                    (Yes, you can omit leading zeros.)

                    Note the asterisks in the list: these indicate bootable items. We don't want to disable any current bootableness, we simply want to swap the items in the first and second positions in the BootOrder entry. However, there's no command to do just that; we have to completely specify the full boot order. Hence, my example command will do exactly that. When you press Enter, the full list of variables will be displayed again, and you can verify that the first and second items in the BootOrder line have changed places, while the others remained where they were. Note that the ordering of the individual BootNNNN lines does not change.

                    When you do this on your own computer, please make sure you substitute appropriately, but follow the basic guidelines in my example above. I don't want to guess that what you listed in post #83 is still correct. You may or may not have different BootNNNN variables for ubuntu and Windows Boot Manager. The others -- 2003, 2001, 2002 -- shouldn't have changed. Therefore, your command is most likely going to take the form
                    Code:
                    sudo efibootmgr -o [I]A[/I],[I]B[/I],2003,2001,2002
                    Where A is the NVRAM boot number for ubuntu and B is the NVRAM boot number for Windows Boot Manager.

                    Finally, reboot your computer. GRUB should load, and everything should behave as before.

                    Let me know whether this works for you. If so, then we can finally fix the glitchy Windows Boot Manager itself.
                    Last edited by SteveRiley; Dec 30, 2012, 10:29 PM.

                    Comment


                      That doesn't work for me because, if I choose ubuntu from the Windows blue boot screen (from post#78), the black DOS screen of Windows Boot Manager tells me that Windows failed to start. I don't know why it says Windows failed to start when I chose ubuntu, but that's what it says. (as explained in Post #96)

                      I can choose Windows in the first blue screen, and that boots up Windows 8. Would I be able to change the boot order with EasyBCD or a similar utility?

                      Comment


                        Way back in post #4, you mentioned knowledge of a "BIOS/UEFI prompt." Did you have to press a key during boot to make that appear? That's what I was referring to when I wrote
                        However, during reboot, I can press F12 to bring up the UEFI boot manager. This is for ThinkPads; I have no idea what the key would be for your computer.

                        Comment


                          I can press F12 to boot into InsydeH20. I don't know of any other relevant prompts I can get into. The UEFI/BIOS prompt that I talked about was probably the black DOS-like screen of Windows Boot Manager. I think that's what I was talking about. It popped up like GRUB at boot. I had no control of it.

                          Comment


                            Oh, OK.

                            Stick around for a moment, I will post step-by-step instructions for recovering GRUB.

                            Comment


                              1. Boot your computer with the Kubuntu Live USB. You will need to be connected to wired Ethernet during this procedure.

                              2. When you see the Welcome screen, where you can choose either "Try Kubuntu" or "Install Kubuntu," don't do either. Instead, press Ctrl+Alt+F2.

                              3. At the kubuntu@kubuntu:~$ prompt, enter
                              Code:
                              sudo -i
                              You are now running as root, and the prompt will change to root@kubuntu:~#

                              4. Enter each of the following. From post #70, /dev/sda7 is your root partition, correct? I made an edit to that post based on info from earlier posts. If my edit is wrong, then substitute the correct one in the first item below. You don't need to type the bits after the # marks.
                              Code:
                              mount /dev/sda7 /mnt  # change /dev/sda7 if necessary
                              
                              mount /dev/sda2 /mnt/boot/efi
                              
                              for i in /dev /dev/pts /proc /sys; do mount -B $i /mnt$i; done
                              
                              cp /etc/resolv.conf /mnt/etc/
                              
                              modprobe efivars  # stop if this fails and let me know
                              
                              chroot /mnt
                              You are now running in what's called a "chrooted" environment. Essentially, you've mounted the Kubuntu on your hard drive and transferred into it. It's a very neat concept that has no parallel in the Windows world.

                              5. Now reinstall and update GRUB:
                              Code:
                              apt-get install --reinstall grub-efi-amd64
                              APT will download a fresh copy of GRUB and run the post installation script. This includes writing an updated /boot/grub/grub.cfg and -- crucially -- correctly setting and ordering the UEFI NVRAM boot variables. You will see two outputs that look a lot like the results of running the efibootmgr command. The second one should contain a BootNNNN* ubuntu entry, and that NNNN number should be the first item in the BootOrder list.

                              6. Now get out of the chroot and umount everything. Enter each of the following:
                              Code:
                              exit
                              
                              for i in /sys /proc /dev/pts /dev; do umount /mnt$i; done
                              
                              umount /mnt/boot/efi
                              
                              umount /mnt
                              7. Finally, restart your computer:
                              Code:
                              reboot
                              Does GRUB appear upon boot?

                              Comment


                                SteveRiley, I have important events at work this week so I've made a decision. I've spent two weeks trying to troubleshoot this laptop but I need a functional laptop now. I can't spend any more time on workarounds.

                                I plan to reset the laptop to factory settings and using GParted from the Ubuntu LiveCD, partition the drive to prepare the partitions I mentioned before. I'll leave the Linux partition empty for now, and wait until there official support for SecureBoot. I think Kubuntu 13.04 or 13.10 will do it.

                                But I will be back. I'm excited for the future of Linux. It really has a chance of sprouting this year. Valve again confirmed that Linux-based Steam boxes will be out this year.

                                SteveRiley, if you'll bear with me, can you explain how I could create the partitions in the most safest possible way. I want to use GParted on Ubuntu LiveCD. But if you have better tools, we'll use that.

                                Comment

                                Working...
                                X