Discussion:
? ntfs partition reported as "fuseblk"
(too old to reply)
crankypuss
2012-07-14 17:42:22 UTC
Permalink
Running Ubuntu 11.10

Use gparted to create a NTFS partition on a USB stick.

Insert the USB stick and it automounts.

mount reports it as:
/dev/sdc1 on /media/usb-userdata type fuseblk
(rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)

How can I find out that it's actual filesystem type is ntfs?
Frisbee Ninja
2012-07-14 18:10:40 UTC
Permalink
On Sat, 14 Jul 2012 11:42:22 -0600
Post by crankypuss
Running Ubuntu 11.10
Use gparted to create a NTFS partition on a USB stick.
Insert the USB stick and it automounts.
/dev/sdc1 on /media/usb-userdata type fuseblk
(rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)
How can I find out that it's actual filesystem type is ntfs?
From the 'net:
"The short answer is that "fuseblk" is just how an ntfs partition is
reported via the "mount" command, among others. The "fuse" part comes
from FUSE (file system in userspace)."

http://en.wikipedia.org/wiki/Filesystem_in_Userspace


Cybe R. Wizard
--
Nice computers don't go down.
Larry Niven, Steven Barnes
"The Barsoom Project"
crankypuss
2012-07-15 07:54:13 UTC
Permalink
Post by Frisbee Ninja
On Sat, 14 Jul 2012 11:42:22 -0600
Post by crankypuss
Running Ubuntu 11.10
Use gparted to create a NTFS partition on a USB stick.
Insert the USB stick and it automounts.
/dev/sdc1 on /media/usb-userdata type fuseblk
(rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)
How can I find out that it's actual filesystem type is ntfs?
"The short answer is that "fuseblk" is just how an ntfs partition is
reported via the "mount" command, among others. The "fuse" part comes
from FUSE (file system in userspace)."
http://en.wikipedia.org/wiki/Filesystem_in_Userspace
Cybe R. Wizard
Thanks, but I already understood that an ntfs partition shows up as fuseblk.

What I was trying to ask is whether there is a command that will cause
fuse to cough up the details of the underlying filesystem. The
information stored by fusermount ought to be available somehow... maybe
it's excessively old-school of me, but software that says "i know, but i
won't tell you" just pisses me off.

Maybe I need to approach this in a different way. The mount command has
reported that /dev/sdc1 is fuseblk, so far so good. Now, gparted can
report that /dev/sdc1 is an ntfs filesystem whether or not it's mounted,
it just can't tell much about how much of it is used unless it's
mounted. How can I get at whatever gparted is using to determine that
/dev/sdc1 is an ntfs filesystem? I guess I'll need to go look at the
commands used to list partition data once I wake up enough to remember
what they are. Thanks.
Frisbee Ninja
2012-07-15 13:55:20 UTC
Permalink
On Sun, 15 Jul 2012 01:54:13 -0600
Post by crankypuss
Post by crankypuss
How can I find out that it's actual filesystem type is ntfs?
[snip my attempt to 'help']
Post by crankypuss
Thanks, but I already understood that an ntfs partition shows up as fuseblk.
Heh, sorry trying to help. Perhaps a little re-phrasing of your
question would have alleviated my involvement.

Cybe R. Wizard
--
Nice computers don't go down.
Larry Niven, Steven Barnes
"The Barsoom Project"
crankypuss
2012-07-15 18:02:43 UTC
Permalink
Post by Frisbee Ninja
On Sun, 15 Jul 2012 01:54:13 -0600
Post by crankypuss
Post by crankypuss
How can I find out that it's actual filesystem type is ntfs?
[snip my attempt to 'help']
Post by crankypuss
Thanks, but I already understood that an ntfs partition shows up as fuseblk.
Heh, sorry trying to help. Perhaps a little re-phrasing of your
question would have alleviated my involvement.
Cybe R. Wizard
My bad, I'm still learning how to ask questions that mean what I want
them to mean... or maybe I'm still learning English, who knows. <g>
John F. Morse
2012-07-15 19:01:38 UTC
Permalink
Post by crankypuss
Post by Frisbee Ninja
On Sun, 15 Jul 2012 01:54:13 -0600
Post by crankypuss
Post by crankypuss
How can I find out that it's actual filesystem type is ntfs?
[snip my attempt to 'help']
Post by crankypuss
Thanks, but I already understood that an ntfs partition shows up as fuseblk.
Heh, sorry trying to help. Perhaps a little re-phrasing of your
question would have alleviated my involvement.
Cybe R. Wizard
My bad, I'm still learning how to ask questions that mean what I want
them to mean... or maybe I'm still learning English, who knows. <g>
Don't worry about learning English. The words will have new meanings in
a few days.

Some may even be an exact match for what you were thinking.

Learn to think in Latin.
--
John

