Cannot install FreeNAS 8.0.2 on SSD: the primary GPT table is corrupt or invalid

Status
Not open for further replies.

MarcusXP

Dabbler
Joined
Nov 13, 2011
Messages
12
Hi all,

I tried installing FreeNAS 8.0.2 on a SSD drive (Patriot Warp V2 32GB), but for some reason it just doesn't work for me.
It installs fine, but after reboot it cannot boot off that drive where it just installed.
The kernel panics, and this is what I get:
Code:
GEOM: ada0: the primary GPT table is corrupt or invalid.
GEOM: ada0: using the secondary instead -- recovery strongly advised.
Trying to mount root from ufs:/dev/ufs/FreeNASs1a
ROOT MOUNT ERROR:
..........

This is my first attempt installing FreeNAS.. so I am new at it.
I tried installing it on another SSD drive (OCZ Vertex2 60GB) and got exactly same issue.
However, it seems to be working just fine when installed on a WD 2TB green drive (WD20EADS).

Anyone can help? How can I get pass this problem?

thanks in advance,
-Marcus
 

MarcusXP

Dabbler
Joined
Nov 13, 2011
Messages
12
Nevermind, I fixed it.
I had to clean up the drives completely, I did a disk dump from /dev/zero. Then reinstalled FreeNAS.
Looks like this version of FreeNAS has a problem when reusing old hard drives (already partitioned).
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Hi MarcusXP,

You should have a look at the Unofficial FAQ sometime (below in signature). There's a question in there about wiping disks/reusing them. There's also another one about installing FreeNAS on a hard drive, or SSD in your case, if you're planning to try and repartition/make it multi-boot etc.

Thanks for posting your solution.
 

MarcusXP

Dabbler
Joined
Nov 13, 2011
Messages
12
Hi MarcusXP,

You should have a look at the Unofficial FAQ sometime (below in signature). There's a question in there about wiping disks/reusing them. There's also another one about installing FreeNAS on a hard drive, or SSD in your case, if you're planning to try and repartition/make it multi-boot etc.

Thanks for posting your solution.

Question #20 from your FAQ did not help me.
I tried running "dd" as specified there, but only by running:
dd if=/dev/zero of=/dev/sda bs=2048
helped me get rid of the error. I had to let the command finish erasing the whole disk, I did the mistake once and I interrupted after a few GB (lack of patience) and that didn't help, so I had to do it again.
You may want to update your FAQ, it may help others, too.

BTW, your FAQ is pretty impressive, you've covered quite a few things there, great job!
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Hi Marcus,

BTW, your FAQ is pretty impressive, you've covered quite a few things there, great job!

Thank you, and to all the posters like you that give feedback to keep improving it!

There was a link in the Off-Topic section I posted about SSD drives being 'impossible' or nearly impossible to completely erase. It might give some insight. I think with mechanical disks, the sectors that need to be cleared are fixed, where SSD's areas get remapped to even out the wear and don't really get wiped like they should. It's probably worse with bigger flash drives as there is more space to remap to. Anyway, I'm glad the FAQ at least got you pointed in a direction that solved your problem and hopefully you found some other answers there as well.

I'm afraid you might be wasting a perfectly good 32GB SSD just to run FreeNAS. Did you understand about the partitioning FreeNAS does and how it might affect your ability to use the remaining 30GB? or are you comfortable enough with FreeBSD/gpt to get around that?

Thanks for the feedback and welcome to the FreeNAS 8 forums!
 

MarcusXP

Dabbler
Joined
Nov 13, 2011
Messages
12
Hi Marcus,

Thank you, and to all the posters like you that give feedback to keep improving it!

There was a link in the Off-Topic section I posted about SSD drives being 'impossible' or nearly impossible to completely erase. It might give some insight. I think with mechanical disks, the sectors that need to be cleared are fixed, where SSD's areas get remapped to even out the wear and don't really get wiped like they should. It's probably worse with bigger flash drives as there is more space to remap to. Anyway, I'm glad the FAQ at least got you pointed in a direction that solved your problem and hopefully you found some other answers there as well.

I'm afraid you might be wasting a perfectly good 32GB SSD just to run FreeNAS. Did you understand about the partitioning FreeNAS does and how it might affect your ability to use the remaining 30GB? or are you comfortable enough with FreeBSD/gpt to get around that?

Thanks for the feedback and welcome to the FreeNAS 8 forums!

I'm not worried about the 32GB SSD. It was laying around for quite some time, so I found a good use for it, at least :)
This way I have my custom built mini-server fully functional!

I do have another machine, a HP MediaSmart EX485 that I want to install FreeNAS 8 on.
However, this seems much more difficult.. as this machine does not come with a video output, plus that I don't have the option to install a 5th hard drive for the Operating System, so I should install FreeNas in a Software Raid-1 on the 1st partition on each of the 4 drives, then do Software Raid-5 with the 2nd partition on each drive.
I was thinking to plug the drives on another machine, finish the installation/configuration, then install them on the EX485 machine. That should work, at least theoretically :)

My biggest challenge is how to install the FreeNAS on Software Raid1.. I don't seem to have the ability to create Software Raid during the installation, it only installs on a single drive, which I cannot use later to create a Raid array with it, which obviously is a big waste (I am using 4x 2TB drives).

Any suggestions?

Thanks a lot for your input so far!
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
My biggest challenge is how to install the FreeNAS on Software Raid1.. I don't seem to have the ability to create Software Raid during the installation, it only installs on a single drive, which I cannot use later to create a Raid array with it, which obviously is a big waste (I am using 4x 2TB drives).

FreeNAS doesn't support this feature right now, but I think there was something about how to do it in the FAQ. Here's a link to the thread:
http://forums.freenas.org/showthread.php?1432-FreeNAS-root-on-ZFS
 

jorevf

Cadet
Joined
Dec 18, 2011
Messages
7
GPT contra MBR

Hi,

I did get the same issue..
And it looks to be an issue when the functions-disk script tries to recognize the media..
And instead of creating an MBR it ands up with a missmatch GPT...

And it looks to be with certain USB sticks, specially the faster ones..
I have a fast 8GB that did not work, but I had a slow 16GB that did..

Anyway...
I did not have time to find the needle in the haystack, so what I did was basically..
1) Chosed shell instead of install after the CD has booted.
2) Create the different partitions via gpart manually and set da0s1 active.
3) installa the boot0 sector
4) used the xz command together with the dd command to get the image on the usb stick..

And it runs...

Thats basically all they do, but, it's the mechanism around finding the right drive and right drive geometry that seems to fail with certain USB sticks..

Regards,
Freddie
 

DaIceMan

Cadet
Joined
Oct 23, 2012
Messages
1
Hi all,

I have some more insight on this problem as it has happened to us while trying to install both version 8.2.0 and the latest RC 8.3.0. Installing using the installer from a CD to a USB stick fails from the server itself (hp ML380 G5) and from a PC using the xz expanded img file. We tried 3 different USB sticks, 2 Sandisk (A 4GB cruzer Micro and a 4GB Crizer FIT) and a generic 2GB stick. The server boots then reports the ROOT MOUNT ERROR due to a corrupt GPT (?).
The only successful install worked using a 4GB Sandisk SD Ultra HC card inserted in a SD to USB adapter. The image was written from the same PC and hardware used to create the others that failed. From the 8.3.0 RC1 shell running gpart show /dev/da0 it reports the correct MBR and 4 partition tables. Inserting the "faulty" 4GB stick and checking that partition reports a weird and CORRUPTED partition while checking this on the PC (I use BOOTICE) everything is fine and exactly as reported on the working version on the FreeNAS machine. Evidently the USB sticks we tested are not correctly recognized (geometry) when booting from that server, while the SD card through the adapter works flawlessly.

The correct partitions are:

=> 63 7744449 da0 MBR (3.7G)
63 1930257 1 freebsd [active] (942M)
1930320 63 - free - (31k)
1930383 1930257 2 freebsd (942M)
3860640 3024 3 freebsd (1.5M)
3863664 41328 4 freebsd (20M)
3904992 3839520 - free - (1.9G)

The non working USB stick (this case a 4GB Crizer FIT) is reported on the same machine this way:

[root@freenas] ~# gpart show /dev/da1
=> 34 7821245 da1 GPT (3.7G) [CORRUPT]
34 30 - free - (15k)
64 8128 1 efi (4M)
8192 32 - free - (16k)
8224 511968 5 linux-data (250M)
520192 32 - free - (16k)
520224 511968 6 linux-data (250M)
1032192 32 - free - (16k)
1032224 225248 7 !9d275380-40ad-11db-bf97-000c2911d1b8 (110M)
1257472 32 - free - (16k)
1257504 585696 8 linux-data (286M)
1843200 5978079 - free - (2.9G)

As you can clearly see, it is a mess. It is even recognized as GPT instead of MBR, must be something with the geometry detection. The same USB Stick in the PC where it was written is reported correctly (MBR, 4 partitions).

Evidently there are still problems with the correct detection and geometry mapping of these sticks.
 
Status
Not open for further replies.
Top