Difference between revisions of "Minnowboard:MinnowMaxBSD-Distros"

From eLinux.org
Jump to: navigation, search
m
 
(23 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
'''THESE INSTRUCTIONS ARE NOT YET COMPLETE! THIS IS A WORK IN PROGRESS'''
 +
 +
= Considerations =
 
The general process of setting up BSD for the MinnowBoard MAX is quite similar to setting up Linux on any other computer:
 
The general process of setting up BSD for the MinnowBoard MAX is quite similar to setting up Linux on any other computer:
 
# Make a bootable installer for your distro of choice
 
# Make a bootable installer for your distro of choice
Line 39: Line 42:
 
A detailed explanation of this can be found [[Minnowboard:MaxBios#32-bit_vs._64-bit_UEFI|On the MAX Bios page - 32-bit vs 64-bit UEFI section]]
 
A detailed explanation of this can be found [[Minnowboard:MaxBios#32-bit_vs._64-bit_UEFI|On the MAX Bios page - 32-bit vs 64-bit UEFI section]]
  
= FreeBSD 10.1-RELEASE" 64-bit =
+
= Installing FreeBSD 10.1 AMD64" =
 +
 
 +
'''Please Note:''' FreeBSD 10.0 Does NOT have a suitable UEFI image available for download.
 +
 
 +
== Download the image ==
 +
Download the FreeBSD UEFI memstick image from the link below:
 +
 
 +
ftp://ftp.freebsd.org/pub/FreeBSD/releases/ISO-IMAGES/10.1/FreeBSD-10.1-RELEASE-amd64-uefi-memstick.img
 +
 
 +
== Create a bootable installer ==
 +
To create a bootable USB installer drive for FreeBSD, you should use the "direct write method" such as:
 +
 
 +
dd if=FreeBSD-10.1-RELEASE-amd64-uefi-memstick.img of=/dev/sdX bs=64K
 +
 
 +
For instance If your freshly inserted USB is /dev/sdb then run the following command:
 +
 
 +
dd if=FreeBSD-10.1-RELEASE-amd64-uefi-memstick.img of=/dev/sdb bs=64K
 +
 
 +
 
 +
If you have a Windows system use the method listed here:
  
To create a bootable USB installer drive for FreeBSD, you should use the direct write method or one of the methods listed here:
+
https://www.freebsd.org/doc/handbook/install-pre.html#install-boot-media
https://fedoraproject.org/wiki/How_to_create_and_use_Live_USB#quickstarts
 
  
== Booting from the FreeBSD installer flash drive ==
+
== Booting the Installer ==
Once you get to the  EFI shell, the following command will boot the installer:
+
Insert the USB drive into the Minnowboard Max and power it on. Once you get to the  EFI shell, the following command will boot the installer:
<code>
 
    fs0:\EFI\BOOT\bootx64.efi
 
</code>
 
  
=== If you're installing Mint to a USB flash drive or USB HDD ===
+
fs0:\efi\boot\bootx64.efi
You should wait to plug in your installation target drive until after the FreeBSD installer has finished booting. This way you will surely know which device you are installing to, ie da0 or da1, etc.  
+
 
 +
'''NOTE''' Consider waiting to plug in your installation target drive until after the FreeBSD installer has finished booting. This way you will surely know which device you are installing to, ie da0 or da1, etc. Once the system has fully booted insert the USB/SD card and the FreeBSD kernel will display the device name on screen, which will aid you in identifying the proper target device.
  
 
== Install Process ==
 
== Install Process ==
This will be very similar to a normal FreeBSD install process. Just be sure to select the correct storage volumet to install to. Select the options to wipe whatever's on that volume already and repartition it automatically. The installer will create a small FAT EFI partition, a large UFS root partition, and then a small swap partition. This is all fine.
+
This will be very similar to a normal FreeBSD installation process. Just be sure to select the correct storage volume to install to. Select the options to wipe whatever's on that volume already and repartition it automatically. The installer will create a 800K FAT EFI partition, a large UFS root partition, and then a small swap partition. This is all fine.
 
 
=== If you're installing Mint to a USB flash drive or USB HDD ===
 
The GRUB configuration is going to need some adjustments to make your target disk boot without the installer disk present.
 
  
After finishing the installer, shut down the MinnowMax, and start it back up again with only the target disk plugged in. You will need to get to the bootloader menu and hit "e" to edit the first entry. Change all mentions of <code>hd1,gpt2</code> to <code>hd0,gpt2</code> and all mentions of <code>ahci1,gpt2</code> to <code>ahci0,gpt2</code>. Then hit F10 to boot your Linux Mint installation for the first time. If you get an EFI shell, see [[#Booting from your Linux Mint Installation]] for instructions on getting to a bootloader menu.
+
== Final Steps ==
 +
You may need to edit the /etc/fstab to reflect the appropriate root device or else your system may fail to boot after installation.
 +
The FreeBSD installer detected your installation media as well as your target device and numbered them accordingly.
  
Once you've finished booting and have logged in, launch a terminal and run the following command to regenerate your GRUB configuration:
+
If your installation target was drive da1 during the installation process then you need to change every instance of da1 to da0
<code>
 
    sudo update-grub
 
</code>
 
You will no longer have to manually edit the bootloader entry every time you boot Linux Mint. Be sure no bootable storage volumes besides your Mint installation are plugged in when you do this.
 
  
=== Final Steps ===
+
== Booting from your FreeBSD 10.1 Installation ==
It is highly recommended that you upgrade to a new kernel (3.14 or newer) after your installation is complete. This fixes a number of things, including HDMI sound output (this has been tested and confirmed to work after the kernel update.) You may have to compile it yourself. Find Linux Mint's standard kernel configuration under /boot, copy it to .config in your Linux 3.14 source tree, run "make oldconfig" to update the configuration to match the newer kernel, and then compile the kernel as normal. If you have another Linux computer with which to do the actual compilation of the kernel, that would likely be faster than compiling it on the Minowboard MAX. Then you can copy the kernel source tree over to your Max and run the installation part. (TODO: find a PPA or something with newer kernels in it so people don't have to compile them.)
 
  
NOTE: the linux-yocto 3.14 tree was used for this test, it may contain sound-related fixes that won't hit mainline Linux until 3.15.
+
fs0:\EFI\BOOT\bootx64.efi
  
== Booting from your Linux Mint Installation ==
+
'''NOTE:''' Your FreeBSD system WILL fail to boot if you create a boot entry in the UEFI Boot Manager.
  
=== If you're installing Mint to a USB flash drive or USB HDD ===
+
The only current way to achieve unassisted booting of FreeBSD on the Minnowboard Max is to utilize a <code>startup.nsh</code> file.
The Linux Mint installer does not seem to automatically change the boot order setup of the MinnowBoard MAX, so you may get an EFI shell when you boot. To get to the Linux Mint bootloader, you may have to run the following EFI commands at boot time:
 
<code>
 
    fs0:\EFI\BOOT\bootx64.efi
 
</code>
 
  
If you want to adjust your boot order manually, you can run the following EFI command:
+
So utilize a 10.1 or greater image if you're not an experienced FreeBSD user. Once you have the FreeBSD UEFI loader on boot media you can boot older releases of
<code>
 
    exit
 
</code>
 
This will drop you to a legacy BIOS configuration screen where you can do a number of things, including tweak your boot order. Once this is done, the EFI commands listed above should be unnecessary. (TODO: write up what actual steps are involved.)
 

Latest revision as of 23:25, 18 November 2014

THESE INSTRUCTIONS ARE NOT YET COMPLETE! THIS IS A WORK IN PROGRESS

Considerations

The general process of setting up BSD for the MinnowBoard MAX is quite similar to setting up Linux on any other computer:

  1. Make a bootable installer for your distro of choice
  2. Plug in the storage volume you want to install to (i.e. a larger SATA or USB HDD, MicroSD card, etc.,)
  3. Install to that drive

However, there are a few things to keep in mind:

  • MicroSD cards:
    • When installing to a MicroSD card, be aware that these cards are frequently quite slow and may result in poor performance if you install an operating system to them.
    • SD Cards (as do all flash) have a limited number of writes, take care when using flash memory, particularly for SWAP as they can incur a lot of writes in a short period of time, ultimately leading to flash failure
  • USB Sticks:
    • SD Cards (as do all flash) have a limited number of writes, take care when using flash memory, particularly for SWAP as they can incur a lot of writes in a short period of time, ultimately leading to flash failure
    • Installing TO USB storage as well as installing FROM storage may cause issues, and you may have to wait for your installer to fully boot before plugging in the USB stick you intend to install to.

The MinnowBoard MAX ships with a 64-bit UEFI Firmware. UEFI can only work when the OS and Firmware are matched on what the architecture is. This means a 32-bit OS cannot be run from a 64-bit Firmware, and vice versa.

The ONLY available FreeBSD UEFI Loader supports 64-bit Operating Systems and 64-bit UEFI Firmware. There is no 32-bit FreeBSD UEFI Loader:

Support matrix of firmware and OS:

32-bit Firmware 64-bit Firmware
32-bit OS UNSupported UNSupported
64-bit OS UNSupported Supported

Running in an unsupported configuration may not even boot, but at the least will lead to very odd system interactions. Having a single firmware with UEFI that supports both is not possible.

A detailed explanation of this can be found On the MAX Bios page - 32-bit vs 64-bit UEFI section

Installing FreeBSD 10.1 AMD64"

Please Note: FreeBSD 10.0 Does NOT have a suitable UEFI image available for download.

Download the image

Download the FreeBSD UEFI memstick image from the link below:

ftp://ftp.freebsd.org/pub/FreeBSD/releases/ISO-IMAGES/10.1/FreeBSD-10.1-RELEASE-amd64-uefi-memstick.img

Create a bootable installer

To create a bootable USB installer drive for FreeBSD, you should use the "direct write method" such as:

dd if=FreeBSD-10.1-RELEASE-amd64-uefi-memstick.img of=/dev/sdX bs=64K

For instance If your freshly inserted USB is /dev/sdb then run the following command:

dd if=FreeBSD-10.1-RELEASE-amd64-uefi-memstick.img of=/dev/sdb bs=64K


If you have a Windows system use the method listed here:

https://www.freebsd.org/doc/handbook/install-pre.html#install-boot-media

Booting the Installer

Insert the USB drive into the Minnowboard Max and power it on. Once you get to the EFI shell, the following command will boot the installer:

fs0:\efi\boot\bootx64.efi

NOTE Consider waiting to plug in your installation target drive until after the FreeBSD installer has finished booting. This way you will surely know which device you are installing to, ie da0 or da1, etc. Once the system has fully booted insert the USB/SD card and the FreeBSD kernel will display the device name on screen, which will aid you in identifying the proper target device.

Install Process

This will be very similar to a normal FreeBSD installation process. Just be sure to select the correct storage volume to install to. Select the options to wipe whatever's on that volume already and repartition it automatically. The installer will create a 800K FAT EFI partition, a large UFS root partition, and then a small swap partition. This is all fine.

Final Steps

You may need to edit the /etc/fstab to reflect the appropriate root device or else your system may fail to boot after installation. The FreeBSD installer detected your installation media as well as your target device and numbered them accordingly.

If your installation target was drive da1 during the installation process then you need to change every instance of da1 to da0

Booting from your FreeBSD 10.1 Installation

fs0:\EFI\BOOT\bootx64.efi

NOTE: Your FreeBSD system WILL fail to boot if you create a boot entry in the UEFI Boot Manager.

The only current way to achieve unassisted booting of FreeBSD on the Minnowboard Max is to utilize a startup.nsh file.

So utilize a 10.1 or greater image if you're not an experienced FreeBSD user. Once you have the FreeBSD UEFI loader on boot media you can boot older releases of