When a person has -- whether they knew it or not -- already
rejected the Truth, by what means do they discern a lie?
crankypuss
2012-07-15 19:31:44 UTC
Permalink
Post by John F. Morse
Post by crankypuss
Post by Frisbee Ninja
On Sun, 15 Jul 2012 01:54:13 -0600
Post by crankypuss
Post by crankypuss
How can I find out that it's actual filesystem type is ntfs?
[snip my attempt to 'help']
Post by crankypuss
Thanks, but I already understood that an ntfs partition shows up as fuseblk.
Heh, sorry trying to help. Perhaps a little re-phrasing of your
question would have alleviated my involvement.
Cybe R. Wizard
My bad, I'm still learning how to ask questions that mean what I want
them to mean... or maybe I'm still learning English, who knows. <g>
Don't worry about learning English. The words will have new meanings in
a few days.
Some may even be an exact match for what you were thinking.
Learn to think in Latin.
Excretus, ergo sum.
John F. Morse
2012-07-15 14:40:38 UTC
Permalink
Post by crankypuss
What I was trying to ask is whether there is a command that will cause
fuse to cough up the details of the underlying filesystem. The
information stored by fusermount ought to be available somehow...
maybe it's excessively old-school of me, but software that says "i
know, but i won't tell you" just pisses me off.
Maybe I need to approach this in a different way. The mount command
has reported that /dev/sdc1 is fuseblk, so far so good. Now, gparted
can report that /dev/sdc1 is an ntfs filesystem whether or not it's
mounted, it just can't tell much about how much of it is used unless
it's mounted. How can I get at whatever gparted is using to determine
that /dev/sdc1 is an ntfs filesystem? I guess I'll need to go look at
the commands used to list partition data once I wake up enough to
remember what they are. Thanks.
I don't have a dual-/multi-boot powered up at the moment for checking
Windoze stuff, but perhaps you might try:

sudo fdisk -l

(That -l option is a lowercase L.)

fdisk(8)

. . .

OPTIONS

. . .

-l List the partition tables for the specified devices
and then
exit. If no devices are given, those mentioned in
/proc/parti‐
tions (if that exists) are used.

. . .

However I think common-sense logic indicates you will find that a disk
that is not mounted cannot report (communicate) its usage. Suppose you
added or deleted files when it was connected to a different computer or OS?

You can measure the size of a bus using various methods. And you can
read the maximum occupancy by reading published specs. But you cannot
measure the number of passengers until you mount it and count them.
--
John

When a person has -- whether they knew it or not -- already
rejected the Truth, by what means do they discern a lie?
crankypuss
2012-07-15 18:15:23 UTC
Permalink
Post by John F. Morse
Post by crankypuss
What I was trying to ask is whether there is a command that will cause
fuse to cough up the details of the underlying filesystem. The
information stored by fusermount ought to be available somehow...
maybe it's excessively old-school of me, but software that says "i
know, but i won't tell you" just pisses me off.
Maybe I need to approach this in a different way. The mount command
has reported that /dev/sdc1 is fuseblk, so far so good. Now, gparted
can report that /dev/sdc1 is an ntfs filesystem whether or not it's
mounted, it just can't tell much about how much of it is used unless
it's mounted. How can I get at whatever gparted is using to determine
that /dev/sdc1 is an ntfs filesystem? I guess I'll need to go look at
the commands used to list partition data once I wake up enough to
remember what they are. Thanks.
I don't have a dual-/multi-boot powered up at the moment for checking
sudo fdisk -l
(That -l option is a lowercase L.)
fdisk(8)
. . .
OPTIONS
. . .
-l List the partition tables for the specified devices
and then
exit. If no devices are given, those mentioned in
/proc/parti‐
tions (if that exists) are used.
. . .
I have no problem with doing "sudo fdisk -l" myself, but I do have a
problem with the fact that I need to do this in a program that should
not need to run as root. Too many requirements for sudo imo. There's
no security reason I can see that any user oughtn't be able to see what
kind of partition is mounted, the sudo is required by the apparent fact
that the only available query command that comes remotely close to
giving the information which FUSE ought to be queryable for is a
repartitioning tool.

I note that "sudo fdisk -l" lists several possible partition types, not
solely "ntfs". I'd post what it lists but at the moment I don't have an
ntfs partition to run it against. So as far as I can tell, once an ntfs
partition is automounted as fuseblk it's actual filesystem type has been
thrown away or hidden.
Post by John F. Morse
However I think common-sense logic indicates you will find that a disk
that is not mounted cannot report (communicate) its usage. Suppose you
added or deleted files when it was connected to a different computer or OS?
You can measure the size of a bus using various methods. And you can
read the maximum occupancy by reading published specs. But you cannot
measure the number of passengers until you mount it and count them.
Yes, quite, I'm only interested in obtaining information about
partitions that are currently mounted, not the ones on a USB stick in
the other room. But I do think it's entirely reasonable that a
partition that was automounted when I plugged in a USB stick, for
example, should be queryable to determine WTF it is, i.e. something
should report "ntfs" instead of "fuseblk" or one-of-several possibilities.

I've only been using Linux since mid-December and already I'm starting
to shrug over inadequacies like this, no wonder the attitude "shut up
and deal with it or go away" seems so prevalent; this is the 21st
century, we ought to be able to do better by now.
Jim Price
2012-07-15 19:35:58 UTC
Permalink
On 15/07/12 19:15, crankypuss wrote:

