9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Axel Belinfante <Axel.Belinfante@cs.utwente.nl>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] fdisk: reported number/size of cylinders changes
Date: Mon,  2 Jun 2003 16:03:04 +0200	[thread overview]
Message-ID: <200306021403.h52E34215452@zamenhof.cs.utwente.nl> (raw)
In-Reply-To: Your message of "Mon, 02 Jun 2003 09:38:42 -0400." <e62ffe300b697c2c18dd5a87d8e94fb5@plan9.bell-labs.com>

I booted plan 9 in the same way in both cases
(kernel from flop, fs over the net).

In /sys/src/libdisk/disk.c I found the following comment
near the opendisk code, which explains the difference between
opening a ``clean'' empty disk, and one already containing
a partition table. However, I would have expected that
reading (and using) the partition table on disk would
give me back the number previously shown (and, written,
I assume), by fdisk when I ran it first time.

Axel.

Comment found in /sys/src/libdisk/disk.c:

 * Discover the disk geometry by various sleazeful means.
 *
 * First, if there is a partition table in sector 0,
 * see if all the partitions have the same end head
 * and sector; if so, we'll assume that that's the
 * right count.
 *
 * If that fails, we'll try looking at the geometry that the ATA
 * driver supplied, if any, and translate that as a
 * BIOS might.
 *
 * If that too fails, which should only happen on a SCSI
 * disk with no currently defined partitions, we'll try
 * various common (h, s) pairs used by BIOSes when faking
 * the geometries.

[maybe I should check that for the clean disk the
 second case is used, and not the third]

> Did you happen to get to plan 9 differently in the two instances?
> It could be that you're just seeing two different logical geometries
> of the same disk.  In LBA mode, we don't use the logical geometries
> except to determine the number of disk blocks, so you should be OK
> in both cases (modulo the fact that one comes out to less sectors).




  reply	other threads:[~2003-06-02 14:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-02 12:48 Axel Belinfante
2003-06-02 13:38 ` David Presotto
2003-06-02 14:03   ` Axel Belinfante [this message]
2003-06-02 14:09     ` David Presotto
2003-06-02 14:20       ` Axel Belinfante
2003-06-03  1:57     ` Russ Cox, rsc

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=200306021403.h52E34215452@zamenhof.cs.utwente.nl \
    --to=axel.belinfante@cs.utwente.nl \
    --cc=9fans@cse.psu.edu \
    /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).