@csjjpm here is how to, and give you my self-create rancher ufei ready img file.
rancheros-v1.5.8-truenas.vm.img.7z
sudo passwd rancher
[rancher@RancherOS ~]$ sudo fdisk -l
Disk /dev/vda: 8 GiB, 8589934592 bytes, 16777216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 16384 bytes
I/O size (minimum/optimal): 16384 bytes / 16384 bytes
Disk /dev/sda: 200 MiB, 209715200 bytes, 409600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 131072 bytes
I/O size (minimum/optimal): 131072 bytes / 131072 bytes
Disklabel type: gpt
Disk identifier: 7C7D5507-E5CF-40FB-966B-9EA473384E62
Device Start End Sectors Size Type
/dev/sda1 2048 409566 407519 199M EFI System
[rancher@RancherOS ~]$ sudo fdisk /dev/vda
g,n,1,enter,+200M,t,1,n,enter,enter,enter,w
[rancher@RancherOS ~]$ sudo fdisk -l /dev/vda
Disk /dev/vda: 8 GiB, 8589934592 bytes, 16777216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 16384 bytes
I/O size (minimum/optimal): 16384 bytes / 16384 bytes
Disklabel type: gpt
Disk identifier: 1D8F9247-9F90-F04E-9DF8-6282A73C0654
Device Start End Sectors Size Type
/dev/vda1 2048 411647 409600 200M EFI System
/dev/vda2 411648 16777182 16365535 7.8G Linux filesystem
#Format the boot partition
[rancher@RancherOS ~]$
sudo mkdosfs -n RANCHER_UEFI -F 32 /dev/vda1
#Format the main filesystem
[rancher@RancherOS ~]$
sudo mkfs.ext4 -L RANCHER_STATE /dev/vda2
mke2fs 1.43.9 (8-Feb-2018)
Creating filesystem with 2045691 4k blocks and 512064 inodes
Filesystem UUID: ad2f757f-835f-4c62-8b9d-9d666f198379
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done
#Create a cloud-config.yml
[rancher@RancherOS ~]$ sudo vi /home/rancher/cloud-config.yml
...
#Cheat installer checking about iso mounted
[rancher@RancherOS ~]$ sudo mkdir /dev/sr0
#Install ros
[rancher@RancherOS ~]$ sudo ros install -f -t gptsyslinux -c /home/rancher/cloud-config.yml -d /dev/vda -p /dev/vda2 --no-reboot --debug
#Move UEFI and boot file from /dev/sda1 (pre-mount rancheros.img) to /dev/vda1 (EFI System)
[rancher@RancherOS ~]$ sudo fdisk -l
Disk /dev/vda: 8 GiB, 8589934592 bytes, 16777216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 16384 bytes
I/O size (minimum/optimal): 16384 bytes / 16384 bytes
Disklabel type: gpt
Disk identifier: 1D8F9247-9F90-F04E-9DF8-6282A73C0654
Device Start End Sectors Size Type
/dev/vda1 2048 411647 409600 200M EFI System
/dev/vda2 411648 16777182 16365535 7.8G Linux filesystem
Disk /dev/sda: 200 MiB, 209715200 bytes, 409600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 131072 bytes
I/O size (minimum/optimal): 131072 bytes / 131072 bytes
Disklabel type: gpt
Disk identifier: 7C7D5507-E5CF-40FB-966B-9EA473384E62
Device Start End Sectors Size Type
/dev/sda1 2048 409566 407519 199M EFI System
[rancher@RancherOS ~]$ mkdir /mnt/efipart && sudo mount /dev/vda1 /mnt/efipart
[rancher@RancherOS ~]$ mkdir /mnt/installer && sudo mount /dev/sda1 /mnt/installer
[rancher@RancherOS ~]$ sudo cp -r /mnt/installer/ /mnt/efipart
#change grub.cfg in /mnt/efipart/BOOT/grub/ as below
#ttyS0 is serial ( autologin enable in serial )
set timeout=15
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
menuentry "Rancher from GPT" {
search --no-floppy --set=root --label RANCHER_STATE
linux /boot/vmlinuz-4.14.138-rancher printk.devkmsg=on rancher.state.dev=LABEL=RANCHER_STATE rancher.state.wait panic=10 console=tty0 rancher.autologin=tty0 console=ttyS0 rancher.autologin=ttyS0
initrd /boot/initrd-v1.5.8
}
menuentry "Install Rancher" {
linux /boot/vmlinuz-4.14.138-rancher rancher.autologin=tty1 rancher.autologin=ttyS0 rancher.autologin=ttyS1 console=tty1 console=ttyS0 console=ttyS1 printk.devkmsg=on panic=10 ---
initrd /boot/initrd-v1.5.8
}
#--lable RANCHER_STATE is what we done before as "sudo mkfs.ext4 -L RANCHER_STATE /dev/vda2" .
[rancher@RancherOS ~]$ sudo umount /mnt/installer
[rancher@RancherOS ~]$ sudo umount /mnt/efipart
[rancher@RancherOS ~]$ sudo shutdown
#remove RAW setting in TrueNAS VM config .
Reboot and have fun.