[snip]
Post by crankypuss
Yes, quite, I'm only interested in obtaining information about
partitions that are currently mounted, not the ones on a USB stick in
the other room. But I do think it's entirely reasonable that a
partition that was automounted when I plugged in a USB stick, for
example, should be queryable to determine WTF it is, i.e. something
should report "ntfs" instead of "fuseblk" or one-of-several possibilities.
I've only been using Linux since mid-December and already I'm starting
to shrug over inadequacies like this, no wonder the attitude "shut up
and deal with it or go away" seems so prevalent; this is the 21st
century, we ought to be able to do better by now.
Er, we can. Try:

df -T

That does not require root, and will report the type of currently
mounted filesystems.
--
╔═╦═╦═════╦═══╗
║ ║ ║ ║ ║
╔═╝ ║ ║ ║ ║ ║ ╔═╝
╚═══╩═╩═╩═╩═╩═╝ -- JimP.
crankypuss
2012-07-15 19:52:26 UTC
Permalink
Post by Jim Price
[snip]
Post by crankypuss
Yes, quite, I'm only interested in obtaining information about
partitions that are currently mounted, not the ones on a USB stick in
the other room. But I do think it's entirely reasonable that a
partition that was automounted when I plugged in a USB stick, for
example, should be queryable to determine WTF it is, i.e. something
should report "ntfs" instead of "fuseblk" or one-of-several
possibilities.
I've only been using Linux since mid-December and already I'm starting
to shrug over inadequacies like this, no wonder the attitude "shut up
and deal with it or go away" seems so prevalent; this is the 21st
century, we ought to be able to do better by now.
df -T
That does not require root, and will report the type of currently
mounted filesystems.
I've made a note to try that in the morning when I should have time to
create an ntfs partition and try it. Thanks.
crankypuss
2012-07-16 09:59:00 UTC
Permalink
Post by crankypuss
Post by Jim Price
[snip]
Post by crankypuss
Yes, quite, I'm only interested in obtaining information about
partitions that are currently mounted, not the ones on a USB stick in
the other room. But I do think it's entirely reasonable that a
partition that was automounted when I plugged in a USB stick, for
example, should be queryable to determine WTF it is, i.e. something
should report "ntfs" instead of "fuseblk" or one-of-several
possibilities.
I've only been using Linux since mid-December and already I'm starting
to shrug over inadequacies like this, no wonder the attitude "shut up
and deal with it or go away" seems so prevalent; this is the 21st
century, we ought to be able to do better by now.
df -T
That does not require root, and will report the type of currently
mounted filesystems.
I've made a note to try that in the morning when I should have time to
create an ntfs partition and try it. Thanks.
Er, apparently we can't:

Filesystem Type 1K-blocks Used Available Use% Mounted on
...
/dev/sdc1 fuseblk 1976316 10392 1965924 1% /media/test-ntfs
/dev/sdc2 vfat 1972448 4 1972444 1% /media/test-fat32
Jim Price
2012-07-16 17:29:17 UTC
Permalink
Post by crankypuss
Post by crankypuss
Post by Jim Price
df -T
That does not require root, and will report the type of currently
mounted filesystems.
I've made a note to try that in the morning when I should have time to
create an ntfs partition and try it. Thanks.
Filesystem Type 1K-blocks Used Available Use% Mounted on
...
/dev/sdc1 fuseblk 1976316 10392 1965924 1% /media/test-ntfs
/dev/sdc2 vfat 1972448 4 1972444 1% /media/test-fat32
OK, if you still can't cope with fuseblk being there instead of ntfs,
despite being able to establish from the info above that it isn't any
kind of native linux filesystem, this line does not require root, and
does contain ntfs and the other details about how the ntfs partition was
mounted (from the command line which mounted it):

ps -ef|grep mount.ntfs-3g|grep -v grep

It should return nothing if nothing is currently mounted by ntfs-3g.
e.g. on my system with an SD card with an ntfs partition mounted, I get:

