This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: disk format question


On 01/08/2013 04:14 PM, Warren Young wrote:
On 1/8/2013 06:59, bartels wrote:

The windows format.com

format.com hasn't existed since the DOS days. That includes the DOS-based versions of Windows, up through Windows ME. Under NT-derived versions of Windows, "format" is a built-in command in cmd.exe.

That may very well be true, but I have a friend called locate:


$ locate format.com
/cygdrive/c/Windows/System32/format.com
/cygdrive/c/Windows/SysWOW64/format.com
/cygdrive/c/Windows/winsxs/amd64_microsoft-windows-format_31bf3856ad364e35_6.1.7600.16385_none_827dd459a3aa9980/format.com
/cygdrive/c/Windows/winsxs/x86_microsoft-windows-format_31bf3856ad364e35_6.1.7600.16385_none_265f38d5eb4d284a/format.com

And it even seems to work ;-)


> claims the fs is write protected, but I hope dd
can help out.

It's worth a try, but if I had to take a blind bet on it, I'd say you're going to find that dd will give the same result. Cygwin is essentially a user-level process. If cmd.exe cannot do a thing, dd.exe probably can't, either.


It is *possible* that unmounting the filesystem with the taskbar button will let you write to the raw device. But Windows being Windows, it's possible that will make it disappear from the system entirely, too.
I cannot touch the gui.
It may not be necessary, as format.com has a /x feature.

The mtab is not very helpful:

That's because Cygwin proper does not mount local filesystems. The Cygwin mount table just shows you Cygwin-specific mappings that it has added on top of what the underlying NT kernel has done.

Okay, I see.


My question is this: which device in /dev do I use?

According to [this][1] it's probably /dev/sdb. But please do read through what I pointed you to first, and check its applicability carefully before attempting this.

'Probably' is not good enough when the goal is targeted destruction :) I need a solid automated procedure to locate my device.

$ cat  /proc/partitions
major minor  #blocks  name

    8     0 732574584 sda
    8     1    104391 sda1
    8     2 245063542 sda2
    8    16 976762584 sdb
    8    17    102400 sdb1
    8    18 976657408 sdb2
    8    32 4882808320 sdc
    8    33    131072 sdc1
    8    34 4882675712 sdc2
    8    48   3909092 sdd
    8    49   3909091 sdd1
    8    64   7566844 sde
    8    65   7566016 sde1
    8    80  31590400 sdf
    8    81  31590400 sdf1

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
C:/cygwin/bin   932G   62G  871G   7% /usr/bin
C:/cygwin/lib   932G   62G  871G   7% /usr/lib
C:/cygwin       932G   62G  871G   7% /
C:              932G   62G  871G   7% /cygdrive/c
D:               31G   31G     0 100% /cygdrive/d
E:              102M   30M   73M  30% /cygdrive/e
F:              234G  137G   98G  59% /cygdrive/f
K:              3.8G  616M  3.2G  17% /cygdrive/k
O:              4.6T  1.7T  3.0T  36% /cygdrive/o
X:              3.1G  3.1G     0 100% /cygdrive/x
Y:              4.6T  1.7T  3.0T  36% /cygdrive/y
Z:              7.3G   46M  7.2G   1% /cygdrive/z



[1] http://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-posixdevices

Yeah, I had a look see on that page before and it is not all that helpful, for reasons you explained.


Does windows leave a trail when mounting?
Prospects are not good without it.

Thanks for the help.

- bartels



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]