Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Nov 2017 23:28:49 -0500 (EST)
From:      DTD <support@safeport.com>
To:        freebsd-questions@FreeBSD.ORG
Subject:   stuck duel booting win-10 and FreeBSD 10.3 [solved]
Message-ID:  <alpine.BSF.2.00.1711231945230.82587@bucksport.safeport.com>

next in thread | raw e-mail | index | archive | help
With a lot of help from friends

First I gave up on 10.3. The problem IN 10.3 was I could not mount the FreeBSD 
partition created by install, getting:

root@:~ # mount /dev/ada0p10 /mnt
mount: /dev/ada0p10: Invalid argument

As I did this tree times with the same result and I have been using FreeBSD on 
laptops since 4.5 I'm thinking there is better than an even chance I did not 
make the same mistake three times. As far as I could tell install I never had a 
problem. It just did not make the system bootable. Eventually I was pointed to 
commands that verified that [at least] the first part of the FreeBSD partition 
was corrupted. At that point I gave up on 10.3 and installed 11.1

The 11.1 install went fine and I could mount the partitions from the install 
shell. So how to get it to boot was the only issue. First I had to disable 
secure boot. I used the usb image for 11.1, a blessing as that boots about as 
fast as from disk. From the EFI wiki (I think) I found the following link:

    http://kev009.com/wp/2016/07/freebsd-uefi-root-on-zfs-and-windows-dual-boot/

The part about installing zfs is not relavent (unless you want it) the latter 
instructions given below work. At the end or this process I still could not boot 
FreeBSD, coming the the statement that

     "You should be greeted by refind, otherwise take a look through your
     firmware boot order and make sure the firmware nvram for Windows
     Bootmanager isn't first."

Here I used EasyUEFI to list and reorder the UFI boot entries putting the disk 
entry before the windows one. That did it. I never found anything in the Lenovo 
BIOS that would do this.

The instructions for installing rEFInd follow:

1. disable secure boot (necessary for me on Lenovo)
2. Install refind
    cd /tmp
    unzip refind-bin-0.10.3.zip
    rm refind-bin-0.10.3.zip
    mkdir /tmp/efi
    mount_msdosfs /dev/gpt/EFI%20system%20partition /tmp/efi/
    cd /tmp/efi/EFI/Boot
    mv bootx64.efi bootx64-windows-10.efi
    cp /boot/boot1.efi bootx64-freebsd.efi
    cp -a /tmp/refind-bin-0.10.3/refind/icons .
    cp -a /tmp/refind-bin-0.10.3/refind/refind_x64.efi bootx64.efi
    cp /tmp/refind-bin-0.10.3/refind/refind.conf-sample refind.conf
3. Configure refind and add menu entries
    Configure refind and add menu entries
    cat << EOF >> refind.conf

    menuentry "FreeBSD/amd64 -CURRENT" {
        loader \EFI\Boot\bootx64-freebsd.efi
        icon \EFI\Boot\icons\os_freebsd.png
    }

    menuentry "Windows 10 Professional x64" {
        loader \EFI\Boot\bootx64-windows-10.efi
        icon \EFI\Boot\icons\os_win.png
    }
    EOF
4. Finish, reboot and enjoy!
    cd
    umount /tmp/efi
    reboot

For me step four just rebooted windows. I used EasyUEFI as noted above. I had 
previously installed that trying to install rEFInd from the windows side. I 
never got that to work.

If you want windows 10 + FreeBSD, I think this is the way to install rEFInd. 
This has the added advantage of being able to boot almost any combinations of 
operating systems.

This procedure only works with windows 10 as I do not know how to reorder the 
UFI boot entries. I lucked out that EasyUEFI did this for me. That missing 
piece would be most useful.

_____
Douglas Denault
http://www.safeport.com
support@safeport.com
Voice: 301-217-9220
   Fax: 301-217-9277



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1711231945230.82587>