$ ps -ef|grep mount.ntfs-3g|grep -v grep
root 26966 1 0 16:13 ? 00:00:00 /sbin/mount.ntfs-3g
/dev/sdb2 /media/USB2.0 CardReader SD0 - 62 MiB -o
rw,nosuid,nodev,uhelper=hal
--
╔═╦═╦═════╦═══╗
║ ║ ║ ║ ║
╔═╝ ║ ║ ║ ║ ║ ╔═╝
╚═══╩═╩═╩═╩═╩═╝ -- JimP.
Trygve S
2012-07-16 20:59:32 UTC
Permalink
Post by Jim Price
Post by crankypuss
Post by crankypuss
Post by Jim Price
df -T
That does not require root, and will report the type of currently
mounted filesystems.
I've made a note to try that in the morning when I should have time to
create an ntfs partition and try it. Thanks.
Filesystem Type 1K-blocks Used Available Use% Mounted on
...
/dev/sdc1 fuseblk 1976316 10392 1965924 1% /media/test-ntfs
/dev/sdc2 vfat 1972448 4 1972444 1% /media/test-fat32
OK, if you still can't cope with fuseblk being there instead of ntfs,
despite being able to establish from the info above that it isn't any
kind of native linux filesystem, this line does not require root, and
does contain ntfs and the other details about how the ntfs partition was
ps -ef|grep mount.ntfs-3g|grep -v grep
It should return nothing if nothing is currently mounted by ntfs-3g.
$ ps -ef|grep mount.ntfs-3g|grep -v grep
root 26966 1 0 16:13 ? 00:00:00 /sbin/mount.ntfs-3g
/dev/sdb2 /media/USB2.0 CardReader SD0 - 62 MiB -o
rw,nosuid,nodev,uhelper=hal
On my system, Ubuntu 10.04 LTS (upgrades from 8.04 LTS), this command
gives nothing. Which Ubuntu version are you running ?
Jim Price
2012-07-16 23:06:30 UTC
Permalink
Post by Trygve S
Post by Jim Price
ps -ef|grep mount.ntfs-3g|grep -v grep
It should return nothing if nothing is currently mounted by ntfs-3g.
$ ps -ef|grep mount.ntfs-3g|grep -v grep
root 26966 1 0 16:13 ? 00:00:00 /sbin/mount.ntfs-3g
/dev/sdb2 /media/USB2.0 CardReader SD0 - 62 MiB -o
rw,nosuid,nodev,uhelper=hal
On my system, Ubuntu 10.04 LTS (upgrades from 8.04 LTS), this command
gives nothing.
Are you saying it gives nothing if there is an ntfs partition mounted at
the same time? If so, try the command without the greps and see what you
get.
Post by Trygve S
Which Ubuntu version are you running ?
10.04
--
╔═╦═╦═════╦═══╗
║ ║ ║ ║ ║
╔═╝ ║ ║ ║ ║ ║ ╔═╝
╚═══╩═╩═╩═╩═╩═╝ -- JimP.
NoOp
2012-07-17 01:54:04 UTC
Permalink
Post by Jim Price
Post by Trygve S
Post by Jim Price
ps -ef|grep mount.ntfs-3g|grep -v grep
It should return nothing if nothing is currently mounted by ntfs-3g.
$ ps -ef|grep mount.ntfs-3g|grep -v grep
root 26966 1 0 16:13 ? 00:00:00 /sbin/mount.ntfs-3g
/dev/sdb2 /media/USB2.0 CardReader SD0 - 62 MiB -o
rw,nosuid,nodev,uhelper=hal
On my system, Ubuntu 10.04 LTS (upgrades from 8.04 LTS), this command
gives nothing.
Are you saying it gives nothing if there is an ntfs partition mounted at
the same time? If so, try the command without the greps and see what you
get.
Yes. 11.04.

However:

$ ps -ef | grep ntfs
root 7652 1 3 18:15 ? 00:01:02 /sbin/mount.ntfs
/dev/sdd1 /media/GGUSB -o
rw,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000,dmask=0077,fmask=0177

$ apt-cache policy ntfs-3g
ntfs-3g:
Installed: 1:2010.8.8-0ubuntu1
Candidate: 1:2010.8.8-0ubuntu1
Version table:
*** 1:2010.8.8-0ubuntu1 0
500 http://archive.ubuntu.com/ubuntu/ natty/main i386 Packages
100 /var/lib/dpkg/status
crankypuss
2012-07-17 09:24:12 UTC
Permalink
Post by Jim Price
Post by crankypuss
Post by crankypuss
Post by Jim Price
df -T
That does not require root, and will report the type of currently
mounted filesystems.
I've made a note to try that in the morning when I should have time to
create an ntfs partition and try it. Thanks.
Filesystem Type 1K-blocks Used Available Use% Mounted on
...
/dev/sdc1 fuseblk 1976316 10392 1965924 1% /media/test-ntfs
/dev/sdc2 vfat 1972448 4 1972444 1% /media/test-fat32
OK, if you still can't cope with fuseblk being there instead of ntfs,
despite being able to establish from the info above that it isn't any
kind of native linux filesystem, this line does not require root, and
does contain ntfs and the other details about how the ntfs partition was
ps -ef|grep mount.ntfs-3g|grep -v grep
It should return nothing if nothing is currently mounted by ntfs-3g.
$ ps -ef|grep mount.ntfs-3g|grep -v grep
root 26966 1 0 16:13 ? 00:00:00 /sbin/mount.ntfs-3g
/dev/sdb2 /media/USB2.0 CardReader SD0 - 62 MiB -o
rw,nosuid,nodev,uhelper=hal
Ubuntu 11.10, does nothing; no cigar, thanks for playing.


$ df -T
Filesystem Type 1K-blocks Used Available Use% Mounted on
...
/dev/sda3 fuseblk 33519608 30636340 2883268 92% /media/ACER

