FreeNAS 8.3.0 - root mount error

Status
Not open for further replies.

gmisc

Cadet
Joined
Dec 11, 2012
Messages
1
I am downloaded the FreeNAS-8.3.0-Release-x64.iso and burned it onto a CD. Booted from the CD and installed the FreeNAS onto a usb stick.

On booting from the usb stick, I get the following errors... I found this link with the same error mentioned - http://forums.freenas.org/archive/index.php/t-3189.html (at the end, it is redirected to another link - http://forums.freenas.org/showthread.php?4278-USB-3-0-Part-II&p=16336&viewfull=1#post16336 which talks about enabled usb3.0 support --- how do I update loader.conf file from the prompt,,, what file editing capabilities are available?)
Or is there any other solution to this problem.

Trying to mount root from ufs:/dev/ufs/FreeNASs1a
ROOT MOUNT ERROR:
If you have invalid mount options, reboot, and first try the following from
the loader prompt:

set vfs.root.mountfrom.options=rw

and then remove invalid mount options from /etc/fstab.

Loader variables:
vfs.root.mountfrom=ufs:/dev/ufs/FreeNASs1a
vfs.root.mountfrom.options=ro

Manual root filesystem specification:
<fstype>:<device> Mount <device> using filesystem <fstype>
eg. ufs:/dev/da0s1a
eg. cd9660:/dev/acd0
This is equivalent to: mount -t cd9660 /dev/acd0 /
 

mani.de

Cadet
Joined
Dec 15, 2012
Messages
2
I've got exact the same problem. Tried with two different USB Sticks. I initialized them on a Mac. Every time I got the exact same ROOT MOUNT ERROR problem mentioned above when trying to boot my NAS. But finally I found the solution! By googling around I did not find a definitive answer (only hints), so I'll describe the problem here:

Root of the problem is that the stick was once partitioned with a GUID partition table (GPT). A GPT is written at the beginning of the disk (Primary GPT Header) and at the end of the disk (Secondary GPT Header)! FreeNAS is written to the disk simply by copying blocks with the "dd" command at the beginning of the stick. It writes a Master Boot Record (MBR) Partition Table; this is only at the beginning. Therefore the Secondary GPT Header is kept at the very end of the stick. Now FreeNAS starts to boot fine from the stick but for some reason at some point of the boot process it is suddenly confused about this remaining secondary GPT Header at the end of the stick, resulting in the ROOT MOUNT ERROR problem.

The solution is simple: just overwrite the Secondary GPT Header at the end of the stick with zeroes! I've done this after having installed FreeNAS on the stick, and once I zeroed the trail of the stick, the system booted fine off that stick. I did not even need to install FreeNAS again.

In my case, on the Mac, I did the following:
- Check out the size of the USB stick with diskutil info /dev/disk2 (make sure to use the correct path; it's just an example here!)
- Calculate the parameters to overwrite an important amount of data at the end of the stick with dd if=/dev/zero of=/dev/disk2 bs=X oseek=Y count=Z.

Make sure to calculate reasonable numbers (X, Y, Z) to not overwrite the already written FreeNAS system.
In my case I had a 16GB stick and the used FreeNAS (8.3.0) is 2GB, so I had a lot of room. I used blocksize 512 (bs) and overwrote 100.000 blocks (count). Although I think a much smaller number would have been sufficient. For the oseek parameter I checked the total number of blocks of the stick (diskutil info) and substracted 100.0000 (my used block count).

Hope that helps!
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
From the FAQ, these 2 commands do the same thing:

Code:
dd if=/dev/zero of=/dev/ada1 bs=1m count=1
dd if=/dev/zero of=/dev/ada1 bs=1m oseek=`diskinfo ada1 | awk '{print int($3 / (1024*1024)) - 4;}'`


Also starting with version 8.2, one of the wipe/erase/delete commands in the GUI does this. I don't remember which one off the top of my top.
 

mani.de

Cadet
Joined
Dec 15, 2012
Messages
2
Ah yes, thank you.
The first command should not be used if freeNAS is already installed on the stick.
The problem with the second command in my case is that the "diskinfo" command is not available on OS X.

I saw this in the FAQ but from the description I was not sure (at that time) if this is really a solution for the ROOT MOUNT ERROR issue. The FAQ entry is about re-using disks for the pool, but in my case it was a problem with the USB stick used for the FreeNAS system.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Unfortunately the FAQ was copied from my blog, without really asking. I have no control over editing or updating it anymore which is unfortunate for everyone since I've also removed my other tutorials.

As you also noticed, you need to change "ada1" to whatever disk you want to wipe.
 

MaLaCoiD

Dabbler
Joined
Sep 23, 2014
Messages
12
I just wanted to thank mani.de for the help. I was getting the same error on my 4 GB USB stick. To fix it, I ran OS X in a VM and attached the USB stick to it. It was detected as disk1:
Code:
$ diskutil info /dev/disk1
  Device Identifier:  disk1
  Device Node:  /dev/disk1
  Part of Whole:  disk1
  Device / Media Name:  Verbatim STORE N GO Media

  Volume Name:  Not applicable (no file system)

  Mounted:  Not applicable (no file system)

  File System:  None

  Content (IOContent):  FDisk_partition_scheme
  OS Can Be Installed:  No
  Media Type:  Generic
  Protocol:  USB
  SMART Status:  Not Supported

  Total Size:  4.0 GB (4007657472 Bytes) (exactly 7827456 512-Byte-Units)
  Volume Free Space:  Not applicable (no file system)
  Device Block Size:  512 Bytes

  Read-Only Media:  No
  Read-Only Volume:  Not applicable (no file system)
  Ejectable:  Yes

  Whole:  Yes
  Internal:  No
  OS 9 Drivers:  No
  Low Level Format:  Not supported


The above output confirms I have the right disk device, and "(exactly 7827456 512-Byte-Units)" tells me the values for bs and oseek (7827456-100000). So I issued:
Code:
$ sudo dd if=/dev/zero of=/dev/disk1 bs=512 oseek=7727456 count=100000
Password:
100000+0 records in
100000+0 records out
51200000 bytes transferred in 103.414873 secs (495093 bytes/sec)
 
Status
Not open for further replies.
Top