Page 1 of 6 123 ... LastLast
Results 1 to 10 of 57

Thread: Win 7, Natty dual boot on UEFI sort of working

  1. #1
    Join Date
    Mar 2009
    Beans
    7

    Win 7, Natty dual boot on UEFI sort of working

    Hello everyone,

    After more than a week of fiddling (20+ hours) i finally managed to boot natty in a dual boot setup with windows 7 on a UEFI only motherboard (no fallback BIOS). I am really happy about this and could not find any how to that applied to my situation, so I'm posting this quite cumbersome manual method of booting. EDIT: only one key press still required.

    I don't have much experience using grub. Previous dual boot configurations always worked automatically for me. Any comments on how to improve things are very welcome!

    Situation: Asrock p67 extreme4 motherboard with UEFI. One hdd (sda) and one ssd (sdb). Windows 7 installed and boots fine. Windows created GPT partitions: sdb1 as EFS, sdb2 as MRP and sdb3 for Windows 7.

    I Installed Ubuntu 11.04 on sdb4 with the bootloader on sdb1. The installer changed absolutely nothing on the boot partition, so i used the LiveCD to manually install grub there. This failed because of an error (cannot stat aufs), but using the help on the ubuntu bug 703009 page i got it working. (https://bugs.launchpad.net/ubuntu/+s...b2/+bug/703009 post 14 and 22)

    I will use / to denote /dev/sdb1, the EFS partition root. My boot partition now had the following folders: /EFI/Boot, /EFI/Microsoft, /EFI/grub (all the grub files) /EFI/ubuntu (empty)

    Still no grub boot option on the UEFI bootloader and booting sdb gave me just a blinking underscore.

    Next thing i did was download the UEFI shell (http://tianocore.git.sourceforge.net...ll.efi;hb=HEAD, thanks to the archlinux forum), rename it to shellx64.efi as requested by my UEFI and put it in /, /EFI and /EFI/Boot, just to be sure. It's probably supposed to be in /.

    Now to the actual booting: go into UEFI, go to the exit page and start the shell.
    - type fs0:
    - cd to directory containing grub.efi (EFI\grub in my case)
    - type grub.efi

    In grub do the following:
    set root=(hd1,4) (change according to your situation)
    linux /vmlinuz root=/dev/sdb4 ro (change this as well)
    initrd /initrd.img
    boot

    This method boots my system into Ubuntu, where i can now finally catch up on a lot of work

    There are probably two ways to automate this process:
    - Install grub correctly (If anyone knows how, please let me know).
    - Create a UEFI shell script to start grub and do something in grub to make it autoboot ubuntu.

    EDIT:
    I fiddled around a bit and now i get a proper grub menu, though i'm not sure what exactly i did.

    The UEFI shell script works, using the script bit at the bottom of this page: http://software.intel.com/en-us/arti...and-scripting/
    The main problem I had to overcome here was getting the script to autorun. My UEFI setup has no shell option in the bootloader (no auto shell at startup, it has to be manually selected every time). To solve this I cloned the EFS partition and replaced the windows bootloader on one of them with the shell. The bootscript points to the windows files on the other partition.

    I'm not sure how clear all of this is, but hopefully it saves other people some time.

    This method still requires one keypress, since I couldn't figure out how to autoselect an option in the script after a set amount of seconds. It would be much appreciated if someone can point me in the right direction here.
    Last edited by SaryonOnline; May 9th, 2011 at 09:44 PM.

  2. #2
    Join Date
    Mar 2006
    Beans
    129

    Re: Win 7, Natty dual boot on UEFI sort of working

    I'm going to be purchasing an Asrock UEFI mobo for a friend's PC build soon.

    It's going to be running just Ubuntu 11.04 (no windows)
    I'll let you know how it goes.

    J.

  3. #3
    Join Date
    Mar 2009
    Beans
    7

    Re: Win 7, Natty dual boot on UEFI sort of working

    I think i had just ubuntu running a while back, using MSDOS format partition tables. I switched to GPT because, as far as i know, 7 needs GPT.

    Also, I now have a makeshift shellscript bootloader with options for windows, grub and the shell, but no way to autoboot it without breaking the windows bootloader.

    EDIT: updated the first post with more info.
    Last edited by SaryonOnline; May 9th, 2011 at 08:16 PM.

  4. #4
    Join Date
    Aug 2011
    Beans
    8

    Re: Win 7, Natty dual boot on UEFI sort of working

    I Installed Ubuntu 11.04 on sdb4 with the bootloader on sdb1. The installer changed absolutely nothing on the boot partition, so i used the LiveCD to manually install grub there. This failed because of an error (cannot stat aufs), but using the help on the ubuntu bug 703009 page i got it working. (https://bugs.launchpad.net/ubuntu/+s...b2/+bug/703009 post 14 and 22)
    Could you expound on this, please? I'm not sure how to install grub on the EFI partition.

    I have a 64-bit UEFI machine with Windows 7 currently installed. I'm trying to figure out what the next step is to install Ubuntu 11.04.

    My partitions are like so:
    sda1 = Linux partition (not yet installed)(60 GB)
    sda2 = Windows (100 GB)
    sda3 = EFI (don't know how it got to sda3, but it did) (100 MB)
    sda4 = Swap (4GB)
    sda5+ = unallocated, but I intend to make a partition for installed Programs (~336 GB)

    sdb = Documents (NTFS) (1.5TB)

    sdc = External HDD (1.0 TB)

    Last night, I tried to install Ubuntu on sda1 (mounted / there) and indicated sda3 as an EFI partition. In the process, Ubuntu wiped out the Windows boot files in the EFI, but when it restarted it went straight to Ubuntu (no GRUB boot options, but at least it booted into Ubuntu). Once it was loaded up, it updated some files and needed to restart. Upon restart, it went to "grub rescue>", but the only functions it recognized were ls and set. Not insmod, boot, normal, etc.

    Fortunately, I had set a restore point for Windows so I restored everything up until the point where I started installing Ubuntu. So now what should I try?

    Also, I downloaded a new copy of the Ubuntu .iso and created a new USB Live disk just in case I had a faulty .iso originally.

  5. #5
    Join Date
    Sep 2008
    Location
    Filipinas; Formosa
    Beans
    201
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Win 7, Natty dual boot on UEFI sort of working

    Quote Originally Posted by SaryonOnline View Post
    Hello everyone,

    After more than a week of fiddling (20+ hours) i finally managed to boot natty in a dual boot setup with windows 7 on a UEFI only motherboard (no fallback BIOS). I am really happy about this and could not find any how to that applied to my situation, so I'm posting this quite .....
    I want to follow your procedure on my UEFI notebook. One thing, did you install Windows 7 first? I know in MBR systems, it is recommended to install Windows first, then Ubuntu.

    Did you use chainloading? (as described below)
    https://help.ubuntu.com/community/UEFIBooting
    i5-750/P55-UD3P/HD4850 1GB DDR3/4GB DDR3 A-Data Ubuntu 11.04 x64 Natty/Igelle 1.0.0 DSV /Windows7 x64 (for gaming)

  6. #6
    Join Date
    Mar 2010
    Location
    Woonsocket, RI USA
    Beans
    3,195

    Re: Win 7, Natty dual boot on UEFI sort of working

    SaryonLinux,

    I'm afraid I missed this thread earlier. You might want to try using rEFIt as your primary boot loader. The following procedure should do the trick:


    1. Boot Ubuntu in whatever way you can.
    2. Open a Terminal window.
    3. Type "cd /boot/efi/EFI".
    4. Type "sudo mv BOOT BOOT-backup". (In theory, you could delete the BOOT directory, since it should just contain a duplicate of another boot loader, but I want to be sure you don't delete something important if your files are a bit odd.)
    5. Type "sudo mkdir BOOT".
    6. Type "sudo apt-get install refit".
    7. Type "cd /usr/lib/refit".
    8. Type "sudo cp -r refit/* /boot/efi/EFI/BOOT".
    9. Type "sudo cp x64/refit.efi /boot/efi/EFI/BOOT/bootx64.efi".
    10. Use your favorite editor to edit the /boot/efi/EFI/BOOT/refit.conf file. Locate the line that reads "#textonly" and uncomment it by removing the "#" at the start of the line.



    This sets up rEFIt as the default boot loader; however, depending on your configuration, it could be that your system is configured to use something else (perhaps launch the EFI shell that you installed), so you might need to do some more configuration to get it running by default.

    When rEFIt does run, you'll see a list of EFI boot loaders from which you can select. rEFIt also probes for and offers BIOS boot loaders; however, most or all of these will be useless on your system, so they'll clutter the boot loader display unnecessarily. (Unfortunately, there's no way to configure rEFIt to ignore them.)
    If I've suggested a solution to a problem and you're not the original poster, do not try my solution! Problems can seem similar but be different, and a good solution to one problem can make another worse. Post a new thread with your problem details.

  7. #7
    Join Date
    Mar 2010
    Location
    Woonsocket, RI USA
    Beans
    3,195

    Re: Win 7, Natty dual boot on UEFI sort of working

    Quote Originally Posted by ProNux View Post
    I want to follow your procedure on my UEFI notebook. One thing, did you install Windows 7 first? I know in MBR systems, it is recommended to install Windows first, then Ubuntu.
    Ubuntu's installer (through at least 11.04) has the unfortunate habit of trashing the EFI System Partition (ESP; what SaryonOnline referred to as the "EFS"). The contents of this partition are vital for any OS that boots, so if you install Windows first and Ubuntu second, the result is that Windows will no longer be bootable. SayonOnline seems to have escaped this fate by manually partitioning and not identifying the EFI System Partition (ESP). This has the effect of not installing GRUB, so that Ubuntu won't boot, and SaryonOnline had to install GRUB manually.

    If you install Ubuntu first and identify your ESP as such in the partitioning screen, Ubuntu creates a FAT-16 ESP. Unfortunately, Windows expects to see a FAT-32 ESP, so Windows won't install. What's more, the ESP that Ubuntu creates is tiny -- normally under 100 MiB, although I think the size varies depending on the disk size. Windows creates a 100 MiB ESP by default. For some boot loaders, an ESP of well over 100 MiB is desirable, since the Linux kernel and initial RAM disk must be stored on the ESP (or on some other partition that the EFI can read).

    All of this sets up a nasty obstacle course. There are several ways to navigate it. In broad outline, the simplest way is probably:


    1. Boot using an emergency disc and set up GPT partitions, including a 200-300 MiB FAT32 ESP at the start of the disk and a 1 MiB BIOS Boot Partition.
    2. Install Windows in UEFI mode.
    3. Switch to BIOS mode and install Ubuntu.
    4. In Ubuntu (booted in BIOS mode), install an EFI-capable boot loader to the ESP.
    5. Switch the computer back to UEFI mode.



    It should now be possible to boot Windows or Ubuntu in UEFI mode, although you may need to do a bit more fiddling to get everything working completely correctly.

    SaryonOnline claims that his motherboard doesn't have a BIOS fallback mode. This is the first I've heard of such a thing in a modern motherboard, although older EFI implementations lacked this feature, and it's conceivable that some modern boards lack it, too. If you lack a BIOS boot mode, or if you just want to do it the hard way, you could do this:


    1. Boot using an emergency disc and set up GPT partitions, including a 200-300 MiB FAT32 ESP at the start of the disk.
    2. Install Windows in UEFI mode.
    3. Boot using an emergency disc and back up the contents of the ESP. (A normal file copy to a removable disk will do fine.)
    4. Install Ubuntu in UEFI mode, being sure to point out the ESP to the installer if you do manual partitioning.
    5. When you reboot into your working Ubuntu system, restore the EFI/Microsoft directory from the ESP backup you made earlier. For extra flexibility in the future, you could back up the ESP, convert it back to FAT32, and restore everything. This will likely require editing /etc/fstab.
    6. Re-run the update-grub script. In theory, this should detect your Windows installation and add it to GRUB's menu. If not, you could install rEFIt, as described in my previous post, to use as the OS selector.



    Be aware that many people have reported problems with GRUB 2 in UEFI mode, particularly using the Ubuntu package. Thus, you may need to install it from source code yourself or use another boot loader, such as ELILO, to boot Ubuntu. ELILO can boot a Linux kernel but can't chainload to another boot loader or OS. rEFIt can chainload to another boot loader but can't load a Linux kernel directly. IMHO, the best combination of boot loaders for a dual-boot Windows/Linux UEFI computer is to use rEFIt to select the OS, ELILO to boot a Linux kernel, and the Windows EFI loader to boot the Windows kernel.
    If I've suggested a solution to a problem and you're not the original poster, do not try my solution! Problems can seem similar but be different, and a good solution to one problem can make another worse. Post a new thread with your problem details.

  8. #8
    Join Date
    Sep 2008
    Location
    Filipinas; Formosa
    Beans
    201
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Win 7, Natty dual boot on UEFI sort of working

    @srs5694
    Thanks for the detailed procedure.
    I'm a bit confused on my NB right now.

    1. I have a Phoenix SecureCore Tiano BIOS (which supports both UEFI & BIOS)
    2. The BIOS has no option to select if UEFI/GPT or BIOS/MBR
    3. To know whether the factory settings uses UEFI/BIOS, I transfered the hard disk to my Ubuntu desktop and found out that the partitioning is MBR (by using gparted).
    4. I proceed to install Ubuntu x64 alongside Windows 7 x64 by BIOS/MBR mode.
    5. Install went fine (as I normally do on my desktop).
    6. After install, GRUB won't show up and just boots directly to Windows.
    7. @ Windows, I check the Disk manager & the Ubuntu partition/swap partition was there.
    8. I tried to reinstall both Windows 7 x64 & Ubuntu x64 on a DIFFERENT hard disk. SAME thing happens - GRUB won't show up, instead, it boot directly to Windows.

    In this wiki,
    https://help.ubuntu.com/community/UEFIBooting

    They said
    Some machines (all Dell laptops, all new Apple from 2010 on, some Lenovo) have bugs in their UEFI firmware, preventing them from booting (black screen). Linux Kernel 3.0 (and higher versions) includes patches with workarounds for them. It is therefore recommended to use a Linux kernel of version 3.0 or higher.
    so right now, I am downloading the Ubuntu 11.10 beta with kernel 3.0 and will later know if this solves my problem.

    My notebook is Fujitsu PH521.


    UPDATE:
    After installing Ubuntu Beta with kernel 3.0, NOTHING happens. I have done almost all efforts for this simple task to no avail. I have installed several dual boot OS on my PCs without problem. Even Ubuntu-only installation (NO WINDOWS), the notebook just freezes at boot, no grub bootloader.
    Last edited by ProNux; September 22nd, 2011 at 03:54 PM. Reason: Update
    i5-750/P55-UD3P/HD4850 1GB DDR3/4GB DDR3 A-Data Ubuntu 11.04 x64 Natty/Igelle 1.0.0 DSV /Windows7 x64 (for gaming)

  9. #9
    Join Date
    Mar 2010
    Location
    Woonsocket, RI USA
    Beans
    3,195

    Re: Win 7, Natty dual boot on UEFI sort of working

    Quote Originally Posted by ProNux View Post
    2. The BIOS has no option to select if UEFI/GPT or BIOS/MBR
    Based on my personal experience, reports I've read, and manuals I've read, such options are usually present in UEFI boards but are usually very poorly labelled. Check your firmware's Boot menu, or anything that might be labelled in a similar way. There may be an option relating to "legacy boot" (read: BIOS boot) or references to UEFI-specific features (such as a UEFI boot loader).

    6. After install, GRUB won't show up and just boots directly to Windows.
    This sounds like GRUB wasn't installed, or perhaps it installed to a partition rather than to the MBR. This could happen because of a bug or because you selected an option during installation that prevented its installation to the MBR.

    Your best bet is to download the Boot Info Script and run it from a Linux emergency disc. It will produce a file called RESULTS.txt. Post it here, either as an attachment or between [code] and [/code] tags for legibility.

    Since you're booting in BIOS mode, this is irrelevant. Furthermore, this describes a kernel issue, and since you aren't even seeing a GRUB screen, the kernel is irrelevant. (GRUB loads the kernel, so if GRUB doesn't run, the kernel can't be involved in the problem.)
    If I've suggested a solution to a problem and you're not the original poster, do not try my solution! Problems can seem similar but be different, and a good solution to one problem can make another worse. Post a new thread with your problem details.

  10. #10
    Join Date
    Sep 2008
    Location
    Filipinas; Formosa
    Beans
    201
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Win 7, Natty dual boot on UEFI sort of working

    @srs5694

    I managed to install & boot UBUNTU ONLY on my notebook. I used the Startup Disk Creator on my Ubuntu desktop & USB flash drive (originally, I used unetbootin, not sure if it was related).

    I'm sure there were no boot selection (UEFI or BIOS) in the Bios Menu as there were only a FEW options to change.

    Here are my discoveries on my notebook.

    1. After Ubuntu install, the partition was default to GPT!! It was done automatically.

    Originally when I install a fresh copy of Windows, it defaults to BIOS/MBR partitioning!!

    Here I conclude (yet as of the moment) that my BIOS (Phoenix SecureCore Tiano compiled by Fujitsu) decides automatically if it will use GPT/MBR. Correct me if I am wrong.

    2. There is an ADDED item in "Boot Selection Menu" (F12). The item added is "ubuntu", --> 1. Drive0, 2. NETWORK, & the added item 3. ubuntu

    Now, I tried to change the hard disk with Ubuntu with the factory hard disk where the original Windows was installed. Checking the BIOS, the UBUNTU boot item (F12) is STILL THERE!! OMG, where did it save that "ubuntu" boot menu selection item when I already changed the hard disk???

    Does this mean the BIOS has a built-in writable memory??? How to erase it (when I might need to)??? Resetting to BIOS defaults DOES NOT erase the "ubuntu" boot item.


    Actually this is my 2nd Fujitsu notebook, the first one was changed after a week I purchased (same exact model). I screwed the BIOS that time as I forced install Windows on GPT then I was faced with an infinite reboot loop at BIOS and the worst part, I cannot enter the BIOS. Glad they replaced it.

    So right now, I'm extra careful LOL. I'll continue tomorrow. It's already past 1:00 AM.

    Wish me luck.
    Last edited by ProNux; September 22nd, 2011 at 06:33 PM.
    i5-750/P55-UD3P/HD4850 1GB DDR3/4GB DDR3 A-Data Ubuntu 11.04 x64 Natty/Igelle 1.0.0 DSV /Windows7 x64 (for gaming)

Page 1 of 6 123 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •