Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Dec 2014 20:46:45 +0100
From:      bastian-freebsd-ml@t6l.de
To:        freebsd-questions@freebsd.org
Cc:        Paul Pathiakis <pathiaki2@yahoo.com>
Subject:   Re: Invalid partition table
Message-ID:  <5475042E.2050102@yahoo.com>

next in thread | raw e-mail | index | archive | help
Paul, thanks for answering. 
Sorry for coming back this late, I was not on the -questions mailinglist,
but found your reply in the archives.

> I don't understand your partitioning.

What is wrong with it?

> Typically, due to the 'pool' concept of storage with ZFS versus the 
> filesystem types, things have changed from traditional partitioning.

At the time during installation, I did not try to customise any setup
configuration. I just selected auto partitioning with zfs-on-root. This
is the result. 

> Try a 'man gpart' to start off.
> 
> Look at the 'gpart recover' and see if that helps.
> 
> Commands/flags that you will want to look at in more detail:
> 
> gpart add -t <type> -a <alignment> -i <index> geom
> gpart create -s <scheme> provider
> 
> Now, looking at these:
> 
> gpart create -s GPT provider (where provider is /dev/ada? in your case 
> or /dev/da? for example)
> 
> This command labels the type of partitioning scheme.
> 
> gpart add -t (type in your case:  freebsd-boot, freebsd-swap, 
> freebsd-zfs) -a 4k (4k boundaries) -i <index - creates p1 for index 1, 
> etc> ada0 (in your case)
> 
> Now, in my case, the following:
> 
> gpart create -s GPT ada0
> gpart add -t freebsd-boot -a 4k -i 1 ada0 <RET> (This creates /dev/ada0p1)
> gpart add -t freebsd-swap -s 2g -i 2 ada0 <RET> (This creates a 2GB swap 
> on /dev/ada0p2)
> gpart add -t freebsd-zfs -i 3 ada0 <RET> (This creates the large ZFS 
> pool on the remaing part of the disk on /dev/ada0p3)
> 
> gpart show <RET>

For me it prints:
"""
=>       34  500118125  ada0  GPT  (238G)
         34       1024     1  freebsd-boot  (512K)
       1058    4194304     2  freebsd-zfs  (2.0G)
    4195362   16777216     3  freebsd-swap  (8.0G)
   20972578  479145581     4  freebsd-zfs  (228G)
"""

I use ZFS encryption. Maybe this explains the additional partition.?

> will give you a much more succinct output so you can see your partition 
> table.
> 
> Now, when you have created this, you want to make sure that your have 
> the correct bootstrap written to the partition.  This is a master boot 
> record (MBR) that needs to be written to a PARTITION ->  pmbr
> 
> Back to gpart for a zfs bootstrap for gpt using the MBR for partitions:
> 
> gpart -p /boot/pmbr -b /boot/gptzfsboot -i 1 (<-- partition 1 is your 
> freebsd-boot partition) ada0 <RET>
> 
> You should see "bootcode installed on ada0"

I also did that, but it did not change the behaviour. The message is
still popping before the boot menu is shown. Still "Partition table
invalid!"


Cheers,


-- 
Bastian



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5475042E.2050102>