Home Application - Need dual boot (different SSDs)

BetaoMA

Cadet
Joined
Dec 28, 2023
Messages
5
Hi, experts.

I know this has been discussed several times and is not recommended, but please read until the end as the scenario for this request is specific and I am taking precautions to avoid data loss/corruption.

As per my signature, my system setup is currently:

MSI Z690-A PRO MoBo
Core i5 12600K CPU
32GB (2*16GB) DDR4 3200
32GB SSD TrueNAS Scale System Drive
1TB SSD Windows 11 System Drive
4*4TB HDDs in RAIDZ1 with 128GB SSD Cache Data Pool
2*4TB USB Important Data Independent (separate stripes) Backup Drives
14TB USB Full Data Backup Drive

I know this is a bit of an overkill for TrueNAS Scale for a home application, but the reason I built it with higher specs is because I want this machine to serve as a Windows Retroarch emulator (only occasional use) in dual boot, due to it being close to my receiver on my man cave in the basement and the lack of will to build/spend on a separate machine for such. There's no video card as the CPU graphics are enough for the emulators I'm planning on running.

I have taken the precaution of disabling the Data Pool drives/cache SSD as well as the TrueNAS' system drive and the USB Backup drives in Windows Device Manager in order to avoid unwanted mistakes, so nothing is written or tampered with in the TrueNAS drives while running Windows. I only have access to the Windows SSD while on Windows. And yes, I do understand TrueNAS is not an OS, but an appliance and as such should have a dedicated machine, but I'm ok with not having access to my shared drives on my other computers while the Emulator is being used and I understand the risks of dual booting, but as per above, I've taken actions to mitigate them.

So far, I have been successful in dual booting through the MoBo's Boot menu, choosing one or the other, but am interested in adding the Windows entry to the GRUB menu in TrueNAS, in order to avoid missing the boot menu during restarts (the GRUB menu has a timer, which would allow me to choose without rush or chance of missing the timing to press F11 on restart).

I appreciate the suggestions and your time in reading my use case.

Thanks!

Betao
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
I did something sort of similar, I have a 5 bay removable drive sleds and I unseat the drive and close the handle (so it cannot be pushed in) I do not want to bootstrap from and push in the one drive I do want to bootstrap from. It's fast and easy. I can easily rotate from Windows 11, Windows 10, Windows 7, and Ubuntu. That leaves me one open spot for just a removable data drive should I need one.

This is not exactly like what you are asking for since I didn't have extra drive in the system that I wanted to hide from other operating systems.

Another option for you could be running a Type I hypervisor, such a ESXi 7 or 8 (it is free). On that you could run Windows 11 and TrueNAS at the same time. This keeps things isolated as well. You can pass through the whole set of drives and then create two VM's , assign specific drives to the VM they belong to. It sounds a bit easy but if you have never done this before, it isn't super easy. But it also isn't difficult if you can pass through the drive controller(s). You should not use RDM, while it works, it is a pain to configure for someone who hasn't done it before. And you could get Windows 8GB RAM and TrueNAS 16GB RAM. Everyone should be happy.

I think you are taking a huge risk hoping Windows continues to ignore specific drives, especially after a large update. I like the ESXi hypervisor and it's cost nothing but your time to setup. There is a lot of help on the internet for ESXi.
 

BetaoMA

Cadet
Joined
Dec 28, 2023
Messages
5
I did something sort of similar, I have a 5 bay removable drive sleds and I unseat the drive and close the handle (so it cannot be pushed in) I do not want to bootstrap from and push in the one drive I do want to bootstrap from. It's fast and easy. I can easily rotate from Windows 11, Windows 10, Windows 7, and Ubuntu. That leaves me one open spot for just a removable data drive should I need one.

This is not exactly like what you are asking for since I didn't have extra drive in the system that I wanted to hide from other operating systems.

Another option for you could be running a Type I hypervisor, such a ESXi 7 or 8 (it is free). On that you could run Windows 11 and TrueNAS at the same time. This keeps things isolated as well. You can pass through the whole set of drives and then create two VM's , assign specific drives to the VM they belong to. It sounds a bit easy but if you have never done this before, it isn't super easy. But it also isn't difficult if you can pass through the drive controller(s). You should not use RDM, while it works, it is a pain to configure for someone who hasn't done it before. And you could get Windows 8GB RAM and TrueNAS 16GB RAM. Everyone should be happy.

I think you are taking a huge risk hoping Windows continues to ignore specific drives, especially after a large update. I like the ESXi hypervisor and it's cost nothing but your time to setup. There is a lot of help on the internet for ESXi.
Thanks for the reply, Joe. I was hoping not to go to the VM route, actually, as I don't really need both systems running at the same time and I am not very knowledgeable in VMs. It would also kind of limit the resources for the emulator system (even though there's plenty), which I'd like to avoid.

