danb35
Hall of Famer
- Joined
- Aug 16, 2011
- Messages
- 15,504
tl;dr: I'm trying to refine this:
www.truenas.com
I recently bought a HPE Microserver Gen8 to set up at my parents' place, and want to follow the recommendation to not boot from USB sticks (aside from that system being pretty picky on what USB sticks it will boot from anyway), but also don't want to take up one of the only four drive bays with a boot SSD. I've thus connected it to the fifth SATA port, designated for the optical drive, and following the method at the link above, have installed Grub on a micro SD card which will then boot TrueNAS from that drive (that SATA port isn't bootable on the Microserver Gen8). This all works well. Except...
The grub.cfg used there hard-codes the boot to a specific device, hd3 in my case (I only have one pair of drives in the system to start). It'd be nice to have the .cfg file written such that it wouldn't break on adding a couple of drives (or even removing a drive). A couple of others in that thread were trying to figure out if it were possible to have Grub determine the highest available drive number, and then boot from that--and that doesn't seem to be possible (though I'd be happy to hear I'm wrong here, with examples). But I'm finding a number of sources indicating that it should be able to find the boot pool by name, and then boot from it. E.g.,
unix.stackexchange.com
But it doesn't work (and neither do the suggestions at https://itectec.com/unixlinux/ubunt...u-tools-or-liveusb-to-find-what-partitions/); that menu entry gives me this:
The Grub manual also suggests it ought to work, though its example doesn't seem to be dealing with quite this scenario:
Bootloader on USB, FreeNAS on SSD
Hello! I got an HP Proliant gen8 and i want to install FreeNAS on an SSD (The SSD is in the ODD slot). The Problem is that the proliant can't boot from the ODD slot with activated AHCI mode, but it can boot from an USB Stick. So i thought it would be a nice idea to have to bootloader on the USB...

I recently bought a HPE Microserver Gen8 to set up at my parents' place, and want to follow the recommendation to not boot from USB sticks (aside from that system being pretty picky on what USB sticks it will boot from anyway), but also don't want to take up one of the only four drive bays with a boot SSD. I've thus connected it to the fifth SATA port, designated for the optical drive, and following the method at the link above, have installed Grub on a micro SD card which will then boot TrueNAS from that drive (that SATA port isn't bootable on the Microserver Gen8). This all works well. Except...
The grub.cfg used there hard-codes the boot to a specific device, hd3 in my case (I only have one pair of drives in the system to start). It'd be nice to have the .cfg file written such that it wouldn't break on adding a couple of drives (or even removing a drive). A couple of others in that thread were trying to figure out if it were possible to have Grub determine the highest available drive number, and then boot from that--and that doesn't seem to be possible (though I'd be happy to hear I'm wrong here, with examples). But I'm finding a number of sources indicating that it should be able to find the boot pool by name, and then boot from it. E.g.,

How to create a GRUB entry for a FreeBSD on ZFS installation?
To be clear what I want is a FreeBSD GRUB2 entry that boots FreeBSD on a ZFS (name: zroot) with BIOS firmware (not UEFI). The operating system GRUB is installed on is Arch Linux if it helps, Arch is
But it doesn't work (and neither do the suggestions at https://itectec.com/unixlinux/ubunt...u-tools-or-liveusb-to-find-what-partitions/); that menu entry gives me this:
The Grub manual also suggests it ought to work, though its example doesn't seem to be dealing with quite this scenario: