From: "Patrick J. LoPresti" <patl@curl.com>
To: Andries Brouwer <Andries.Brouwer@cwi.nl>
Cc: Anton Altaparmakov <aia21@cam.ac.uk>,
ntfs-dev <linux-ntfs-dev@lists.sourceforge.net>,
Andries Brouwer <Andries.Brouwer@cwi.nl>,
linux-kernel@vger.kernel.org
Subject: Re: [Linux-NTFS-Dev] Geometry determination
Date: 01 Apr 2004 18:06:11 -0500 [thread overview]
Message-ID: <s5ghdw3ti1o.fsf@egghead.curl.com> (raw)
In-Reply-To: <20040329144111.GA26750@apps.cwi.nl>
Andries Brouwer <Andries.Brouwer@cwi.nl> writes:
> What I also claim is that Linux has no way of knowing what geometry
> other operating systems will assign to a disk. Different operating
> systems invent different translations.
The only one that matters is the one Windows expects. Which is the
same as what DOS uses. Which is the geometry from the "legacy INT13"
BIOS interface.
> Moreover, there is the matter of the correspondence of BIOS disk
> numbers and Linux disk names. Especially when both IDE and SCSI
> disks are present, and when more than two disks are present, it may
> be impossible to get this correspondence right. Details depend on
> the type of BIOS.
True, multiple disks pose a problem. But for some applications (e.g.,
mine), the only disk that matters is the boot device. And although it
is theoretically "impossible" to determine the Linux disk name for the
boot device, somehow this has not prevented millions of installations
of Linux boot loaders.
The vast majority of systems do not have very many drives. So it is
possible to take a pretty good guess about how they are named.
Also, a fully modern EDD BIOS *will* let you perform this mapping
reliably by giving you PCI bus and device numbers. The EDD module
exposes this information, provided your BIOS makes it available...
Unfortunately, few do (yet).
> However, there is really no good reason why the kernel would try to
> guess at the geometry other systems like to see.
I agree that such guessing is better left to userspace. But I
disagree about applications using HDIO_GETGEO. By writing to
/proc/ide/hda/settings, I can alter the values returned by HDIO_GETGEO
for IDE devices. This is exactly what I want to do: Set the geometry
which ALL applications use.
For non-IDE devices, HDIO_GETGEO already returns useful geometry (in
my experience). So it is a perfectly fine way for applications to
determine the disk geometry.
> For the past years, the main thing the kernel did was inferring the
> desired geometry from the partition table. But fdisk or LILO or
> whatever can do that as well. So, really no kernel help is needed.
This is completely useless for my application, which is to install an
OS for the first time.
> (And, you say, what if I am partitioning an empty disk to be used by
> DOS/Windows? There my stock answer "look at the partition table"
> fails, but there is some EDD stuff that could be used instead. Of
> course one should always use the FDISK of some operating system to
> create partitions for that operating system.)
But I *am* partitioning an empty disk, and I want to use Linux (see
http://unattended.sourceforge.net/).
And I do. See:
http://www.ussg.iu.edu/hypermail/linux/kernel/0404.0/0269.html
Cheers!
- Pat
next prev parent reply other threads:[~2004-04-01 23:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1080564842.5545.19.camel@imp.csi.cam.ac.uk>
2004-03-29 13:48 ` [Linux-NTFS-Dev] Geometry determination Szakacsits Szabolcs
2004-03-29 14:41 ` Andries Brouwer
2004-03-29 15:02 ` Anton Altaparmakov
2004-04-01 23:06 ` Patrick J. LoPresti [this message]
2004-03-29 14:57 ` Anton Altaparmakov
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=s5ghdw3ti1o.fsf@egghead.curl.com \
--to=patl@curl.com \
--cc=Andries.Brouwer@cwi.nl \
--cc=aia21@cam.ac.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-ntfs-dev@lists.sourceforge.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