And yes, I am also aware that I need to disable the drives once again after a large update in Windows (I just had to disable them again earlier this week after I upgraded to Windows 11). Again, I won't be using the emulator system very often as time lacks for full time employee with 3 kids, but I do enjoy playing old school games with my kiddos and wife every once in a while. And I also have multiple backup drives for important data (not only on the NAS machine, but I often do sync backups to another drive on a separate computer), so not a big deal if I accidentally mess up with something on the NAS.

I found a tutorial for GRUB online and it instructed to enter the 'sudo os-prober' command, which did indeed find the Windows OS under the TrueNAS shell, however the 'sudo update-grub' command did not add the found entry to the GRUB menu items. I am not a very knowledgeable Linux person, as you probably can tell by now.

Thanks again!
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
I am not a very knowledgeable Linux person, as you probably can tell by now.
You and me are in the same situation, I'm not a linux person either but Google makes my life a little easier.

I was hoping you could use Grub, but maybe not.

Another option... Use an external USB drive to boot TrueNAS. It could be an external SSD via USB if needed, but you plug the USB drive in, reboot into TrueNAS. It's less involved than changing the BIOS each time.
 

BetaoMA

Cadet
Joined
Dec 28, 2023
Messages
5
Thanks again, Joe.

I am not really changing the BIOS, just the boot sequence for that specific boot on the F11 boot menu - just telling the mob to run windows that one time. It does go back to TrueNAS automatically next reboot.

My only gripe is actually missing the timing for F11 sometimes at boot up (my keyboard has FN keys as priority out of the OS - Mac user) so I actually have to hold FN and keep pressing F11 multiple times and even doing so, sometimes I miss it and have to restart the computer while the TrueNAS Grub menu is in the countdown. That's what I was trying to avoid - if I had the Windows entry in Grub, it would be easier to just select it while in countdown.

Well, I guess I'll have to live with it then. It's better than having to manually plug a USB drive.

I appreciate your inputs. Happy new year!
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
My motherboard has a boot delay timer that I can set to a period of seconds to delay the boot sequence. Does your motherboard BIOS have the same feature? I have mine set for 10 seconds because my IPMI loses connection when the board initializes and then comes back. So I use the delay feature so I too can press F11 key and enter the Boot Menu or BIOS Setup. This is not the fix you wanted but it may help you not miss the window of opportunity to press F11.

I started to look into using GRUB but this sounds painful to make work and then even more painful to keep it working. What about Windows Dual Boot option? Typically it was designed for using two versions of Windows, however I have read that the second OS does not need to be Windows. I have not done Dual Boot in over a decade and it was to Windows and Ubuntu back then on a laptop.
 

BetaoMA

Cadet
Joined
Dec 28, 2023
Messages
5
The Delay boot sequence suggestion is indeed interesting. I'll look into the BIOS as soon as I finish moving a few files in the NAS - should finish in a few hours. Still setting up stuff on the NAS. I just built this computer with Black Friday offers to upgrade from an old Netgear ReadyNAS machine, so still trying to accommodate things in their rightful places.

Windows bootloader is also a good suggestion, but I believe I'd still need to press something to access it, right? (last time I remember dual booting the Win boot loader it was F8). Timing would still be an issue.
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
I use something in Grub to boot an alternate boot device. In my case, either a USB flash drive or a SD Card, depending on which computer.

Here are some rough details;
menuentry "Boot MS-Windows chainloader+" { set root='(hd2,gpt3)' chainloader (hd2)+1 }
The exact values for "hd2" and "gpt3" are based on the disk MS-Windows is loaded on.
Of course, you want the boot delay to be something like 10 or 20 seconds. And disable the hidden thingy Grub has, if I recall that correctly.

Now something like the above works perfectly for me, but I won't be able to trouble shoot much. I fumbled through this for many hours over years, trying to get my non-bootable SD Card reader in my laptop to work. It does now through this chain loading off my normal working boot device.
 

BetaoMA

Cadet
Joined
Dec 28, 2023
Messages
5
Thanks a lot!

Did you add those lines to /etc/default/grub? Or /boot/grub/grub.cfg?

How did you figure out the hd2,gpt3? Is there a command I need to run in shell that would return it?

My os-prober command returns: /dev/nvme1n1p1@/efi/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
Thanks a lot!
...
Your welcome.

...
Did you add those lines to /etc/default/grub? Or /boot/grub/grub.cfg?
...
No, I created a /etc/grub.d/06_sdxc file following the custom file format. That probably won't work for TrueNAS SCALE, and I don't know how to make it work.

...
How did you figure out the hd2,gpt3? Is there a command I need to run in shell that would return it?
...
That is the problem, I CAN'T help you. I barely made mine work. Yours was on NVMe so it maybe totally different disk naming, which again, I don't know.

...
My os-prober command returns: /dev/nvme1n1p1@/efi/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi
I don't know. Because Grub2 is brain dead trying to be everything to everyone, I had to skip that OS prober thing and use fully custom, manual entries.

Sorry. As I stated, I don't know more. And have no desire to learn more about Grub2.
 
Top