$ ps -ef|grep mount.ntfs-3g|grep -v grep
$
Trygve S
2012-07-15 20:10:19 UTC
Permalink
Post by Jim Price
[snip]
Post by crankypuss
Yes, quite, I'm only interested in obtaining information about
partitions that are currently mounted, not the ones on a USB stick in
the other room. But I do think it's entirely reasonable that a
partition that was automounted when I plugged in a USB stick, for
example, should be queryable to determine WTF it is, i.e. something
should report "ntfs" instead of "fuseblk" or one-of-several
possibilities.
I've only been using Linux since mid-December and already I'm starting
to shrug over inadequacies like this, no wonder the attitude "shut up
and deal with it or go away" seems so prevalent; this is the 21st
century, we ought to be able to do better by now.
df -T
That does not require root, and will report the type of currently
mounted filesystems.
This does not work. This is from Ubuntu 10.04.4 LTS:

Filesystem Type Size Used Avail Use% Mounted on
/dev/sda3 ext3 20G 16G 3.6G 81% /
none devtmpfs 750M 268K 750M 1% /dev
none tmpfs 754M 200K 754M 1% /dev/shm
none tmpfs 754M 172K 754M 1% /var/run
none tmpfs 754M 0 754M 0% /var/lock
none tmpfs 754M 0 754M 0% /lib/init/rw
/dev/sda1 fuseblk 35G 25G 9.8G 72% /media/sda1
NoOp
2012-07-16 19:44:18 UTC
Permalink
...
Post by crankypuss
Post by John F. Morse
You can measure the size of a bus using various methods. And you can
read the maximum occupancy by reading published specs. But you cannot
measure the number of passengers until you mount it and count them.
Yes, quite, I'm only interested in obtaining information about
partitions that are currently mounted, not the ones on a USB stick in
the other room. But I do think it's entirely reasonable that a
partition that was automounted when I plugged in a USB stick, for
example, should be queryable to determine WTF it is, i.e. something
should report "ntfs" instead of "fuseblk" or one-of-several possibilities.
blkid
blkid -o list
man blkid
...
Jonathan N. Little
2012-07-16 22:16:20 UTC
Permalink
Post by NoOp
...
Post by crankypuss
Post by John F. Morse
You can measure the size of a bus using various methods. And you can
read the maximum occupancy by reading published specs. But you cannot
measure the number of passengers until you mount it and count them.
Yes, quite, I'm only interested in obtaining information about
partitions that are currently mounted, not the ones on a USB stick in
the other room. But I do think it's entirely reasonable that a
partition that was automounted when I plugged in a USB stick, for
example, should be queryable to determine WTF it is, i.e. something
should report "ntfs" instead of "fuseblk" or one-of-several possibilities.
blkid
blkid -o list
man blkid
...
Unfortunately requires sudo to list the filesystem type and as I recall
was one of the complaints of the OP. I think he is looking for a
non-privileged was just to obtain the information.
--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
NoOp
2012-07-17 01:46:06 UTC
Permalink
Post by Jonathan N. Little
Post by NoOp
...
Post by crankypuss
Post by John F. Morse
You can measure the size of a bus using various methods. And you can
read the maximum occupancy by reading published specs. But you cannot
measure the number of passengers until you mount it and count them.
Yes, quite, I'm only interested in obtaining information about
partitions that are currently mounted, not the ones on a USB stick in
the other room. But I do think it's entirely reasonable that a
partition that was automounted when I plugged in a USB stick, for
example, should be queryable to determine WTF it is, i.e. something
should report "ntfs" instead of "fuseblk" or one-of-several possibilities.
blkid
blkid -o list
man blkid
...
Unfortunately requires sudo to list the filesystem type and as I recall
was one of the complaints of the OP. I think he is looking for a
non-privileged was just to obtain the information.
Actually it doesn't on one of my systems (11.04). I agree that it should
require
sys admin (8)
<http://manpages.ubuntu.com/manpages/precise/man8/blkid.8.html>. But
mine doesn't:

$ blkid -o list
device fs_type label mount point UUID
-------------------------------------------------------------------------------
/dev/sda1 ext4 (not mounted) <snip>
/dev/sdb1 ext4 / <snip>
/dev/sdb5 swap <swap> <snip>
/dev/sdd1 ntfs GGUSB /media/GGUSB <snip>

And now I've just unmounted the usb stick via Nautilus:
$ blkid -o list
device fs_type label mount point UUID
-------------------------------------------------------------------------------
/dev/sda1 ext4 (not mounted) <snip>
/dev/sdb1 ext4 / <snip>
/dev/sdb5 swap <swap> <snip>
/dev/sdd1 ntfs GGUSB (not mounted) <snip>

Above UUID's were snipped only so that all lines weren't cluttered.

Reason why I don't require sudo for blkid as this user, is that the user
is a member of the disk group.

sudo usermod -a -G disk USERNAME

Having to use 'sudo' for blkid seems to be an on again/off again
situation[1] & you don't need 'sudo' to read /etc/blkid.tab. So I just
keep this user in the disks group.

