Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <2380.130.240.136.220.1119036731.squirrel@pinus.tt.luth.se>
In-Reply-To: <42B269D5.2050907@hq.astra.ph>
References: <42B2687C.4010601@vecernik.at> <42B269D5.2050907@hq.astra.ph>
Date: Fri, 17 Jun 2005 21:32:11 +0200 (CEST)
Subject: Re: POSIX devices
From: "Bengt-Arne Fjellner" <Bengt-Arne.Fjellner@ltu.se>
To: cygwin@cygwin.com
User-Agent: SquirrelMail/1.4.4
MIME-Version: 1.0
Content-Type: text/plain;charset=iso-8859-1
Content-Transfer-Encoding: 8bit


Carlo Florendo wrote:
> Oliver Vecernik wrote:
>
>>Hi all,
>>
>>I'd like to inspect some MBR's from various devices. I have an external
>>Firewire disk (x:), an USB stick (e:) and a flash card (F:, pcmcia).
>>

<snip>

>>But how do I know the order of device names? It all depends when the
>>devices are plugged on to the system. Is there a command to find out?
>>
>>dd if=/dev/sd? of=/tmp/foo bs=512 count=1
>>
>>
>>
>
> AFAIK, Cygwin does not implement the /dev directory.
>
> I'm afraid there is no cygwin command to find out the order of devices
> plugged to the system although I'd be glad if someone corrects me and
> says that there is.

There is. (or rather will be. I think it might be in the pipeline).
if you want to check it check
http://pinus.tt.ltu.se/~baf/dkoll.tgz
dkoll.c is cygwin source the rest is visual studio
build by make dkoll
dkoll.exe is the compiled cygwin version which gives on my system:

$ ./dkoll
Disk 0  cygwin=/dev/sda
dsig a853000400000080
Disksize 18GB
 part    len typ

Disk 1  cygwin=/dev/sdb
dsig a05f20122a744c01
Disksize 74GB
 part    len typ
    1   54MB 222 Dell system          Dell 4.1
    2   59GB   7 NTFS                 NTFS
    3  502MB  12 FAT 32 (xp)          MSWIN4.1
    4   13GB 131 Linux Native         ext3 LILO
    5  996MB 130 Linux Swap           SWAP

Disk 2  cygwin=/dev/sdc
dsig c282801c8e9ce5bf
Disksize 115GB
 part    len typ
    1  115GB 131 Linux Native         XFS

Disk 3  cygwin=/dev/sdd
dsig f99e600d8e82ca7b
Disksize 55GB
 part    len typ
    1   55GB   7 NTFS                 NTFS

Disk 4  cygwin=/dev/sde
dsig 7de080005cf52c49
Disksize 2.0GB
 part    len typ
    1  2.0GB 131 Linux Native         ext2

baf@bafstat3 ~/dkoll
$
so you get windows disk number. cygwin /ev/sdX disksize and partition size
plus a good guess of what filesystem it has. NOT always perfect.
The partition number is the the same as Y in /dev/sdXY
Hope this helps.

>
> Thank you very much.
>
> Best Regards,
>
> Carlo
>
> --
> Carlo Florendo
> Astra Philippines Inc.
> www.astra.ph

-- 
Bengt-Arne Fjellner
0910-58 53 69



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

