This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: associating volume labels with drive letters
- From: "Nellis, Kenneth" <Kenneth dot Nellis at xerox dot com>
- To: "cygwin at cygwin dot com" <cygwin at cygwin dot com>
- Date: Fri, 19 Oct 2012 18:45:10 +0000
- Subject: RE: associating volume labels with drive letters
- References: <0D835E9B9CD07F40A48423F80D3B5A70022CCD@USA7109MB022.na.xerox.net>
-----Original Message-----
From: Nellis, Kenneth
From: Mark O'Keefe
> Hi,
>
> Here is a perl script which I believe should do the trick.
>
> It adds: (for example)
> DRIVE="C:"
> to the end of the blkid output where the drive letter matches the correct drive location.
>
> Along the same lines I've also played around with a customised version of cygwin that allows the mount
> command to use UUID's to identify the drive letter instead of hard coding into fstab. This would be useful
> if you wanted specific drives to be mounted to specific locations without dependence on the drive letter.
>
> I haven't extensively tested this, just quickly put it together to give you the idea.
<snip>
Thanx, Mark. Works great!
--Ken Nellis
-----END Original Message-----
The following bash command line provides another way to learn the
drive letter associated with a given label, in this case the drive
labeled "CRUZER":
$ echo -e "list volume\nexit" | diskpart | awk '/CRUZER/ {print $3}'
G
$
--Ken Nellis
--
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