"Invalid partition table" on 10-stable.

Allan Jude allanjude at freebsd.org
Fri Sep 19 00:51:15 UTC 2014


On 2014-09-18 18:22, Frank Mayhar wrote:
> On Fri, 2014-09-19 at 00:03 +0200, Wojciech Puchar wrote:
>>>>
>>>> /sbin/gpart bootcode -b /boot/pmbr ada0
>>>>
>>>> Probably gpart changed the way it installs the MBR, but I think it is
>>>> very board (or maybe BIOS) specific: other systems do not have the issue.
>>>>
>>>> Please let me know if this "trick" helps for you.
>>>
>>> I did install the pmbr during the initial setup, as well as the bootstrap
>>> itself.  I do plan to try the "set active partition" trick suggested
>>> elsewhere.
>> while it may not solve your problems i prefer to NEVER make MBR partitions 
>> at all, only bsdlabel.
>>
>> example:
>>
>> [root at laptop ~]# bsdlabel ada0
>> # /dev/ada0:
>> 8 partitions:
>> #          size     offset    fstype   [fsize bsize bps/cpg]
>>    a:     249984         16    4.2BSD        0     0     0
>>    b:    4750000     250000      swap
>>    c:  117210240          0    unused        0     0     # "raw" part, don't edit
>>    d:   63332672    5000000    4.2BSD        0     0     0
>>    h:   48877568   68332672    4.2BSD        0     0     0
>>
>> simply do
>>
>> bsdlabel -B disk
>>
>> to make it bootable.
> 
> Well, my pmbr isn't really an MBR, it's just the fake one to make things
> "work right" as I understand it.  In fact, I don't really understand it,
> or why it's necessary, but it's pretty clear that something's funky
> here.
> 
> I'm planning to avoid disk/bsdlabel entirely in favor of gpart, GPT and
> zfs.  (I'm dead set on using ZFS; I don't trust UFS nearly as much as I
> used to.)
> 

I think the reason it is necessary, and called a 'protective' MBR, is
that when Windows sees a disk without a valid-looking MBR, it
immediately offers to format it for you. Thus the pMBR prevents you from
accidentally erasing all of your data if you boot windows of another
drive or something.

-- 
Allan Jude

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20140918/8007dca1/attachment.sig>


More information about the freebsd-hackers mailing list