Announcement

Collapse
No announcement yet.

Dual Boot & UEFI -- another lost soul

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

    Dual Boot & UEFI -- another lost soul

    Wow! I feel like I am drinking from a fire hydrant. I have been using Linux since 2004, but as a user. I am not skilled in it. I have set up 10-12 laptops and 3-4 desktop with various flavors over the years for family members. Several I have set up as dual boot with some version of Windows. My latest have been some Dell Latitude Windows 7 laptops and I have never had a problem until now. My latest is a E6430 with UEFI. It is set up in UEFI Boot Mode with Secure boot turned off. I would like to keep the Windows 7 install it came with on a 50 GB partition and then install Kubuntu 14.04.2 LTS for the regular use OS. I want 12 GB for a / partition, 6 GB for a /home partition (I link almost everything -- wine, virtualbos, documents, etc -- to the data partition), 8 GB for swap and the rest for a data partition. I plan on running Windows 7 in VirtualBox for the few regular applications that won't run well in Wine. I have gotten the original Windows 7 partition shrunk and the other partitions designated using Windows disk management. All seems to be well on the Windows side on reboot. I have tried to follow Steve Riley's “Dual-booting Kubuntu on a Windows machine” thread part 3, but did have some problems, perhaps because it did not apply to Win 7. When I boot to a live USB my problems start.

    PROBLEMS:
    1. Formatting for my new partitions is grayed out in partition manager (this is also why I had to do the shrinking and partitioning in Windows). Will the installer be able to partition them? Why can I not format them?

    2. When I am ready to install I get a warning:
    The partition table format in use on your disks normally requires you to create a separate partition for boot loader code. This partition should be marked for use as a "Reserved BIOS boot area" and should be at least 1 MB in size. Note that this is not the same as a partition mounted on /boot.
    If you do not go back to the partitioning menu and correct this error, boot loader installation may fail later, although it may still be possible to install the boot loader to a partition.
    I read in several threads that grub should not be used. But what do I do? The more I read this UEFI thing is very confusing to me.

    3. Steve Riley mentioned in a post or two that he did not like installing from the installer in a liveUSB session (or if that is not what he said I apologize). What are the options?

    I really want to save the original Windows install.
    "It is not our task to secure the triumph of truth, but merely to fight on its behalf."--Blaise Pascal
    Asus UX303U Laptop: i7-6500U 2.5GHz; 12GB RAM; 3200x1800
    HP Desktop: AMD Ryzen 7 5700G; 16GB RAM; 3840x2160, NVIDIA GeForce RTX 3060​

    #2
    You are not alone in your discomfort with UEFI, most of us are new at it, even after successfully installing a time or two, even after having been "experts" in the classical GRUB-BIOS-MBR systems.

    I'll drop a fact or three, but must warn you I have not dealt with Windows since XP and GRUB Legacy. I actually know a little more about Windows 8/8.1 and the UEFI stuff, than about Windows 7.

    First, I assume the partitioning type should be GPT since you say you have UEFI with Windows (not the classical MBR)--but I'm not sure how your Windows is set up already, what partitions are there.

    In addition to your usual OS partitions, UEFI also calls for possibly two more partitions: The ESP (EFI System Partition)--very important, can be 200 MB-500MB, FAT32, and will hold the bootloaders loaded on the PC to boot all the OSs. The second partition you sometimes see is a Bios Boot Partition--1 MB in size, no filesystem (it will contain raw binary code), and set a flag on it called bios_grub (the utility gdisk will give it type EF02). This BIOS Boot Partition may not--should not--be used, I don't think, if you have a full UEFI+GPT working.

    As usual, the problem is Windows. We don't really know what you might already have set up with Windows 7. Can you get into Windows and generate a list of all partitions and copy that here? Or use a Kubuntu Live CD and fdisk or gdisk (sudo gdisk -l) to generate a list of all the partitioning. Do you have a GPT (GUID Partition Table -- see Wikipedia on this)? or a classical BIOS-MBR?

    One other note: When messing with these partitions, it is best to use GParted Live CD (or USB). But you said you are doing it OK with the Windows utility, so that's also OK, I think.

    The Kubuntu installer should be OK with all this and should install the OS and GRUB properly (GRUB2 will go into the ESP, if you have a UEFI+GPT setup). I would not let the Kubuntu installer do any of the partitioning or formatting for me; do that with GParted Live CD beforehand.
    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

    Comment


      #3
      And: Is Windows 7 already installed in UEFI mode? or in classical mode? That's important, too. What's really important is if SteveRiley is around! ;-)
      An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

      Comment


        #4
        I see you said Windows is setup in UEFI mode. So probably, the partition table is the newer GPT, and probably you already have the required ESP partition (it is the only partition on a GPT having the boot flag set -- it may read "boot,esp" as its flag).
        An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

        Comment


          #5
          I'll try to be around or check in tonight, but just in case, let me drop another link. This is a new PC with Kubuntu ONLY installed in UEFI, but it alerts you to what is required in a dual boot also. See the Section called -- Install the OS in UEFI mode.


          https://www.kubuntuforums.net/showth...l=1#post368216


          Remember, all this is for UEFI installations. Note that Kubuntu must be the 64-bit version (not 32-bit).
          An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

          Comment


            #6
            Partitions as listed in Windows:
            100 MB Healthy, no type listed (EFI System Partition, came this way)
            C: 50.00 GB NTFS (this is my Windows 7 install shrunk from full disk)
            E: 12 GB NTFS (this will be for my / partition)
            F: 6 GB NTFS (this will be for my /home partition)
            G: 8 GB NTFS (this will be for my SWAP partition)
            H: 389.54 GB NTFS (this will be for my data partition)

            When I boot into the BIOS (maybe no longer the right terminology) it shows set up in UEFI Boot Mode with Secure boot turned off. This is the way the laptop came to me.

            I was not aware of GPT until you post forced me to look into it. I wondered how Windows got 6 primary partitions on my harddrive. Now I know. I must have GPT since I don't have an extended partition. This explains why the laptop shipped with 64 bit OS even though there was only 4 GB RAM. Do I need to use a 64 bit version of Kubuntu? It looks like from what I read that unlike Windows, the 32 bit version of Linux supports GPT. Ooops, just saw your latest post that I need 64 bit Kubuntu.
            "It is not our task to secure the triumph of truth, but merely to fight on its behalf."--Blaise Pascal
            Asus UX303U Laptop: i7-6500U 2.5GHz; 12GB RAM; 3200x1800
            HP Desktop: AMD Ryzen 7 5700G; 16GB RAM; 3840x2160, NVIDIA GeForce RTX 3060​

            Comment


              #7
              I'm gonna guess the 100 MB is the ESP, seems to be what you are saying. If so, it should have the boot flag set on it -- this is how one can identify the ESP -- it is the only partition to have the boot flag set. If you set the boot flag using GParted Live CD, it will set it as
              boot,esp
              Windows 7 should have already done that for you.

              Then see that last link about installing Kubuntu in UEFI mode. When you re-boot the PC with the Kubuntu installer CD, your UEFI-BIOS may see more than one instance of your kubuntu. You want to pick the one to boot to that indicates it is UEFI (explained in that last link, Installing the OS [Kubuntu] in UEFI mode). This * should go automatic * I would think, hope. GRUB2 will be setup (in the ESP), you should re-boot and get a GRUB menu offering either Windows or Kubuntu. We'll see. Having Boot-Repair Live CD handy might be, well, handy, in case you need to fix the booting after installing Kubuntu.
              An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

              Comment


                #8
                Boot-Repair (if you don't have it):

                https://help.ubuntu.com/community/Boot-Repair
                An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                Comment


                  #9
                  Thanks. You have given me some direction (and confidence). I will download gparted live, boot-repair, and Kubuntu 64 and when I have time try the install. If I mess up the MBR or ESP or whatever it boots from I will need more help. Thanks again. I will report back, but it may be Monday.
                  "It is not our task to secure the triumph of truth, but merely to fight on its behalf."--Blaise Pascal
                  Asus UX303U Laptop: i7-6500U 2.5GHz; 12GB RAM; 3200x1800
                  HP Desktop: AMD Ryzen 7 5700G; 16GB RAM; 3840x2160, NVIDIA GeForce RTX 3060​

                  Comment


                    #10
                    ESP partition type will be EF00 (and GParted should show a boot flag set).
                    GParted Live CD should be 64-bit.

                    Again see the brief discussion under the link in Post #5 for things to watch for.

                    Wikipedia is excellent for UEFI, GPT, and ESP definitions/discussion.

                    Good luck.
                    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                    Comment


                      #11
                      Thoughts, as you are preparing this weekend ...

                      -- I notice you use NTSF for your Kubuntu partitions versus the more usual ext4?

                      -- This:
                      Formatting for my new partitions is grayed out in partition manager...
                      Should not happen with GParted Live CD. When you are in GParted, remember to left-click on the partition you wish to play with so it comes into focus and GParted presents its options for it.
                      GParted should see your disk as a GPT disk, btw. As you noted, this may be obvious when it lets you have a bunch of primary partitions without limit (most standard GPT setups provide up to 128 partitions--and I believe you can change this to include even more).

                      -- The Reserved BIOS boot area partition, what I call the BIOS Boot Partition ,1 MB, you mentioned, should not be necessary under the usual UEFI+GPT setup; but you could simply create a 1 MB partition if you wish. It is used in cases where GRUB is used in the classical sense: Stage 1 in the MBR (which in UEFI will be called the Protective Master Boot Record), then you need space for Stage 2 of GRUB (thus, the 1 MB extra partition). But, in UEFI, all GRUB's relevant stuff goes into the ESP partition; all Windows relevant bootloader also goes into the ESP partition. The BIOS Boot Partition has no filesystem (it will contain raw binary GRUB Stage 2 code) and has flag bios_grub. I probably would not worry about this, assuming we are going ahead full-bore with UEFI+GPT+ESP.

                      -- The link I gave you outlines the steps I used in actually setting up the partitions for Kubuntu and then installing Kubuntu in UEFI mode:
                      A new PC build and Kubuntu-only UEFI installation
                      https://www.kubuntuforums.net/showth...l=1#post368216

                      I also have a Study Guide for UEFI posted at Post #109 above this link.
                      https://www.kubuntuforums.net/showth...l=1#post346604


                      When installing Kubuntu, I have always used the Manual method in the installer. The other choices are more "automatic." The Manual choice is the last one listed. Using the Manual method, you can tell the installer what each of your partitions is to be used for: /, /home, swap, etc. I never let the installer re-format these partitions. As I said, my preference--and that of many of us regulars here--is to do the partitioning and formatting before running the Kubuntu Live CD installer. And GParted Live CD is about the best, most reliable way of doing that (though there are other utilities). However ... this is Linux ... it is your choice. And at least two experts I know have said that running the installer in automatic (not Manual) works just fine. I address this question for myself in the link "A new PC build ..."

                      I can't think of anything else at the moment. I believe this should go smoothly for you, without problems--if you line up your ducks ahead of time, as you are doing.

                      If someone drops in here, maybe they will catch something or have a suggestion as well.
                      An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                      Comment


                        #12
                        If I mess up the MBR or ESP or whatever it boots from I will need more help.
                        Btw, do not worry about the ESP partition. First, I'm pretty sure that Windows already set it up for you (the 100 MB partition). And secondly, when you are installing Kubuntu, during the installation, you will not have to be concerned about the ESP. The Kubuntu installer is UEFI+GPT aware, Behind the scenes it will see the ESP, it will place GRUB2 accordingly (we hope in the ESP where it should be).

                        When you run the GParted Live CD, it should show you the ESP, probably FAT32 (I think Windows requires this), we hope it will have the boot flag on it (or a flag called boot,esp).

                        The only thing I see is the size of the ESP--100 MB. Recommended usually is 200-500MB. However, if all you'll be doing on this PC is Windows 7 and one or two versions of Kubuntu, you should be OK. Windows set up that ESP, it might be difficult to change it now, and you certainly do NOT want to mess with the current contents of the ESP (which should be the Windows 7 bootloader files).
                        An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                        Comment


                          #13
                          Good points here all around, Qq. Very nice.

                          @okie2003: That warning you're seeing -- about the Reserved BIOS Boot Area -- appears because you're booting the installation media in BIOS compatibilty mode. Please do not do this. Any advice you see suggesting this is just wrong. Trying to maintain a dual boot system where one operating system is in UEFI mode and the other in BIOS compatibility mode is a chore. Boot the installation media in UEFI mode and you won't be warned about needing this 1 MB partition.

                          Also, you do not have an MBR in a pure UEFI+GPT configuration. Also also, the notion of a "boot flag" in UEFI+GPT is actually meaningless. UEFI requires at least one FAT partition (the ESP) for holding the boot loaders. You can have more than one; the specification doesn't place an upper limit. However, Windows 7 will freak out during installation if it sees more than one ESP. I don't know what Windows 8/8.1 does.

                          During a normal boot, the firmware follows the boot order specified in its NVRAM variables (run sudo efibootmgr -v to see). You can override this by pressing whatever keystroke combination is required on your system to invoke the firmware's built-in boot manager. Here, the firmware enumerates all FAT partitions. It examines each one, looking for boot loader files named /EFI/boot/bootx64.efi. It displays every discovered boot loader and waits for you to pick one.

                          As you're reading the Internet learning about UEFI, be careful what you follow. A gentleman named Rod Smith is always one of the best sources of advice.
                          Last edited by SteveRiley; Mar 31, 2015, 10:51 PM.

                          Comment


                            #14
                            the notion of a "boot flag" in UEFI+GPT is actually meaningless. UEFI requires at least one FAT partition (the ESP) for holding the boot loaders.
                            Except, of course, the boot flag on the ESP, though the ESP can also be identified by type, I'm not sure how the UEFI system looks for the ESP.

                            I've referenced several specific links to Rod Smith in the Study Guide I linked to. The ArchWiki is also pretty good, as are Adam W(illiamson)'s articles.

                            You'll find examples of the sudo efibootmgr -v in the Study Guide and in my newer New PC Build--Kubuntu only--messing with UEFI. But for now, you needn't worry about this. Wait until you complete your installation, then you can explore it.

                            the Reserved BIOS Boot Area -- appears because you're booting the installation media in BIOS compatibilty mode.
                            Good point, if that's what you are doing. Again, read the New PC Build I referenced to see how to identify the UEFI mode of the Kubuntu installer DVD. It will actually say something like UEFI (FAT)... and some reference to your DVD drive and/or to Kubuntu. That's the one you choose to boot to when you actually install Kubuntu in UEFI mode. IOW, when you boot the Kubuntu installer DVD, and you press your key to enter UEFI-BIOS setup on your PC, your DVD drive may show up twice (or more) in your PC's UEFI-BIOS menu. Choose the instance that says something about UEFI. That way you will install Kubuntu in UEFI mode and not in the classical non-UEFI or BIOS mode (for which that BIOS Boot Partition is needed). As Steve says, you want BOTH your Windows and your Kubuntu installed in the same mode: UEFI.
                            Last edited by Qqmike; Mar 31, 2015, 06:21 AM.
                            An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                            Comment


                              #15
                              (I can't format anything here in my posts! Have to look into this.)
                              (Edit: I'm set up for WYSIWYG messaging/editing, but I am not getting that here: no formatting options (like bold etc.), I can't introduce a paragraph break by pressing Enter, etc. I'll deal with this later but just to say why my post above looks funny, busy/ not organized.)
                              (Edit again: OK, I logged out of both Kubuntu tabs I had open and closed them. Then opened Kubuntu again, logged back in, disabled NoScript, and now am able to properly work WYSIWYG with full editing. Thus, I fixed my ugly post above and now it is less ugly. Sorry for this detour.)
                              Last edited by Qqmike; Mar 31, 2015, 06:24 AM.
                              An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                              Comment

                              Working...
                              X