This is a nas data disk... how does this work?

Status
Not open for further replies.

fmiz

Dabbler
Joined
Jan 13, 2015
Messages
14
Hello,
today I just encontered an error with my freenas box, the bios was trying to boot from one of the hard disks instead of the usb boot drive, and I saw the error "This is a nas data disk and cannot boot system" displayed on the console. How does this work? (I think it's awesome)
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
How does it work? I imagine it's just some trivial boot code that outputs the message using BIOS interrupt calls. Probably doesn't even need more than the little bit of program storage available in the MBR.
 

saikee

Explorer
Joined
Feb 7, 2017
Messages
77
I believe whenever a user change the hard disks, either removing one or inserting more, the bios can lose track of the booting order.

The OP message is typical of having change the disk hardware. The cure is dead simple. Just go into the BIOS page and select the original boot disk. Works 10 out of 10 for me.

The message will not come up if the hard disks and possible the USB boot disk stay at the original positions and there is no reduction or addition of disk.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
I believe whenever a user change the hard disks, either removing one or inserting more, the bios can lose track of the booting order.

The OP message is typical of having change the disk hardware. The cure is dead simple. Just go into the BIOS page and select the original boot disk. Works 10 out of 10 for me.

The message will not come up if the hard disks and possible the USB boot disk stay at the original positions and there is no reduction or addition of disk.
We know, the question was "how is this implemented". ;)
 

saikee

Explorer
Joined
Feb 7, 2017
Messages
77
Ericloewe,

Not too sure what do you mean by "how is this implemented" but I attempt with the following:

A typical setup of FreeNAS is one boot disk with the system installed. Inside its first 512 byte or the first sector will have the Stage-1 of Grub which is the boot loader selected by FreeNAS and nearly all Linux. During POST if the Bios has been directed to the correct disk this sector will be loaded into the memory. The Stage-1 is design to load the Stage-2 of Grub which is the real intelligence as Stage-1 is too small except to carry the hard disk address of its Stage-2. The Stage-2 is the one that show up on the screen with various booting alternatives.

The vdev data disks have no boot sector and cannot boot up FreeNAS. I believe the OP's error message came for Stage-1 Grub.

If Stage-2 has been implemented a user can have the command prompt (the condition after pressing the "c" key at a Grub screen) and able to boot up any "installed" operating system manually. This works for all Windows and Linux but I haven't tried it with the FreeBSD system. According to the theory all one needs is to follow the commands listed in /boot/grub/grub.cfg. Grub can be installed without an operating system attached.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
You don't need GRUB to print a short message to the BIOS console, that's massive overkill.

Once you have GRUB loaded, there's really nothing more you need to do other than say "Load OS with parameters X from ZFS pool with ID Y".
 
Status
Not open for further replies.
Top