NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: GPT and raid seems ok, missing disks awkward



On Wed, May 23, 2012 at 03:24:38PM +0200, Petar Bogdanovic wrote:
> On Wed, May 23, 2012 at 08:44:10AM -0400, Greg Troxel wrote:
> > 
> >        start        size  index  contents
> >            0           1         PMBR
> >            1           1         Pri GPT header
> >            2          32         Pri GPT table
> >           34          30         
> >           64  3907029071      1  GPT part - NetBSD RAIDFrame component
> >   3907029135          32         Sec GPT table
> >   3907029167           1         Sec GPT header
> 
> 
> If you intend to boot from this (ffs @ gpt @ raidframe @ gpt @ disk),
> you'll probably need this ugly duckling:
> 
>     Index: bootxx/boot1.c                             
>     ===================================================================
>     RCS file: /cvsroot/src/sys/arch/i386/stand/bootxx/boot1.c,v        
>     retrieving revision 1.20                                   
>     diff -u -r1.20 boot1.c  
>     --- bootxx/boot1.c      6 Jan 2011 01:08:48 -0000       1.20
>     +++ bootxx/boot1.c      30 Mar 2012 13:58:33 -0000          
>     @@ -86,7 +86,7 @@                                 
>              * (Maybe this should only be done if the filesystem
>              * magic number is absent.)
>              */
>     -       bios_sector += RF_PROTECTED_SECTORS;
>     +       bios_sector += RF_PROTECTED_SECTORS+34;
>             fd = ob();
>             if (fd != -1)
>                     goto done;
>     Index: lib/biosdisk.c     
>     ===================================================================
>     RCS file: /cvsroot/src/sys/arch/i386/stand/lib/biosdisk.c,v        
>     retrieving revision 1.40                                   
>     diff -u -r1.40 biosdisk.c
>     --- lib/biosdisk.c      16 Jan 2012 18:47:57 -0000      1.40
>     +++ lib/biosdisk.c      30 Mar 2012 13:58:33 -0000          
>     @@ -760,7 +760,7 @@                               
>             d->boff = d->part[partition].offset;
> 
>             if (d->part[partition].fstype == FS_RAID)
>     -               d->boff += RF_PROTECTED_SECTORS; 
>     +               d->boff += RF_PROTECTED_SECTORS+34;
>                                                        
>      #ifdef _STANDALONE
>             bi_wedge.startblk = d->part[partition].offset;
> 
> while the offset in your case would be 64.

Sorry that's not true. It would only be 64 if the ffs partition of your
second gpt would also start at 64.  The first gpt/mbr layout doesn't
matter in this case.


Home | Main Index | Thread Index | Old Index