Boot from MicroSD to ODD port on MicroServer Gen8 using UUID instead of "hdX"

EpicLPer

Cadet
Joined
Jul 31, 2023
Messages
4
Heya!

I plan on using my old Gen8 MicroServer as a Backup NAS, the Gen8 is a bit weird as it "moves" the ODD port (where TrueNAS is installed to an SSD) to the very end of the drive list the more drives you have inserted into the front. This means that, with 4 drives, you have to use "hd5" in GRUB to boot from the MicroSD to the SSD to make it work.
This is fine as long as 4 drives are inserted, but say one drive suddenly fails, then the internal SSD becomes "hd4", so GRUB fails to boot automatically.

I'm trying to find a way to make it boot via a UUID instead so it doesn't matter if a drive fails or not. Is this somehow possible? I've searched around a bit but my skills with GRUB are very limited and info on this specific case are sparse...
Another idea I had was to simply make GRUB go through a list of "hd5" > "hd4" > "hd..." and so on depending if the first entry fails or not, it's a crude workaround but could work, tho info on how to achieve that is sparse as well.



Thanks a ton already for your help!
 

beralt

Dabbler
Joined
Jan 8, 2019
Messages
18
Did you manage to get this to work? I am facing exactly the same problem here.
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
In the past a SD or MicroSD card might have worked with FreeNAS. But, today with TrueNAS the boot pool is both active and managed by ZFS. Unless you use a good quality SD or MicroSD card, you will likely have trouble. As in it may fail within a year. Or even sooner.

A better solution when out of SATA, SAS or NVMe ports, is to use a SATA, mSATA or NVMe drive in a USB carrier. You get a reliable storage device, though with a less reliable interface. Still better than unreliable storage, in an unreliable interface.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
The idea would be to put Grub on the µSD card, and chain from that to the actual TrueNAS installation on a SSD. That way, the µSD card should be safe, as nothing's being written to it.

I tried going this route as well (I think with a USB stick rather than a µSD card) when setting up my parents' NAS on a MicroServer Gen8 a few years back, but wasn't able to make it work. I ended up putting a m.SATA SSD on a USB adapter, and plugging that into the server's internal USB port. That's been working fine for 3+ years so far.
 

beralt

Dabbler
Joined
Jan 8, 2019
Messages
18
Thanks for the input.
After studying these forums and reddit I also found that the consent is to best use some (small) SATA/mSATA/nvme to USB adapter plugged to the internal USB for the boot pool and use the ODD SATA port for extra storage :)
The "only grub" and chainloading on internal USB/SD-Card route seems to be a pain since one would manually have to change the grub config everytime the number of drives changes. Also, I am not sure if it will might break during OS updates.

(I ended up buying a SATA to USB adaptor that will hopefully arrive soon.)
 
Top