[1]
https://bugs.launchpad.net/ubuntu/+source/e2fsprogs/+bug/220275
[blkid shouldn't need root privileges]
https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/408998
[blkid permission inconsistency]
etc.

http://manpages.ubuntu.com/manpages/precise/man8/blkid.8.html
http://manpages.ubuntu.com/manpages/precise/man3/libblkid.3.html
crankypuss
2012-07-17 10:13:00 UTC
Permalink
Post by NoOp
Post by Jonathan N. Little
Post by NoOp
...
Post by crankypuss
Post by John F. Morse
You can measure the size of a bus using various methods. And you can
read the maximum occupancy by reading published specs. But you cannot
measure the number of passengers until you mount it and count them.
Yes, quite, I'm only interested in obtaining information about
partitions that are currently mounted, not the ones on a USB stick in
the other room. But I do think it's entirely reasonable that a
partition that was automounted when I plugged in a USB stick, for
example, should be queryable to determine WTF it is, i.e. something
should report "ntfs" instead of "fuseblk" or one-of-several possibilities.
blkid
blkid -o list
man blkid
...
Unfortunately requires sudo to list the filesystem type and as I recall
was one of the complaints of the OP. I think he is looking for a
non-privileged was just to obtain the information.
Actually it doesn't on one of my systems (11.04). I agree that it should
require
sys admin (8)
<http://manpages.ubuntu.com/manpages/precise/man8/blkid.8.html>. But
$ blkid -o list
device fs_type label mount point UUID
-------------------------------------------------------------------------------
/dev/sda1 ext4 (not mounted) <snip>
/dev/sdb1 ext4 / <snip>
/dev/sdb5 swap <swap> <snip>
/dev/sdd1 ntfs GGUSB /media/GGUSB <snip>
$ blkid -o list
device fs_type label mount point UUID
-------------------------------------------------------------------------------
/dev/sda1 ext4 (not mounted) <snip>
/dev/sdb1 ext4 / <snip>
/dev/sdb5 swap <swap> <snip>
/dev/sdd1 ntfs GGUSB (not mounted) <snip>
Above UUID's were snipped only so that all lines weren't cluttered.
Reason why I don't require sudo for blkid as this user, is that the user
is a member of the disk group.
sudo usermod -a -G disk USERNAME
Having to use 'sudo' for blkid seems to be an on again/off again
situation[1] & you don't need 'sudo' to read /etc/blkid.tab. So I just
keep this user in the disks group.
[1]
https://bugs.launchpad.net/ubuntu/+source/e2fsprogs/+bug/220275
[blkid shouldn't need root privileges]
https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/408998
[blkid permission inconsistency]
etc.
http://manpages.ubuntu.com/manpages/precise/man8/blkid.8.html
http://manpages.ubuntu.com/manpages/precise/man3/libblkid.3.html
Interesting. I'm on Ubuntu 11.10 and blkid doesn't seem to need root.
Nice to know about /etc/blkid.tab though.
crankypuss
2012-07-17 10:07:17 UTC
Permalink
Post by Jonathan N. Little
Post by NoOp
...
Post by crankypuss
Post by John F. Morse
You can measure the size of a bus using various methods. And you can
read the maximum occupancy by reading published specs. But you cannot
measure the number of passengers until you mount it and count them.
Yes, quite, I'm only interested in obtaining information about
partitions that are currently mounted, not the ones on a USB stick in
the other room. But I do think it's entirely reasonable that a
partition that was automounted when I plugged in a USB stick, for
example, should be queryable to determine WTF it is, i.e. something
should report "ntfs" instead of "fuseblk" or one-of-several
possibilities.
blkid
blkid -o list
man blkid
...
Unfortunately requires sudo to list the filesystem type and as I recall
was one of the complaints of the OP. I think he is looking for a
non-privileged was just to obtain the information.
Seems to work without sudo. I opened a fresh xterm, issued "fdisk -l"
and got no output since not sudo'ed. Issued "blkid -o full" and got the
full listing. Que pasa?
crankypuss
2012-07-17 10:00:40 UTC
Permalink
Post by NoOp
...
Post by crankypuss
Post by John F. Morse
You can measure the size of a bus using various methods. And you can
read the maximum occupancy by reading published specs. But you cannot
measure the number of passengers until you mount it and count them.
Yes, quite, I'm only interested in obtaining information about
partitions that are currently mounted, not the ones on a USB stick in
the other room. But I do think it's entirely reasonable that a
partition that was automounted when I plugged in a USB stick, for
example, should be queryable to determine WTF it is, i.e. something
should report "ntfs" instead of "fuseblk" or one-of-several possibilities.
blkid
blkid -o list
man blkid
...
Thank you NoOp: blkid does not require root, correctly reports
filesystem type, and handily reports UUID in case one needs that!





$ df -T
Filesystem Type 1K-blocks Used Available Use% Mounted on
...
/dev/sda3 fuseblk 33519608 30636340 2883268 92% /media/ACER

$ blkid -o full /dev/sda3
/dev/sda3: LABEL="ACER" UUID="94CEB73ECEB71786" TYPE="ntfs"
$
crankypuss
2012-07-17 10:49:40 UTC
Permalink
Post by crankypuss
Post by NoOp
...
Post by crankypuss
Post by John F. Morse
You can measure the size of a bus using various methods. And you can
read the maximum occupancy by reading published specs. But you cannot
measure the number of passengers until you mount it and count them.
Yes, quite, I'm only interested in obtaining information about
partitions that are currently mounted, not the ones on a USB stick in
the other room. But I do think it's entirely reasonable that a
partition that was automounted when I plugged in a USB stick, for
example, should be queryable to determine WTF it is, i.e. something
should report "ntfs" instead of "fuseblk" or one-of-several
possibilities.
blkid
blkid -o list
man blkid
...
Thank you NoOp: blkid does not require root, correctly reports
filesystem type, and handily reports UUID in case one needs that!
$ df -T
Filesystem Type 1K-blocks Used Available Use% Mounted on
...
/dev/sda3 fuseblk 33519608 30636340 2883268 92% /media/ACER
$ blkid -o full /dev/sda3
/dev/sda3: LABEL="ACER" UUID="94CEB73ECEB71786" TYPE="ntfs"
$
Now I'm wondering how gparted can tell a fat16 partition from fat32.

The mount and df commands report both as "vfat". "fdisk -l" reports as
"FAT16" and "W95 FAT32" but of course requires root.

I know that I'm (still) missing a lot of knowledge here.

Stuart Barkley
2012-07-15 22:48:20 UTC
Permalink
The mount command has reported that /dev/sdc1 is fuseblk, so far so
good. Now, gparted can report that /dev/sdc1 is an ntfs filesystem
whether or not it's mounted, it just can't tell much about how much
of it is used unless it's mounted. How can I get at whatever
gparted is using to determine that /dev/sdc1 is an ntfs filesystem?
I guess I'll need to go look at the commands used to list partition
data once I wake up enough to remember what they are. Thanks.
I like 'disktype' as a good command line utility which gives lots of
good information about filesystems. 'disktype /dev/sdc' will identify
all of the partitions giving detailed information for many partition
types.

***@disasterville-1# disktype /dev/sda

--- /dev/sda
Block device, size 232.9 GiB (250059350016 bytes)
DOS/MBR partition map
Partition 1: 12.00 GiB (12888047616 bytes, 25171968 sectors from 2048)
Type 0x27 (Unknown)
NTFS file system
Volume size 12.00 GiB (12888047104 bytes, 25171967 sectors)
Partition 2: 101 MiB (105906176 bytes, 206848 sectors from 25174016, bootable)
Type 0x07 (HPFS/NTFS)
NTFS file system
Volume size 101.0 MiB (105905664 bytes, 206847 sectors)
Partition 3: 34.18 GiB (36702139392 bytes, 71683866 sectors from 25380864)
Type 0x07 (HPFS/NTFS)
NTFS file system
Volume size 34.18 GiB (36702138880 bytes, 71683865 sectors)
Partition 4: 186.6 GiB (200361902080 bytes, 391331840 sectors from 97064960)
Type 0x83 (Linux)
Ext3 file system
UUID B4187CB4-0BE9-4464-8F88-9CEE2DDE50DD (DCE, v4)
Last mounted at "/"
Volume size 186.6 GiB (200361902080 bytes, 48916480 blocks of 4 KiB)

***@disasterville-2#

The standard 'file' command might also be of interest:

***@disasterville-6# file -s /dev/sda*
/dev/sda: x86 boot sector; partition 1: ID=0x27, starthead 32, startsector 2048, 25171968 sectors; partition 2: ID=0x7, active, starthead 254, startsector 25174016, 206848 sectors; partition 3: ID=0x7, starthead 254, startsector 25380864, 71683866 sectors; partition 4: ID=0x83, starthead 254, startsector 97064960, 391331840 sectors, code offset 0x63
/dev/sda1: x86 boot sector, code offset 0x52, OEM-ID "NTFS ", sectors/cluster 8, reserved sectors 0, Media descriptor 0xf8, heads 255, hidden sectors 2048, dos < 4.0 BootSector (0x80)
/dev/sda2: x86 boot sector, code offset 0x52, OEM-ID "NTFS ", sectors/cluster 8, reserved sectors 0, Media descriptor 0xf8, heads 255, hidden sectors 25174016, dos < 4.0 BootSector (0x80)
/dev/sda3: x86 boot sector, code offset 0x52, OEM-ID "NTFS ", sectors/cluster 8, reserved sectors 0, Media descriptor 0xf8, heads 255, hidden sectors 25380864, dos < 4.0 BootSector (0x80)
/dev/sda4: Linux rev 1.0 ext4 filesystem data, UUID=b4187cb4-0be9-4464-8f88-9cee2dde50dd (needs journal recovery) (extents) (large files) (huge files)
***@disasterville-7#

These usually require root privilege since they read the raw device
which is usually read/write protected from ordinary users.

Stuart
--
I've never been lost; I was once bewildered for three days, but never lost!
-- Daniel Boone
crankypuss
2012-07-16 10:02:59 UTC
Permalink
Post by Stuart Barkley
The mount command has reported that /dev/sdc1 is fuseblk, so far so
good. Now, gparted can report that /dev/sdc1 is an ntfs filesystem
whether or not it's mounted, it just can't tell much about how much
of it is used unless it's mounted. How can I get at whatever
gparted is using to determine that /dev/sdc1 is an ntfs filesystem?
I guess I'll need to go look at the commands used to list partition
data once I wake up enough to remember what they are. Thanks.
I like 'disktype' as a good command line utility which gives lots of
good information about filesystems. 'disktype /dev/sdc' will identify
all of the partitions giving detailed information for many partition
types.
--- /dev/sda
Block device, size 232.9 GiB (250059350016 bytes)
DOS/MBR partition map
Partition 1: 12.00 GiB (12888047616 bytes, 25171968 sectors from 2048)
Type 0x27 (Unknown)
NTFS file system
Volume size 12.00 GiB (12888047104 bytes, 25171967 sectors)
Partition 2: 101 MiB (105906176 bytes, 206848 sectors from 25174016, bootable)
Type 0x07 (HPFS/NTFS)
NTFS file system
Volume size 101.0 MiB (105905664 bytes, 206847 sectors)
Partition 3: 34.18 GiB (36702139392 bytes, 71683866 sectors from 25380864)
Type 0x07 (HPFS/NTFS)
NTFS file system
Volume size 34.18 GiB (36702138880 bytes, 71683865 sectors)
Partition 4: 186.6 GiB (200361902080 bytes, 391331840 sectors from 97064960)
Type 0x83 (Linux)
Ext3 file system
UUID B4187CB4-0BE9-4464-8F88-9CEE2DDE50DD (DCE, v4)
Last mounted at "/"
Volume size 186.6 GiB (200361902080 bytes, 48916480 blocks of 4 KiB)
/dev/sda: x86 boot sector; partition 1: ID=0x27, starthead 32, startsector 2048, 25171968 sectors; partition 2: ID=0x7, active, starthead 254, startsector 25174016, 206848 sectors; partition 3: ID=0x7, starthead 254, startsector 25380864, 71683866 sectors; partition 4: ID=0x83, starthead 254, startsector 97064960, 391331840 sectors, code offset 0x63
/dev/sda1: x86 boot sector, code offset 0x52, OEM-ID "NTFS ", sectors/cluster 8, reserved sectors 0, Media descriptor 0xf8, heads 255, hidden sectors 2048, dos < 4.0 BootSector (0x80)
/dev/sda2: x86 boot sector, code offset 0x52, OEM-ID "NTFS ", sectors/cluster 8, reserved sectors 0, Media descriptor 0xf8, heads 255, hidden sectors 25174016, dos < 4.0 BootSector (0x80)
/dev/sda3: x86 boot sector, code offset 0x52, OEM-ID "NTFS ", sectors/cluster 8, reserved sectors 0, Media descriptor 0xf8, heads 255, hidden sectors 25380864, dos < 4.0 BootSector (0x80)
/dev/sda4: Linux rev 1.0 ext4 filesystem data, UUID=b4187cb4-0be9-4464-8f88-9cee2dde50dd (needs journal recovery) (extents) (large files) (huge files)
These usually require root privilege since they read the raw device
which is usually read/write protected from ordinary users.
Stuart
Apparently not part of the Linux base command set, "which disktype" on
my Ubuntu 11.10 system shows nothing. Also root privilege is not really
an additional constraint that I'm willing to put on this application.
Thanks, though.
Jonathan N. Little
2012-07-16 11:31:12 UTC
Permalink
Post by crankypuss
Apparently not part of the Linux base command set, "which disktype" on
my Ubuntu 11.10 system shows nothing. Also root privilege is not really
an additional constraint that I'm willing to put on this application.
Thanks, though.
***@specter:~$ disktype --help
The program 'disktype' is currently not installed. You can install it
by typing:
sudo apt-get install disktype
--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
crankypuss
2012-07-16 12:11:58 UTC
Permalink
Post by Jonathan N. Little
Post by crankypuss
Apparently not part of the Linux base command set, "which disktype" on
my Ubuntu 11.10 system shows nothing. Also root privilege is not really
an additional constraint that I'm willing to put on this application.
Thanks, though.
The program 'disktype' is currently not installed. You can install it
sudo apt-get install disktype
Yes, thank you Jonathan, I know how to get it. However just because I
know how to get it, that doesn't mean I'm willing to add it as a
dependency, especially if it requires root, there are too damn many
unnecessary sudo's in the world already. <g>
Jonathan N. Little
2012-07-16 17:13:43 UTC
Permalink
Post by crankypuss
Post by Jonathan N. Little
Post by crankypuss
Apparently not part of the Linux base command set, "which disktype" on
my Ubuntu 11.10 system shows nothing. Also root privilege is not really
an additional constraint that I'm willing to put on this application.
Thanks, though.
The program 'disktype' is currently not installed. You can install it
sudo apt-get install disktype
Yes, thank you Jonathan, I know how to get it. However just because I
know how to get it, that doesn't mean I'm willing to add it as a
dependency, especially if it requires root, there are too damn many
unnecessary sudo's in the world already. <g>
Yes I just noticed disktype also requires root privileges...I am sure
there must be a way to get the info you wish, if the command is
info-only it should not need root privileges. Just haven't stumbled upon
it yet.
--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Loading...