Announcement

Collapse
No announcement yet.

Dual Boot issue with UEFI

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

    Dual Boot issue with UEFI

    I have a brand new HP G7 laptop, which has UEFI. I have disabled UEFI in BIOS - it is booting in Legacy Mode.

    I can install either Windows 7 or Linux without issue. But, I cannot get dual booting working. This is my personal laptop and having the dual boot between Windows and Kubuntu is really useful for me.

    If anyone has dealt with this, or has some idea how to resolve this, I would really appreciate it.

    Thanks!

    #2
    1. Return to UEFI mode. Trust me, multi-booting will be much easier here.

    2. Boot from a Kubuntu USB, don't install. Open a command window and wipe out the first 1 MB of space on the hard drive:
    Code:
    sudo dd if=/dev/zero of=/dev/sda bs=1M count=1
    3. Install Windows 7.

    4. Install Kubuntu. Into a separate partition, of course.

    5. Install the rEFInd boot manager. Simple, elegant, and a zillion times smarter than GRUB. It automatically detects every operating system on every partition and presents them in a list. It knows where to find kernels and boot loaders. It doesn't rely on dodgy "OS probing" and thorny configuration files with opaque syntax. Seriously, I cannot praise this tool enough. It rawks.

    Comment


      #3
      BRAVO!!! I am in the way of probably having to get a UEFI machine.

      But....from what you say, the intended use is on a UEFI machine which does not have a pre-loaded OS?

      3. Install Windows 7
      woodsmoke
      sigpic
      Love Thy Neighbor Baby!

      Comment


        #4
        Originally posted by woodsmoke View Post
        But....from what you say, the intended use is on a UEFI machine which does not have a pre-loaded OS?
        All new machines come with UEFI now. You can still run them in legacy mode, which I don't recommend. UEFI mode is, once you learn it, much easier to maintain.

        Comment


          #5
          Originally posted by SteveRiley View Post
          1. Return to UEFI mode. Trust me, multi-booting will be much easier here.

          2. Boot from a Kubuntu USB, don't install. Open a command window and wipe out the first 1 MB of space on the hard drive:
          Code:
          sudo dd if=/dev/zero of=/dev/sda bs=1M count=1
          3. Install Windows 7.

          4. Install Kubuntu. Into a separate partition, of course.

          5. Install the rEFInd boot manager. Simple, elegant, and a zillion times smarter than GRUB. It automatically detects every operating system on every partition and presents them in a list. It knows where to find kernels and boot loaders. It doesn't rely on dodgy "OS probing" and thorny configuration files with opaque syntax. Seriously, I cannot praise this tool enough. It rawks.
          you replied to this 10 days ago, and for some reason the email notification went into my 'spam' folder - annoying!

          anywho! thank you very much for the steps! starting it now! i'll post back later with my results.

          Comment


            #6
            i tried the above, but it is not working. i cannot dual boot.

            i can either have a single boot Windows laptop or a single boot Linux laptop.

            frustrating would be a great word to insert here.

            Comment


              #7
              trying this:
              disabling UEFI in BIOS, then installing 7, then Kubuntu, then eEFInd. will post back the results later - and not nearly a week later at that.

              Comment


                #8
                so, with disabling UEFI and doing the 'dd' step above - that got it working!

                HOLY HELL! HAPPY DAYS!!!

                Comment


                  #9
                  Originally posted by SteveRiley View Post
                  5. Install the rEFInd boot manager. Simple, elegant, and a zillion times smarter than GRUB. It automatically detects every operating system on every partition and presents them in a list. It knows where to find kernels and boot loaders. It doesn't rely on dodgy "OS probing" and thorny configuration files with opaque syntax. Seriously, I cannot praise this tool enough. It rawks.
                  Before I excitedly dive into this and bork up my main box, what benifits does rEFInd give to single boot/ single OS booting? Other than fs driver loading? I'm using grub-efi without any timers (hidden timer), which boots straight to Kubuntu on power-up without a grub menu.
                  I do not personally use Kubuntu, but I'm the tech support for my daughter who does.

                  Comment


                    #10
                    Originally posted by not12listen View Post
                    i tried the above, but it is not working. i cannot dual boot. i can either have a single boot Windows laptop or a single boot Linux laptop.
                    Can you explain this in more detail? Do you mean that you can have only of the two operating systems installed? Or that both are installed, but you have no easy way to choose one or the other during boot?

                    Originally posted by not12listen View Post
                    disabling UEFI in BIOS, then installing 7, then Kubuntu, then eEFInd. will post back the results later - and not nearly a week later at that.
                    This will not work. rEFInd won't properly install if the firmware is running in BIOS compatibility mode. You could modify the above instructions to include the step "re-enable UEFI mode" before "then rEFIND," but have you ever tried converting an installed Windows from BIOS mode to UEFI mode? It's painful.

                    Originally posted by Buddlespit View Post
                    what benifits does rEFInd give to single boot/ single OS booting? Other than fs driver loading? I'm using grub-efi without any timers (hidden timer), which boots straight to Kubuntu on power-up without a grub menu.
                    GRUB is, in essence, a complete operating system. It has become much too bloated, it's brittle, its probe methods are crude and sometimes break, it suffers from certain graphics incompatibilities, and its UEFI support is questionable. Sledgehammers are not appropriate when the correct tool is a scalpel.

                    rEFInd follows original Linux paradigms: do one thing, and do it well. rEFInd's small boot loader presents a simple boot manager menu: the results of searching all partitions for other EFI boot loaders. Pick the one you want, and the associated operating system takes over.

                    rEFInd's biggest benefit comes from the simplicity with which it manages multi-boot scenarios. The Linux kernel is now its own EFI boot loader. So for Linux, you can completely remove GRUB (or ELILO, if you're using that). When rEFInd scans your partitions, it will present all discovered Linux kernels in its menu. If you have Windows 7 in another partition, it will also present the Windows EFI boot loader.

                    But even if you're single-booting a single Linux, rEFInd is better. GRUB still sucks. You can configure rEFInd to skip its menu. But say you want to experiment with a second Linux. Riddle me this: whose GRUB gets to rule? This can be a problem. rEFInd is much more elegant here. On my machine, I have two Linuxes installed. Kubuntu is in /dev/sda2 and Arch is in /dev/sda3. rEFInd is installed to /dev/sda1, my EFI boot partition. When the machine boots, its menu presents both kernels. I pick the one corresponding to the operating system I wish to start.

                    Comment


                      #11
                      OK, I dl'ed and installed rEFInd, purged GRUB-EFI(x86_64) and cleaned /boot/efi/EFI to reflect only rEFInd. System seems to boot up just fine. Trying to wade thru Rod Smith's pages to figure out how to make rEFInd boot my first kernel without a timeout (autoboot), only pulling up the menu on a keypress (ie- grub2 menu only appears if "shift" pressed).

                      This man likes to write...
                      I do not personally use Kubuntu, but I'm the tech support for my daughter who does.

                      Comment


                        #12
                        Yes, Rod likes to write...but UEFI needs a lot of writing now. It's still very new, and there's much to learn.

                        Here's my /boot/efi/EFI/refind.conf, edited to remove uninteresting or irrelevant comments.

                        Code:
                        # Timeout in seconds for the main menu screen. Setting the timeout to 0
                        # disables automatic booting (i.e., no timeout).
                        #
                        timeout 20
                        
                        # Use text mode only. When enabled, this option forces rEFInd into text mode.
                        # Passing this option a "0" value causes graphics mode to be used. Pasing
                        # it no value or any non-0 value causes text mode to be used.
                        # Default is to use graphics mode.
                        #
                        textonly 1
                        
                        # Launch specified OSes in graphics mode. By default, rEFInd switches
                        # to text mode and displays basic pre-launch information when launching
                        # all OSes except OS X. Using graphics mode can produce a more seamless
                        # transition, but displays no information, which can make matters
                        # difficult if you must debug a problem. Also, on at least one known
                        # computer, using graphics mode prevents a crash when using the Linux
                        # kernel's EFI stub loader. You can specify an empty list to boot all
                        # OSes in text mode.
                        # Valid options:
                        #   osx     - Mac OS X
                        #   linux   - A Linux kernel with EFI stub loader
                        #   elilo   - The ELILO boot loader
                        #   grub    - The GRUB (Legacy or 2) boot loader
                        #   windows - Microsoft Windows
                        # Default value: osx
                        #
                        use_graphics_for
                        
                        # Set the default menu selection.  The available arguments match the
                        # keyboard accelerators available within rEFInd.  You may select the
                        # default loader using:
                        #  - A digit between 1 and 9, in which case the Nth loader in the menu
                        #    will be the default. 
                        #  - Any substring that corresponds to a portion of the loader's title
                        #    (usually the OS's name or boot loader's path).
                        #
                        default_selection liquorix
                        There isn't a "press to interrupt" support that I can find. You might try a combination of a short timeout (2 seconds, say) and configuring a default selection. Any text in the string will work; if you have a kernel 3.8 and a 3.10, then default_selection 3.10 will do exactly as you suspect. You might also try setting the menu to text only and disabling graphics boot for OS launches. Both of these seem to make the boot proceed marginally quicker.

                        In case you're wondering about my default selection... I don't use the Ubuntu-provided kernel. Instead, I use the Liquorix kernel. Why? The default is quite generic, supporting both desktops and servers, and contains a number of unused modules. The Liquorix kernel is tuned specifically for desktop use.

                        Comment


                          #13
                          Originally posted by SteveRiley View Post
                          In case you're wondering about my default selection... I don't use the Ubuntu-provided kernel. Instead, I use the Liquorix kernel. Why? The default is quite generic, supporting both desktops and servers, and contains a number of unused modules. The Liquorix kernel is tuned specifically for desktop use.
                          For some reason, I thought you configured and compiled your own kernel taylored for your desktop, uber-guru that you are...

                          I've actually been looking for a way to get rEFInd to stop passing the kernel options it found in grub as I installed it, before grub was uninstalled. It's still booting with "quiet nosplash". I got the timer set to 10 seconds, which is acceptable until I get tired of playing with the new toy. My default_selection is 0, which is my first kernel shown, which is the highest numbered kernel I have (3.10.7).

                          I'll definitly look into Liquorix. I'm always one to try new things.
                          I do not personally use Kubuntu, but I'm the tech support for my daughter who does.

                          Comment


                            #14
                            Originally posted by Buddlespit View Post
                            For some reason, I thought you configured and compiled your own kernel taylored for your desktop, uber-guru that you are...
                            I've looked into that. My billion-core ThinkPad with a zigabyte of RAM flies so fast that compiling my own kernels would really be nothing more than a waste of about six seconds.

                            Originally posted by Buddlespit View Post
                            I've actually been looking for a way to get rEFInd to stop passing the kernel options it found in grub as I installed it, before grub was uninstalled. It's still booting with "quiet nosplash".
                            This might be because rEFInd's default allows the OS to boot in graphical mode. Set these two lines in /boot/efi/EFI/refind.conf:
                            Code:
                            textonly 1
                            use_graphics_for
                            If you do need to pass kernel parameters, those would be in the file /boot/refind_linux.conf. You might find GRUB's parameters here; the rEFInd installer might copy them. I really don't know. In any case, check yours to be sure. Here's mine:
                            Code:
                            steve@t520:~$ [B]cat /boot/refind_linux.conf[/B]
                            "Boot to X"             "ro root=/dev/sda2 nox2apic nmi_watchdog=0 elevator=noop acpi_osi=Linux pcie_aspm=force raid=noautodetect"
                            "Boot to single user"   "ro root=/dev/sda2 nox2apic nmi_watchdog=0 elevator=noop acpi_osi=Linux pcie_aspm=force raid=noautodetect single"
                            "Boot to recovery"      "ro root=/dev/sda2 nox2apic nomodeset recovery"
                            My ThinkRocket has the following partition layout:
                            Code:
                            steve@t520:~$ [B]lsblk[/B]
                            NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
                            sda      8:0    0 238.5G  0 disk 
                            ├─sda1   8:1    0   512M  0 part /boot/efi
                            ├─sda2   8:2    0   120G  0 part /
                            ├─sda3   8:3    0   109G  0 part /mnt/Arch
                            └─sda4   8:4    0     9G  0 part [SWAP]
                            sdb      8:16   0 931.5G  0 disk 
                            └─sdb1   8:17   0 931.5G  0 part /mnt/data
                            For Kubuntu, my root partition is /dev/sda2. For Arch, my root partition is /dev/sda3. Here is my /boot/refind_linux.conf on the Arch side:
                            Code:
                            steve@t520:~$ cat [B]/mnt/Arch/boot/refind_linux.conf[/B]
                            "Boot to X"             "ro root=/dev/sda3 nox2apic nmi_watchdog=0 elevator=noop acpi_osi=Linux pcie_aspm=force raid=noautodetect systemd.unit=graphical.target"
                            "Boot to single user"   "ro root=/dev/sda3 nox2apic nmi_watchdog=0 elevator=noop acpi_osi=Linux pcie_aspm=force raid=noautodetect systemd.unit=multi-user.target"
                            "Boot to recovery"    "ro root=/dev/sda3 nox2apic nomodeset systemd.unit=rescue.target"
                            Note the differently named root partition and the systemd syntax for boot targets.

                            Originally posted by Buddlespit View Post
                            I got the timer set to 10 seconds, which is acceptable until I get tired of playing with the new toy. My default_selection is 0, which is my first kernel shown, which is the highest numbered kernel I have (3.10.7).
                            Once you receive an update to the 3.8 kernel, that will become your new default. rEFInd always defaults to the most-recently-dated image. If you want to keep 3.10 as your boot default, you'll need to adjust defalt_selection accordingly.

                            Comment


                              #15
                              Originally posted by SteveRiley View Post
                              If you do need to pass kernel parameters, those would be in the file /boot/refind_linux.conf. You might find GRUB's parameters here; the rEFInd installer might copy them. I really don't know. In any case, check yours to be sure. Here's mine:
                              [code]steve@t520:~$ cat /boot/refind_linux.conf
                              For some reason, I couldn't find that file. Prolly from some "reading comprehension" issues...
                              I do not personally use Kubuntu, but I'm the tech support for my daughter who does.

                              Comment

                              Working...
                              X