The ASUS AM1M-A has an issue with booting OSes in legacy mode that are using the GUID partition table, which is used by FreeNAS by default. In this document I will explain how to implement a workaround that will allow the system to boot into FreeNAS.
The workaround involves installing grub on to a bootable usb memory stick that is using the Master Boot Record partition table and add an entry for the FreeNAS boot device. We are basically using grub on the memory stick as a catalyst to access grub on the FreeNAS device which in turn will let us boot FreeNAS.
When doing this I suggest using a Linux Live-CD to install grub onto the memory stick (I used Ubuntu 14.04.2 Desktop), while it will work on an installed version of Linux, providing it is using the legacy boot mode and not UEFI, I wouldn't recommend it as it is possible that installing grub on the USB memory stick may break the version of grub that is currently in use. I would also suggest either removing or disabling in UEFI all the storage devices that are currently using grub as a bootloader.
First we need to identify the USB memory stick that we want to install Grub on. To do this open a Terminal session and type in lsblk
and look for the USB device. It should show up as something like:
sdd 8:48 1 3.7G 0 disk
└─sdd1 8:49 1 3.7G 0 part /media/ubuntu/Flash Drive
With the correct USB device identified we need to create a mountpoint for the device so we can run the grub installation by entering:
sudo mkdir /mnt/usb
sudo mount /dev/sdd1 /mnt/usb # replace /dev/sdd1 with the identified USB device
With the USB device mounted we can now install grub by running the following command:
grub-install --force --boot-directory=/mnt/usb/boot /dev/sdd
In order for grub to boot FreeNAS it first needs a grub.cfg
file which isn't created by default when we used the grub-install
command, so we have to create it manually with:
cd /mnt/usb/boot/grub/
nano grub.cfg
Below is the text we need to enter to boot FreeNAS:
set timeout=1
set default=0
menuentry 'FreeNAS' {
set root='(hd3)'
chainloader +1
}
For this to work on your system you need to change hd3
to the device that FreeNAS is installed on. To find this, insert the USB stick into the AM1M-A board and boot into the memory stick. Once grub loads press C and type in ls
to see a list of storage devices connected to the system and use process of elimination to find the correct device. It should show up as something like this:
grub> ls
(hd0) (hd1) (hd2) (hd3)
With the correct boot device selected the memory stick should load grub on the FreeNAS device and boot into FreeNAS normally.
Thanks for your post. This is helpful.
Have you found any other way to get the board to boot strictly from the flash drive? I like the workaround but quite frankly it's absurd that Asus doesn't support booting off of GPT with legacy BIOS (along with no AES-NI support, etc.)
I was trying to change the flags to get it to recognize but no dice there either.