On 06.04.2012 2:10, Bengt Ahlgren wrote:
>  bsdlabel: partition c doesn't cover the whole unit!
>  bsdlabel: An incorrect partition c may cause problems for standard system 
> utilities
>  
>  I added a printout of the value bsdlabel compares with:
>  
>  bsdlabel: partition c doesn't cover the whole unit! 1953525168
>  
>  This number corresponds to the size of the whole disk, not the size of
>  the slice, so lp->d_secperunit is not the right variable to use, or is
>  incorrectly set.
>  
>  Finally, I stepped back to r220455 (in stable/8).  That version of
>  bsdlabel did not complain, so it seems that r227564 by ae (cc:d) is
>  causing, or making visible, this problem.

Hi,

Thank you for your report. Yes, r227564 has made visible a known sysinstall's 
bug.
GEOM_PART_BSD already has quirk that automatically fixes it, can you try 
attached patch?

-- 
WBR, Andrey V. Elsukov
Index: head/sbin/bsdlabel/bsdlabel.c
===================================================================
--- head/sbin/bsdlabel/bsdlabel.c       (revision 233932)
+++ head/sbin/bsdlabel/bsdlabel.c       (working copy)
@@ -1194,7 +1194,8 @@ checklabel(struct disklabel *lp)
                        lp->d_interleave = vl->d_interleave;
                if (lp->d_secpercyl == 0)
                        lp->d_secpercyl = vl->d_secpercyl;
-               if (lp->d_secperunit == 0)
+               if (lp->d_secperunit == 0 || /* Fix-up a sysinstall bug. */
+                   lp->d_secperunit > vl->d_secperunit)
                        lp->d_secperunit = vl->d_secperunit;
                if (lp->d_bbsize == 0)
                        lp->d_bbsize = vl->d_bbsize;
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-geom
To unsubscribe, send any mail to "[email protected]"

Reply via email to