1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to install FreeBSD on ASUS P9X79 UEFI/GPT

Discussion in 'Installing and Upgrading FreeBSD' started by tomdean, Dec 4, 2011.

  1. tomdean

    tomdean New Member

    Messages:
    24
    Likes Received:
    0
    Triple Boot AMD64

    For long and uninteresting reasons, I need to triple-boot:
    * Windows 7 (warranty)
    * FreeBSD (work)
    * Linux (porting code, lm-sensors, etc.)

    ASUS P9X79, Intel i7-3930K, 2x WD5000AAKX (500G), USB wireless keyboard and mouse.

    I have windows 7 on one disk with 250G free. The second disk is free.

    BIOS supports UEFI, GPT.

    I tried to install FreeBSD 9.0 (RC2) from the iso image, but, BSDInstall had problems with the keyboard and/or mouse. I will try again...

    I want to divide the remaining part of the used disk into 200G (FreeBSD) and 50G (Linux).

    Or, should I use a different scheme?
     
  2. wblock@

    wblock@ Administrator Staff Member Administrator Moderator Developer

    Messages:
    11,180
    Likes Received:
    10
    Please back up everything first. Grub2 is supposed to support multiboot with GPT (untested by me). EasyBCD works nicely, there's a free version for non-commercial use. The Wikipedia page on boot loaders is interesting.
     
  3. tomdean

    tomdean New Member

    Messages:
    24
    Likes Received:
    0
    EasyBCD does not work on UEFI/GPT systems.
     
  4. tomdean

    tomdean New Member

    Messages:
    24
    Likes Received:
    0
    Sorry, I tried it and had to reinstall from scratch!
     
  5. wblock@

    wblock@ Administrator Staff Member Administrator Moderator Developer

    Messages:
    11,180
    Likes Received:
    10
    Sorry, I hadn't tried it with GPT. Found this:
    Not quite sure what "MBR emulation" means there.
     
  6. tomdean

    tomdean New Member

    Messages:
    24
    Likes Received:
    0
    [ merged back in - there is no real reason to start this entire topic all over again -- Mod. ]

    I have an ASUS P9X79 motherboard which has UEFI in the BIOS for disk support. Intel i7-3930K, 2x WD5000AAKX 500G SATA III, 16G RAM. I need to triple boot - windows 7 for warranty issues, FreeBSD for actually doing things, and Linux for porting code like lm-sensors, etc. How do I do this? I tried installing windows then freebsd FreeBSD and the other way around and after two days, I am back where I was - the only thing that works is BIOS! I can get one or the other to work, but, not both. Since I plan to add other large disks, it makes sense to stay with GPT and that means UEFI. Am I out-of-luck and own a windows-only machine? FreeBSD since 0.1.

    tomdean
     
  7. AndyUKG

    AndyUKG Member

    Messages:
    436
    Likes Received:
    0
  8. tomdean

    tomdean New Member

    Messages:
    24
    Likes Received:
    0
    I have tried many things, nothing works.

    I have windows 7 on the first disk with 7 partitions. parted cannot function with this disk because Windows produces a corrupted GPT table.

    However, FreeBSD 9.0 (RC2) fdisk can display the partition table.

    The existing partitions are
    1 100M Windows 7 msres
    2 100G Windows 7 system
    3 32G Fat32
    4 200G Ext. Fat

    Is it possible to use partitions 3 and 4 for FreeBSD?

    How do I convert them to swap and ufs, respectively?

    tomdean
     
  9. tomdean

    tomdean New Member

    Messages:
    24
    Likes Received:
    0
    Here is what I have:

    Code:
    $ sudo parted /dev/sdb print
    Model: ATA WDC WD5000AAKX-6 (scsi)
    Disk /dev/sdb: 500GB
    Sector size (logical/physical): 512B/512B
    Partition Table: gpt
    
    Number Start End Size File system Name Flags
     1 17.4kB 100GB 100GB ext4
     2 100GB 132GB 32.0GB linux-swap(v1)
     3 132GB 132GB 65.5kB
     4 132GB 495GB 363GB freebsd-ufs
     5 495GB 499GB 4295MB
    
    $ sudo mount -t ufs -o ufstype=ufs2 -r /dev/sdb4 /mnt
    tomdean@P9X79:~$ ls /mnt
    bin COPYRIGHT etc libexec mnt rescue sbin tmp var
    boot dev lib media proc root sys usr
    tomdean@P9X79:~$ ls /mnt/boot
    beastie.4th check-password.4th gptzfsboot menu-commands.4th userboot.so
    boot color.4th kernel menu.rc version.4th
    boot0 defaults loader modules zfs
    boot0sio delay.4th loader.4th pmbr zfsboot
    boot1 device.hints loader.help pxeboot zfsloader
    boot2 firmware loader.rc screen.4th
    brand.4th frames.4th mbr shortcuts.4th
    cdboot gptboot menu.4th support.4th
    Here is what I did
    1. Install windows 7 on the first disk - windows screws the GPT table...
    2. Install Ubuntu 11.10 on the second disk,
    3. Using the FreeBSD 9.0 (RC) DVD, install FreeBSD after Ubuntu on the
    second disk
    4. At the grub menu, press 'c' and enter the commands
    Code:
            insmod part_gpt
            insmod ufs2
            set root='(hd1,gpt4)'
            echo Loading kernel of FreeBSD kernel ...
            kfreebsd /boot/kernel/kernel
            kfreebsd_loadenv /boot/device.hints
            set kFreeBSD.vfs.root.mountfrom=ufs:/dev/ad1p4
            set kFreeBSD.vfs.root.mountfrom.options=rw
        boot