This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: POSIX devices
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/