Results 1 to 10 of 11

Thread: dual boot efi windows and efi linux

Hybrid View

  1. #1
    Join Date
    Sep 2010
    Beans
    6

    dual boot efi windows and efi linux

    Hi,

    I have a new x64 HP computer that supports EFI. I installed windows 7 pro using a EFI bootable usb thumb drive. Windows 7 works great. Now I want to install Ubuntu Lucid Lynx also by booting from a EFI bootable usb thumb drive. Unfortunately Ubuntu doesn't seem to support EFI booting for installation. So my plan is to boot the ubuntu installer using legancy mode and download grub 1.99 and do the following:
    export EFI_ARCH=x86_64 ./configure --with-platform=efi --target=${EFI_ARCH} --program-prefix="" make
    sudo mkdir -p /mnt/EFISYS # if the mount-point does not exist sudo modprobe dm-mod # required to make grub-probe stop complaining sudo mount -t vfat -o rw,users /dev/sdc1 /mnt/EFISYS sudo mkdir -p /mnt/EFISYS/efi/grub
    cd <grub2_compiled_source_dir>/grub-core ../grub-mkimage -O ${EFI_ARCH}-efi -d . -o grub.efi -p "" part_gpt part_msdos ntfs ntfscomp hfsplus fat ext2 normal chain boot configfile linux multiboot sudo cp grub.efi *.mod *.lst /mnt/EFISYS/efi/grub
    sudo touch /mnt/EFISYS/efi/grub/grub.cfg

    The above is from https://help.ubuntu.com/community/UEFIBooting but doesn't cover exactly what I am trying to do.
    That should be enough to get the system to boot the thumb drive using EFI right?
    Once I get the system to EFI boot how should I partition the Linux system? I have:
    sda - window 7 x64 sp1
    sda1 - windows 7 EFI partition
    sda2 - msr Microsoft reserved partition
    sda3 - windows 7 install

    sdb - Linux blank hard drive

    sdc - usb thumb drive

    Does Linux need its own EFI partition? Can it share with sda1?

    Thanks

  2. #2
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: dual boot efi windows and efi linux

    I have not done any of this, but since I hope to soon I have saved some links.
    One bug in grub is that it overwrites the efi partition and reformats it to fat16. It should do neither. So be sure to make a backup of the Windows efi partition so you can restore that and reset to fat32 so Windows works.
    As I understand it, you just about need the very latest version of grub to really work with UEFI and even then may have to work around some bugs they still are fixing.

    [SOLVED] Win 7, Natty dual boot on UEFI sort of working
    http://ubuntuforums.org/showthread.php?t=1753717
    [SOLVED] UEFI Boot Problems
    quiet splash vt.handoff=7 rootdelay=90 reboot=a,w
    http://ubuntuforums.org/showthread.php?t=1857639

    For Arch but discusses grub2.
    Grub2 efi info ArchLinux
    https://wiki.archlinux.org/index.php...r_UEFI_systems

    Windows 7 64bit UEFI 2.x boot:
    http://www.insanelymac.com/forum/ind...owtopic=186440
    Dual boot UEFI & windows UEFI post 76
    http://ubuntuforums.org/showthread.php?t=1719851&page=8
    http://ubuntuforums.org/showthread.php?t=1746194
    Many links & discussion:
    http://ubuntuforums.org/showthread.php?t=1734677

    Someone posted this, but they were also using refit:

    Code:
    find /boot/efi -name "*efi"
    /boot/efi
    /boot/efi/EFI/ubuntu/grubx64.efi
    /boot/efi/EFI/BOOT/refit.efi
    /boot/efi/EFI/BOOT/bootx64.efi
    /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi
    /boot/efi/EFI/Microsoft/Boot/bootmgr.efi
    /boot/efi/EFI/Microsoft/Boot/memtest.efi
    /boot/efi/EFI/grub/grub.efi
    /boot/efi/EFI/BOOT-backup/bootx64.efi
    /boot/efi/EFI/BOOT-backup/BOOT/refit/refit.efi
    /boot/efi/EFI/BOOT-backup/BOOT/bootx64.efi
    
    sudo efibootmgr -v
    UEFI bugs:
    Deletes Windows efi partition
    Installer should not format an existing EFI System Partition
    https://bugs.launchpad.net/ubuntu/+s...fi/+bug/769669
    EFI SYSTEM PARTITION should be atleast 100 MiB size and formatted as FAT32, not FAT16
    https://bugs.launchpad.net/ubuntu/+s...fi/+bug/811485
    ctrl-x does not work in grub-efi
    https://bugs.launchpad.net/ubuntu/+s...b2/+bug/722950
    grub-update fails to detect windows bootloader on a uefi system
    https://bugs.launchpad.net/ubuntu/+s...b2/+bug/807801
    MSI UEFI bug work around A75MA-G55 UEFI boot entries disappear
    http://forum-en.msi.com/index.php?topic=153411.0
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.




  3. #3
    Join Date
    Sep 2010
    Beans
    6

    Re: dual boot efi windows and efi linux

    The good news is my computer can EFI boot from my linux thumb drive. I used the directions at
    https://help.ubuntu.com/community/UEFIBooting
    The important part was to rename the /efi/grub directory to /etc/boot and rename grub.efi to bootx64.efi
    I don't think HP has all of the bugs worked out of their EFI bios yet. It should have worked without renaming anything.

    However I having difficulties writing a valid grub.cfg. So far all I can do is boot to a grub prompt.

  4. #4
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: dual boot efi windows and efi linux

    Did you review the Arch site with UEFI sub-heading:
    https://wiki.archlinux.org/index.php...r_UEFI_systems
    and this:
    UEFI systems


    It seems to go over grub2 and UEFI pretty well and does not look like much is Arch specific.
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.




  5. #5
    Join Date
    Sep 2010
    Beans
    6

    Re: dual boot efi windows and efi linux

    Thank you for the Arch Linux link it solved my grub.cfg issue.

    I now have a EFI booting USB thumb drive of Ubuntu. During boot I get a fair amount warnings. I also get a kernel panic when I try to reboot.
    I am using Ubuntu 10.04 LTS, Linux kernel 2.6.39.4

    I am not going to install Linux to the second hard drive as the above bugs haven't been fixed yet. I hope they get fixed for 12.04 LTS.

  6. #6
    Join Date
    Sep 2010
    Beans
    6

    Re: dual boot efi windows and efi linux

    I managed to install Ubuntu 10 LTS on my system using EFI. I started the installer and selected the option to manually create the partition layout. I used the following layout on my 250GB drive:
    200MB /dos fat32
    240GB / ext4
    8GB swap

    Before I clicked on install I selected advanced and deselected the option to install grub. I then clicked on install. Everything installed fine. I then opened a terminal and copied my grub2 configuration from my usb thumb drive to /target/dos
    cp -R /cdrom/EFI /target/dos

    Here is my grub.cfg
    # Config file for GRUB2 - The GNU GRand Unified Bootloader
    # /boot/grub/grub.cfg

    # DEVICE NAME CONVERSIONS
    #
    # Linux Grub
    # -------------------------
    # /dev/fd0 (fd0)
    # /dev/sda (hd0)
    # /dev/sdb2 (hd1,2)
    # /dev/sda3 (hd0,3)
    #

    # Timeout for menu
    set timeout=5

    # Set default boot entry as Entry 0
    set default=1

    # Set default color
    set color_normal=white/blue

    # (0) Original
    menuentry "x64 Linux" {
    set root=(hd1,1)
    linux /vmlinuz-2.6.39.4 root=/dev/sdb2
    initrd /initrd.img-2.6.39.4
    }

    # (1) custom kernel
    menuentry "x64 Linux custom kernel" {
    set root=(hd1,1)
    linux /vmlinuz-3.1.6 root=/dev/sdb2
    initrd /initrd.img-3.1.6
    }

    # (2) Windows
    menuentry "Windows" {
    set root=(hd0,1)
    chainloader (${root})/EFI/Boot/bootx64.efi
    }

    So I have a pretty good system now. I just need to fix the clock in Linux. When I boot back into windows my clock is off by my timezone -5 hours. I also need to write a xorg.conf, the default screen resolution is way too small and kandkresize doesn't have any other resolutions than the highest resolution the monitor supports. I prefer 1280x800 instead of the 1440x960 that Ubuntu is using. Finally I need to figure out how to boot Ubuntu without having X auto start. It used to be easy, edit /etc/inittab and change 5 to 3. I know Ubuntu is using upstart but there is no /etc/event.d directory that the documentation says should be there.

    Since my BIOS doesn't allow me to specify which hard drive to EFI boot from I might move the grub files form the second hard drive to the first to enable grub2 to dual boot without me having to press F9 at exactly the right moment.

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
  •