9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] BUG: disk/fdisk.c: corrupts MBR
Date: Sat,  7 Jan 2012 14:30:52 -0500	[thread overview]
Message-ID: <00ef086e68547f47c3dce5d366aa94bb@chula.quanstro.net> (raw)
In-Reply-To: <20120107192213.GA4971@polynum.com>

> > 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



  reply	other threads:[~2012-01-07 19:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-07 18:29 tlaronde
2012-01-07 19:04 ` erik quanstrom
2012-01-07 19:22   ` tlaronde
2012-01-07 19:30     ` erik quanstrom [this message]
2012-01-07 20:13       ` tlaronde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=00ef086e68547f47c3dce5d366aa94bb@chula.quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).