Date: Fri, 06 Apr 2012 08:36:39 +0400 From: "Andrey V. Elsukov" <ae@FreeBSD.org> To: Bengt Ahlgren <bengta@sics.se> Cc: freebsd-geom@FreeBSD.org Subject: Re: bin/165789: bsdlabel(8): partition c doesn't cover the whole unit! Message-ID: <4F7E72D7.6040501@FreeBSD.org> In-Reply-To: <201204052210.q35MA5gt065889@freefall.freebsd.org> References: <201204052210.q35MA5gt065889@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------020200020100040002090800 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit 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 --------------020200020100040002090800 Content-Type: text/plain; charset=windows-1251; name="bsdlabel.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="bsdlabel.diff" 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; --------------020200020100040002090800--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F7E72D7.6040501>