Root mount error on USB stick that was previously used as an ESXi host

Status
Not open for further replies.

lucozade

Cadet
Joined
Feb 16, 2012
Messages
4
Freenas 8.04 RELEASE

HP Microserver, N36L, 8Gb RAM.

I've got numerous USB sticks which I use to boot either ESXi 5 or FREENAS.

I took a working FREENAS system and removed the hard drives from it for safe keeping of data.

I needed to use the hardware for an ESXi host for a temp amount of time.

I installed ESXi and today decided to return it back to FREENAS.

Using the same hardware I've used in an operational FREENAS solution I'm getting "root mount error" during Startup. Installation goes through fine.

As a trial I've now taken 2 other USB sticks out of other systems, 1 of which used to be used by FREENAS and is now ESXi. I installed FREENAS onto both alternative USBs and get the same problem.

Is there something the installation process is not doing to initialise the USB sticks correctly?

The last time this happened I had to go out and by a brand new USB stick!!!
 

lucozade

Cadet
Joined
Feb 16, 2012
Messages
4
Ok so I've solved this one by trawling through the various threads. Not pleasant!

The solution was to write the image to the USB stick using Windows.

The steps I took:

1. Insert USB stick
2. Launch Diskpart
3. Select disk x
4. clean
5. exit
6. I downloaded 7-zip and physdiskwrite
7. Using MagicIso I extracted the file "FreeNAS-x64.img.xz" from "FreeNAS-8.0.4-RELEASE-x64.iso"
8. Then I used 7-Zip to extract the img from "FreeNas-x64.img.xz", calling it "freenas"
9. With all the files in the same directory as each other I launched, "physdiskwrite -u freenas"
10. Selected my disk and waited till it finished.

WOW !!!

I note that on one of the many threads on the subject "ulbador" has posted a possible reason why and solution, why can't this be incorporated in the Freenas installer?

"I wanted to add to this quickly because I found out the exact reason this happens.

With GPT partitioning scheme, the partition table is stored at the beginning (primary) and end (backup) of the disk. So if you don't zero out the WHOLE disk, which takes forever, the backup GPT table is loaded.

So to fix the above problem you have to do something like:

dd if=/dev/zero of=/dev/theDrive bs=512 count=2

AND

dd if=/dev/zero of=/dev/theDrive bs=512 skip=sectors

where sectors is the length of your disk as reported in fdisk (usually the big long number), minus 1 or 2. These two commands invalidate the primary AND secondary partition tables in a few seconds and saves the time of zeroing the whole disk.

FreeBSD, and subsequently FreeNAS is NOT very good at doing this. Even going between FreeBSD and FreeNAS versions can be troublesome. I upgraded to FreeBSD 9 temporarily and it would not let me downgrade to a fresh install of 8 or 7 until I did this.

This is also the cause when the installer tells you it can't find the slice that it supposedly just made."
 
Status
Not open for further replies.
Top