public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: cygwin@cygwin.com
Subject: Re: Relating device names in /dev/ to drive letters in Windows.
Date: Fri, 24 Jul 2020 10:26:02 -0600	[thread overview]
Message-ID: <5e6fd378-7800-4422-5f63-5d6dc0796029@SystematicSw.ab.ca> (raw)
In-Reply-To: <AM0PR05MB4898BE767E2785150F88507BE7760@AM0PR05MB4898.eurprd05.prod.outlook.com>

On 2020-07-23 03:36, Hamish McIntyre-Bhatty via Cygwin wrote:
> I have noticed that after plugging in a USB drive, device files appear
> in /dev that correlate to the partitions on the drive.
> 
> This is great because it means things like ddrescue can work in Cygwin,
> but I'm not yet sure how to relate these to the drives Windows sees.
> None of the standard Linux tools I use to gather system information
> (lsblk, blkid, lshw) seem to be available on Cygwin. I'm guessing this
> is because they won't work because there's no kernel or low level
> hardware access or something like that. Does anyone know how to do this?

$ cygcheck -p blkid
Found 17 matches for blkid
.htaccess -
libblkid-devel-2.32.1-1 - libblkid-devel: Block device ID library (development)
libblkid-devel-2.33.1-1 - libblkid-devel: Block device ID library (development)
libblkid-devel-2.33.1-2 - libblkid-devel: Block device ID library (development)
.htaccess -
libblkid1-2.32.1-1 - libblkid1: Block device ID library (runtime)
libblkid1-2.33.1-1 - libblkid1: Block device ID library (runtime)
libblkid1-2.33.1-2 - libblkid1: Block device ID library (runtime)
util-linux-debuginfo-2.32.1-1 - util-linux-debuginfo: Debug info for util-linux
util-linux-debuginfo-2.33.1-1 - util-linux-debuginfo: Debug info for util-linux
util-linux-debuginfo-2.33.1-2 - util-linux-debuginfo: Debug info for util-linux
util-linux-2.32.1-1-src - util-linux-src: Collection of basic system utilities
(source)
util-linux-2.33.1-1-src - util-linux-src: Collection of basic system utilities
(source)
util-linux-2.33.1-2-src - util-linux-src: Collection of basic system utilities
(source)
util-linux-2.32.1-1 - util-linux: Collection of basic system utilities
util-linux-2.33.1-1 - util-linux: Collection of basic system utilities
util-linux-2.33.1-2 - util-linux: Collection of basic system utilities
$ which blkid
/sbin/blkid
$ cygcheck -f /sbin/blkid
util-linux-2.33.1-2

Everyone has util-linux installed as it is in the Base category.

Someone has to provide the system interfaces in a POSIX compliant manner or at
least similar to Linux and BSD to port the libraries.

You can find most info under /proc/registry/ (even
/proc/registry/HKEY_PERFORMANCE_DATA/{@,Costly,Global}/ - explore with ls and
regtool) and there are Windows dynamic system objects under /proc/sys/ e.g.
/proc/sys/ Device/ and /proc/sys/DosDevices/Global/ (explore with ls and od/xxd).

Note: You need an elevated admin shell to use most device tools and see a lot of
/proc/sys/.

Hack at it, sir!

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in IEC units and prefixes, physical quantities in SI.]

  parent reply	other threads:[~2020-07-24 16:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-23  9:36 Hamish McIntyre-Bhatty
2020-07-23 11:29 ` Hamish McIntyre-Bhatty
2020-07-24  8:45   ` Corinna Vinschen
2020-07-24 16:26 ` Brian Inglis [this message]
2020-07-27 11:24 Hamish McIntyre-Bhatty
2020-07-27 12:44 ` Corinna Vinschen
2020-07-27 13:10 ` Brian Inglis
     [not found] <mailman.96674.1595867913.8982.cygwin@cygwin.com>
2020-07-28 21:36 ` Hamish McIntyre-Bhatty

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=5e6fd378-7800-4422-5f63-5d6dc0796029@SystematicSw.ab.ca \
    --to=brian.inglis@systematicsw.ab.ca \
    --cc=cygwin@cygwin.com \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).