From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Sat, 7 Jan 2012 14:30:52 -0500 To: 9fans@9fans.net Message-ID: <00ef086e68547f47c3dce5d366aa94bb@chula.quanstro.net> In-Reply-To: <20120107192213.GA4971@polynum.com> References: <20120107182908.GA3674@polynum.com> <1c3ba45416e47236eedd6ca05863d751@chula.quanstro.net> <20120107192213.GA4971@polynum.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] BUG: disk/fdisk.c: corrupts MBR Topicbox-Message-UUID: 56459dd2-ead7-11e9-9d60-3106f5b1d025 > > can you just set sec2cyl=1? > > This wouls probably do the trick. But the code is clean and setting just > this is not---to my taste. > > The ideal would be to simply patch the existing with changed values (no > need to be efficient for 4 * 16 bytes), and leave clearly alone values > set by others. > > And to verify the magic signature for, at least, the active partition > (it would have spot the problem). the code assumes c/h/s. and if it (libdisk) can't find the geometry, it makes stuff up. that seems like a dubious assumption. not very clean at all. i was thinking that setting cyc2cyl=1 should cleanly remove this feature. it could then be reenabled with a command-line flag if necessary for some really ancient h/w. - erik